-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Replace ua-parser-js or pin current version #3715
Comments
Thanks for bringing this up. I think a home-grown version is the way to go. Can you send a PR? |
sure; will take a look at it this weekend |
Sounds great! |
Created a PR |
any news? |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
It seems ua-parser-js has been the source of several security issues:
The catastrophic backtracking issues of course aren't much of a problem for Karma, but the recent malware compromise certainly is! Karma represents a large chunk of the library's usage (according to NPM, Karma represents ~25% of ua-parser-js's downloads), and since a version range import is being used, it means that Karma may have unwittingly been a big contributor to spreading the latest malware.
Yet the library is only used in a single location for a very minor purpose (constructing a "friendly" name for browsers to show in the logs; as far as I can tell, this is an undocumented internal function with no particular promises about its API):
karma/lib/helper.js
Line 9 in 94cf15e
Maybe it's time to swap that function out for a home-grown simplified version? I think there are a few options:
0.7.30
) instead of a range (^0.7.30
) to at least avoid any future compromises being auto-fetched (and perhaps worth doing a quick review of the current code for other issues, if going with this option)Do the maintainers have any preferences here?
The text was updated successfully, but these errors were encountered: