[Pypi-checkins] r993 - trunk/pypi
martin.von.loewis
python-checkins at python.org
Thu Nov 24 20:24:11 CET 2011
Author: martin.von.loewis
Date: Thu Nov 24 20:24:11 2011
New Revision: 993
Modified:
trunk/pypi/webui.py
Log:
Catch bogus PATH_INFO.
Modified: trunk/pypi/webui.py
==============================================================================
--- trunk/pypi/webui.py (original)
+++ trunk/pypi/webui.py Thu Nov 24 20:24:11 2011
@@ -533,6 +533,7 @@
items = path.decode('utf-8').split('/')[1:]
except UnicodeError:
raise NotFound(path + " is not UTF-8 encoded")
+ action = None
if path == '/':
self.form['name'] = ''
action = 'index'
@@ -544,6 +545,8 @@
action = 'display'
if len(items) == 3 and items[2]:
action = self.form[':action'] = items[2]
+ if not action:
+ raise NotFound
else:
action = 'home'
More information about the Pypi-checkins
mailing list