mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Merge pull request #292 from github/regexp_slash_az
Don't parse `\A` and `\Z` as `RegExpConstant`
This commit is contained in:
@@ -33,7 +33,10 @@ class FooController < ActionController::Base
|
||||
|
||||
# GOOD - guarded by a string length check
|
||||
if name.length < 1024
|
||||
name.gsub regex, ''
|
||||
name.gsub regex, ''
|
||||
end
|
||||
|
||||
# GOOD - regex does not suffer from polynomial backtracking (regression test)
|
||||
params[:foo] =~ /\A[bc].*\Z/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user