summaryrefslogtreecommitdiffstats
path: root/module/web/json_app.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/json_app.py')
-rw-r--r--module/web/json_app.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/web/json_app.py b/module/web/json_app.py
index 39cd81f5f..4b9c91634 100644
--- a/module/web/json_app.py
+++ b/module/web/json_app.py
@@ -317,17 +317,17 @@ def edit_package():
def set_captcha():
if request.environ.get('REQUEST_METHOD', "GET") == "POST":
try:
- PYLOAD.set_captcha_result(request.forms["cap_id"], request.forms["cap_text"])
+ PYLOAD.set_captcha_result(request.forms["cap_id"], request.forms["cap_result"])
except:
pass
- id, binary, typ = PYLOAD.get_captcha_task()
+ id, binary, format, result_type = PYLOAD.get_captcha_task()
if id:
binary = base64.standard_b64encode(str(binary))
- src = "data:image/%s;base64,%s" % (typ, binary)
+ src = "data:image/%s;base64,%s" % (format, binary)
- return {'captcha': True, 'src': src, 'id': id}
+ return {'captcha': True, 'id': id, 'src': src, 'result_type' : result_type}
else:
return {'captcha': False}