Skip to content

Commit 5adcdf1

Browse files
committed
Ruby: Minor refactor
1 parent 8f53801 commit 5adcdf1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ruby/ql/lib/codeql/ruby/security/UrlRedirectCustomizations.qll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ module UrlRedirect {
6868
// Otherwise, we have to rely on a heuristic to filter out invulnerable handlers.
6969
// We exclude any handlers with names containing create/update/destroy, as these are not likely to handle GET requests.
7070
not exists(method.(ActionControllerActionMethod).getARoute()) and
71-
not this.asExpr()
72-
.getExpr()
73-
.getEnclosingMethod()
74-
.getName()
75-
.regexpMatch(".*(create|update|destroy).*")
71+
not method.getName().regexpMatch(".*(create|update|destroy).*")
7672
)
7773
)
7874
}

0 commit comments

Comments
 (0)