Skip to content

Commit c8c4d17

Browse files
Bernhard ReiterBernhard Reiter
authored andcommitted
issue2550715: IndexError when requesting non-existing file via http.
Reported and fixed by Cédric Krier.
1 parent 212f86a commit c8c4d17

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Entries without name were done by Richard Jones.
88
Features:
99
Fixed:
1010

11+
issue2550715: IndexError when requesting non-existing file via http.
12+
Reported and fixed by C�dric Krier. (Bernhard)
13+
1114
issue2550695: 'No sort or group' settings not retained when editing queries.
1215
Reported and fixed by John Kristensen. Tested by Satchidanand Haridas.
1316
(Bernhard)

roundup/cgi/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,10 @@ def serve_file(self, designator, dre=re.compile(r'([^\d]+)(\d+)')):
920920
raise Unauthorised(self._("You are not allowed to view "
921921
"this file."))
922922

923-
mime_type = klass.get(nodeid, 'type')
923+
try:
924+
mime_type = klass.get(nodeid, 'type')
925+
except IndexError, e:
926+
raise NotFound(e)
924927
# Can happen for msg class:
925928
if not mime_type:
926929
mime_type = 'text/plain'

0 commit comments

Comments
 (0)