mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Python: make test for unicode names pass
This commit is contained in:
@@ -128,7 +128,7 @@ abstract class RegexString extends Expr {
|
||||
private predicate singleEscape(int i) {
|
||||
exists(string c |
|
||||
c = this.getChar(i) and
|
||||
c != "x" and c != "U"
|
||||
c != "x" and c != "U" and c!= "N"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -143,6 +143,16 @@ abstract class RegexString extends Expr {
|
||||
or
|
||||
this.getChar(start + 1) = "U" and end = start + 10
|
||||
or
|
||||
this.getChar(start + 1) = "N" and
|
||||
this.getChar(start + 2) = "{" and
|
||||
this.getChar(end - 1) = "}" and
|
||||
end > start and
|
||||
not exists(int i |
|
||||
i > start + 2 and
|
||||
i < end - 1 and
|
||||
this.getChar(i) = "}"
|
||||
)
|
||||
or
|
||||
this.singleEscape(start + 1) and end = start + 2
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user