mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Update TimingAttackAgainstHeader.py
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user