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 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changeset.py
Show inline comments
 
@@ -72,13 +72,16 @@ def anchor_url(revision, path, GET):
 

	
 

	
 
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:
 
        try:
 
        return int(ig_ws[0].split(':')[-1])
 
        except ValueError:
 
            raise HTTPBadRequest()
 
    return ig_ws_global
 

	
 

	
 
def _ignorews_url(GET, fileid=None):
 
    fileid = str(fileid) if fileid else None
 
    params = defaultdict(list)
0 comments (0 inline, 0 general)