# HG changeset patch # User Andrew Shadura # Date 2015-02-26 16:44:47 # Node ID 5a1cd703a888b03cc0a65ecf44dba6d8645a0a8d # Parent 66d6dc56479bbe8c1fd5077b5705e2d6b9ee73db changeset: don't crash on malformed whitespace parameter - return 400 Bad Request diff --git a/kallithea/controllers/changeset.py b/kallithea/controllers/changeset.py --- a/kallithea/controllers/changeset.py +++ b/kallithea/controllers/changeset.py @@ -75,7 +75,10 @@ def get_ignore_ws(fid, GET): ig_ws_global = GET.get('ignorews') ig_ws = filter(lambda k: k.startswith('WS'), GET.getall(fid)) if ig_ws: - return int(ig_ws[0].split(':')[-1]) + try: + return int(ig_ws[0].split(':')[-1]) + except ValueError: + raise HTTPBadRequest() return ig_ws_global