Skip to content

Commit

Permalink
Fix vulnerable regex in getOS() (as reported by Nick Starke)
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Oct 12, 2017
1 parent 7bd9ffe commit 25e143e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@
], [NAME, VERSION],[

/cfnetwork\/.+darwin/i,
/ip[honead]+(?:.*os\s([\w]+)*\slike\smac|;\sopera)/i // iOS
/ip[honead]+(?:.*os\s([\w]+)\slike\smac|;\sopera)/i // iOS
], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [

/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,
Expand Down

0 comments on commit 25e143e

Please sign in to comment.