From bde24c75563bee1f86eec96ec2bd9adac5b71e29 Mon Sep 17 00:00:00 2001 From: Ian Bicking Date: Tue, 15 Jun 2010 12:30:05 -0500 Subject: Fix XSS attacks as reported by Tim Wintle --- docs/news.txt | 9 +++++++++ paste/httpexceptions.py | 11 +++++------ paste/urlmap.py | 21 ++++++++++----------- paste/util/quoting.py | 7 +++++++ tests/test_urlmap.py | 7 ++++++- tests/test_urlparser.py | 7 +++++++ 6 files changed, 44 insertions(+), 18 deletions(-) diff --git a/docs/news.txt b/docs/news.txt index 7ff0529..3168815 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -3,6 +3,15 @@ News .. contents:: +1.7.4 +----- + +* Fix XSS bug (security issue) with not found handlers for + :class:`paste.urlparser.StaticURLParser` and + :class:`paste.urlmap.URLMap`. If you ask for a path with + ``/-->", status=404) + assert '-->%0D", status=404) + print res + assert 0 + def test_static_parser(): app = StaticURLParser(path('find_file')) testapp = TestApp(app) -- cgit v1.2.1