Skip to content
Permalink
Browse files

Block long a-z chars sequences as well as numbers.

Signed-off-by: Arnout Kazemier <info@3rd-Eden.com>
  • Loading branch information...
mcollina authored and 3rd-Eden committed Mar 8, 2017
1 parent 50be8cb commit b18cf7c2a13c994ea8d6d0d132feef4eb8193c36
Showing with 2 additions and 2 deletions.
  1. +2 −2 index.js
@@ -417,8 +417,8 @@ function isSafe(userAgent) {

for (var i = 0; i < userAgent.length; i++) {
code = userAgent.charCodeAt(i);
// numbers between 0 and 9
if (code >= 48 && code <= 57) {
// numbers between 0 and 9, letters between a and z
if ((code >= 48 && code <= 57) || (code >= 97 && code <= 122)) {
consecutive++;
} else {
consecutive = 0;

0 comments on commit b18cf7c

Please sign in to comment.
You can’t perform that action at this time.