Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed disjunt
  • Loading branch information
Kwstubbs committed Oct 23, 2023
commit 62a65dca1c26cd58cb1960e8c0a33217e025dfbb
6 changes: 3 additions & 3 deletions go/ql/src/experimental/CWE-347/JWTParsingAlgorithm.ql
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ where
func instanceof SafeJwtParserFunc
) and
//Check that the Parse(function or method) does not check the Token Method field, which most likely is a check for method type
not exists(Field f, FunctionName fn |
not exists(Field f |
f.hasQualifiedName(golangJwtModern(), "Token", "Method") and
(
f.getARead().getRoot() = c.getCall().getArgument(1)
or
c.getCall().getArgument(1) = fn and
fn.toString() = f.getARead().asExpr().getEnclosingFunction().getName()
exists(FunctionName fn | c.getCall().getArgument(1) = fn and
fn.toString() = f.getARead().asExpr().getEnclosingFunction().getName())
)
)
)
Expand Down