Skip to content

Commit

Permalink
Fix potential ReDoS vulnerability as reported by Doyensec
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Feb 12, 2021
1 parent 5b83893 commit 809439e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@
/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i // Verizon Tablet
], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [

/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i // Barnes & Noble Tablet
/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(\S(?:.*\S)?)\s+build/i // Barnes & Noble Tablet
], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [

/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i // Barnes & Noble Tablet
Expand Down Expand Up @@ -694,7 +694,7 @@
/(android[\w\.\s\-]{0,9});.+build/i // Generic Android Device
], [MODEL, [VENDOR, 'Generic']], [

/(phone)/i,
/(phone)/i
], [[TYPE, MOBILE]]
],

Expand Down

0 comments on commit 809439e

Please sign in to comment.