Skip to content

Commit 907a41c

Browse files
committed
Another update endpoint security fix
1 parent 7857352 commit 907a41c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/jekylledit/controllers/site.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def update(site_id):
242242
if sha_name != 'sha1':
243243
abort(501)
244244

245-
mac = hmac.new(str(secret), msg=request.data, digestmod=sha1)
245+
mac = hmac.new(bytes(secret, 'utf-8'), msg=request.data, digestmod=sha1)
246246
if not hmac.compare_digest(str(mac.hexdigest()), str(signature)):
247247
abort(403)
248248
else:

0 commit comments

Comments
 (0)