Fix vulnerable regex in getOS() (as reported by Nick Starke)

This commit is contained in:
Faisal Salman 2017-10-12 12:07:10 +07:00
parent 7bd9ffea24
commit 25e143ee7c

View File

@ -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,