Skip to content

Commit e58a0e9

Browse files
committed
Fix adamlaska#179 by catching all exceptions when looking for a
matching command in the database. This is usually not a great idea, but in this case it's better to redirect to the "base url" of the tool than to throw an exception. - Legacy-Id: 810
1 parent f5e69fe commit e58a0e9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ietf/redirects/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ def redirect(request, path="", script=""):
4040
pass # it's ok, there's no more-specific request.
4141
except KeyError:
4242
pass # it's ok, request didn't have 'command'.
43+
except:
44+
pass # strange exception like the one described in
45+
# http://merlot.tools.ietf.org/tools/ietfdb/ticket/179 ?
46+
# just ignore the command string.
4347
if cmd is not None:
4448
remove_args.append('command')
4549
if cmd.url:

0 commit comments

Comments
 (0)