Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle access denied errors #64

Closed
pimterry opened this issue Nov 21, 2019 · 2 comments
Closed

Handle access denied errors #64

pimterry opened this issue Nov 21, 2019 · 2 comments

Comments

@pimterry
Copy link
Contributor

If a user doesn't have access to read some registry keys, they can get a synchronous error, which is unhandled, and which thus crashes the process. See httptoolkit/httptoolkit#50 for an example.

Imo, in this case we should just ignore the information from that registry key, and move on, rather than failing entirely. It's safe to do so I believe, it just reduces the amount of info (e.g. uninstaller paths) we can return.

I'm happy to open a PR for this, just checking it would be welcomed first. My suggestion would be to just change enumerateValues to enumerateValuesSafe, which automatically returns [] if any registry values can't be read. I've given this a quick test locally and it seems to work very nicely, and still detects other browser info as normal. Sound good?

@vweevers
Copy link
Owner

I wasn't aware enumerateValuesSafe existed! Let's use it.

(As for your other PR, I'll have a look tomorrow)

@vweevers
Copy link
Owner

Fixed by #65.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants