Skip to content

Commit 7b51b91

Browse files
committed
Improve test
1 parent ed60d16 commit 7b51b91

File tree

1 file changed

+5
-6
lines changed
  • python/ql/test/experimental/query-tests/Security/CWE-347

1 file changed

+5
-6
lines changed

python/ql/test/experimental/query-tests/Security/CWE-347/python_jwt.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
# GOOD
44

5-
token1 = "1"
6-
python_jwt.process_jwt(token1)
7-
python_jwt.verify_jwt(token1, "key", "HS256")
5+
def good1(token):
6+
python_jwt.process_jwt(token)
7+
python_jwt.verify_jwt(token, "key", "HS256")
88

99
# BAD
1010

11-
# no call to verify_jwt
12-
token2 = "123"
13-
python_jwt.process_jwt(token2)
11+
def bad(token):
12+
python_jwt.process_jwt(token)

0 commit comments

Comments
 (0)