Changeset - 5a1cd703a888
[Not reviewed]
default
0 1 0
Andrew Shadura - 11 years ago 2015-02-26 16:44:47
andrew@shadura.me
changeset: don't crash on malformed whitespace parameter - return 400 Bad Request
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changeset.py
Show inline comments
 
@@ -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
 

	
 

	
0 comments (0 inline, 0 general)