Update go/ql/src/experimental/CWE-525/WebCacheDeception.ql

Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
This commit is contained in:
Yunus AYDIN
2023-11-15 15:08:29 +03:00
committed by GitHub
parent 74f1344ac5
commit fa1fa0d19d

View File

@@ -19,7 +19,7 @@ where
httpHandleFuncCall.getTarget().hasQualifiedName("net/http", "HandleFunc") and
httpHandleFuncCall.getNumArgument() > 1 and
httpHandleFuncCall.getArgument(0).getType().getUnderlyingType() = StringType and
httpHandleFuncCall.getArgument(0).toString().matches("%/\"") and
httpHandleFuncCall.getArgument(0).getStringValue().matches("%/\"") and
// Trace the second argument's data flow to its predecessor
predecessor = httpHandleFuncCall.getArgument(1).getAPredecessor() and
// Find the corresponding expression for the predecessor