@@ -72,23 +72,19 @@ private module JWT {
7272 result in [ this .getArg ( 3 ) , this .getArgByName ( "options" ) ]
7373 }
7474
75- override boolean verifiesSignature ( ) {
75+ override predicate verifiesSignature ( ) {
7676 // jwt.decode(token, "key", "HS256")
77- not exists ( this .getArgByName ( "verify" ) ) and not exists ( this .getOptions ( ) ) and result = true
77+ not exists ( this .getArgByName ( "verify" ) ) and not exists ( this .getOptions ( ) )
7878 or
79- (
80- // not -> jwt.decode(token, verify=False)
81- isFalse ( this .getArgByName ( "verify" ) )
82- or
83- // not -> jwt.decode(token, key, options={"verify_signature": False})
84- exists ( KeyValuePair optionsDict , NameConstant falseName |
85- falseName .getId ( ) = "False" and
86- optionsDict = this .getArgByName ( "options" ) .asExpr ( ) .( Dict ) .getItems ( ) .getAnItem ( ) and
87- optionsDict .getKey ( ) .( Str_ ) .getS ( ) .matches ( "%verify%" ) and
88- falseName = optionsDict .getValue ( )
89- )
90- ) and
91- result = false
79+ // jwt.decode(token, verify=False)
80+ not isFalse ( this .getArgByName ( "verify" ) ) and
81+ // not -> jwt.decode(token, key, options={"verify_signature": False})
82+ not exists ( KeyValuePair optionsDict , NameConstant falseName |
83+ falseName .getId ( ) = "False" and
84+ optionsDict = this .getArgByName ( "options" ) .asExpr ( ) .( Dict ) .getItems ( ) .getAnItem ( ) and
85+ optionsDict .getKey ( ) .( Str_ ) .getS ( ) .matches ( "%verify%" ) and
86+ falseName = optionsDict .getValue ( )
87+ )
9288 }
9389 }
9490}
0 commit comments