From db3b6ba2d0f7a543bc37e855c78316fae089da8f Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Wed, 22 May 2013 10:30:42 -0400 Subject: [PATCH] foodforus: move api_key to end of signature --- modules/foodforus.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/foodforus.py b/modules/foodforus.py index 5a4487a..4d769b4 100644 --- a/modules/foodforus.py +++ b/modules/foodforus.py @@ -14,11 +14,12 @@ API_URL = 'http://foodfor.vtluug.org' def _sign_vote(api_key, args): - data = "ffu0" + api_key + data = "ffu1" for k, v in sorted(args.items()): if k == 'sig': continue data += '{0}{1}'.format(k, v) + data += api_key h = hashlib.sha256() h.update(data.encode('utf-8')) return h.hexdigest()