File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
java/ql/lib/semmle/code/java/security
python/ql/lib/semmle/python/security
ruby/ql/lib/codeql/ruby/security Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,10 @@ class OverlyWideRange extends RegExpCharacterRange {
96
96
toCodePoint ( "A" ) <= high
97
97
or
98
98
// a non-alphanumeric char as part of the range boundaries
99
- exists ( int bound | bound = [ low , high ] | not isAlphanumeric ( bound .toUnicode ( ) ) )
99
+ exists ( int bound | bound = [ low , high ] | not isAlphanumeric ( bound .toUnicode ( ) ) ) and
100
+ // while still being ascii
101
+ low < 128 and
102
+ high < 128
100
103
) and
101
104
// allowlist for known ranges
102
105
not this = allowedWideRanges ( )
Original file line number Diff line number Diff line change @@ -96,7 +96,10 @@ class OverlyWideRange extends RegExpCharacterRange {
96
96
toCodePoint ( "A" ) <= high
97
97
or
98
98
// a non-alphanumeric char as part of the range boundaries
99
- exists ( int bound | bound = [ low , high ] | not isAlphanumeric ( bound .toUnicode ( ) ) )
99
+ exists ( int bound | bound = [ low , high ] | not isAlphanumeric ( bound .toUnicode ( ) ) ) and
100
+ // while still being ascii
101
+ low < 128 and
102
+ high < 128
100
103
) and
101
104
// allowlist for known ranges
102
105
not this = allowedWideRanges ( )
Original file line number Diff line number Diff line change @@ -96,7 +96,10 @@ class OverlyWideRange extends RegExpCharacterRange {
96
96
toCodePoint ( "A" ) <= high
97
97
or
98
98
// a non-alphanumeric char as part of the range boundaries
99
- exists ( int bound | bound = [ low , high ] | not isAlphanumeric ( bound .toUnicode ( ) ) )
99
+ exists ( int bound | bound = [ low , high ] | not isAlphanumeric ( bound .toUnicode ( ) ) ) and
100
+ // while still being ascii
101
+ low < 128 and
102
+ high < 128
100
103
) and
101
104
// allowlist for known ranges
102
105
not this = allowedWideRanges ( )
You can’t perform that action at this time.
0 commit comments