diff options
author | fragonib <devnull@localhost> | 2011-05-30 23:29:34 +0200 |
---|---|---|
committer | fragonib <devnull@localhost> | 2011-05-30 23:29:34 +0200 |
commit | c600bbc3ab7c6fe22d213108086a44ad8f929ca4 (patch) | |
tree | d393dd647df212ba94264ead42032dacfb8581e3 /module/web/json_app.py | |
parent | Serveral Plugins: Clean up (diff) | |
download | pyload-c600bbc3ab7c6fe22d213108086a44ad8f929ca4.tar.xz |
Support for positional captchas
Diffstat (limited to 'module/web/json_app.py')
-rw-r--r-- | module/web/json_app.py | 8 |
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} |