mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Update SafeComparisonOfHeaderValue.py
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
from flask import Flask
|
||||
from flask import request
|
||||
|
||||
@app.route('/good1')
|
||||
@app.route('/good')
|
||||
def good1():
|
||||
Secret = request.headers.get('X-Auth-Token')
|
||||
if not hmac.compare_digest("secret", "token"):
|
||||
secret = request.headers.get('X-Auth-Token')
|
||||
if not hmac.compare_digest(secret, "token"):
|
||||
raise Exception('bad token')
|
||||
return 'good'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user