diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-10 23:43:10 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-10 23:43:10 +0100 |
commit | 2b353fa266c13b77b2c77af797dc28c8380b9443 (patch) | |
tree | db1e1b9f67cf87ffb711f91c643d665bae1bee8a /module/web | |
parent | thrift + setup fixes (diff) | |
download | pyload-2b353fa266c13b77b2c77af797dc28c8380b9443.tar.xz |
more fixes
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/json_app.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/module/web/json_app.py b/module/web/json_app.py index 12b7fa8ce..f10c09498 100644 --- a/module/web/json_app.py +++ b/module/web/json_app.py @@ -212,7 +212,8 @@ def link_order(ids): def add_package(): name = request.forms['add_name'] queue = int(request.forms['add_dest']) - links = request.forms['add_links'].split("\n") + links = request.forms['add_links'].decode("utf8", "ignore") + links = links.split("\n") pw = request.forms.get("add_password", "").strip("\n\r") try: @@ -232,11 +233,14 @@ def add_package(): if name is None or name == "": return HTTPError() + name = name.decode("utf8", "ignore") + links = map(lambda x: x.strip(), links) links = filter(lambda x: x != "", links) pack = PYLOAD.add_package(name, links, queue) if pw: + pw = pw.decode("utf8", "ignore") data = {"password": pw} PYLOAD.set_package_data(pack, data) |