Update TimingAttackAgainstHeader.py

This commit is contained in:
Ahmed Farid
2022-08-16 12:06:34 +01:00
committed by GitHub
parent 68cf084b8f
commit abc49bd62b

View File

@@ -17,8 +17,8 @@ def bad():
@app.route('/good')
def good():
Secret = request.headers.get('X-Auth-Token')
if not hmac.compare_digest(Secret, "token"):
tok = request.headers.get('X-Auth-Token')
if not hmac.compare_digest(tok, "token"):
raise Exception('bad token')
return 'good'