From 9f0111f85cd14f3f067044b59b93e2856c99d542 Mon Sep 17 00:00:00 2001 From: vangheem Date: Thu, 10 Sep 2015 12:11:47 -0500 Subject: [PATCH] Apply hotfixes from https://pypi.python.org/pypi/Products.PloneHotfix20150910 --- Products/CMFPlone/URLTool.py | 3 +++ Products/CMFPlone/patches/__init__.py | 8 +++++++ Products/CMFPlone/patches/addMember.py | 8 +++++++ Products/CMFPlone/patches/kupu.py | 22 +++++++++++++++++++ Products/CMFPlone/tests/testCSRFProtection.py | 15 ++++++++++--- Products/CMFPlone/tests/testURLTool.py | 9 ++++++++ docs/CHANGES.rst | 3 +++ 7 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 Products/CMFPlone/patches/addMember.py create mode 100644 Products/CMFPlone/patches/kupu.py diff --git a/Products/CMFPlone/URLTool.py b/Products/CMFPlone/URLTool.py index 9cb669581e..bb0b9e8c0e 100644 --- a/Products/CMFPlone/URLTool.py +++ b/Products/CMFPlone/URLTool.py @@ -30,6 +30,9 @@ def isURLInPortal(self, url, context=None): """ # sanitize url url = re.sub('^[\x00-\x20]+', '', url).strip() + if ('alert("hi");')) + self.assertFalse( + self.portal.portal_url.isURLInPortal('%3Cscript%3Ealert(%22hi%22)%3B%3C%2Fscript%3E')) + + def test_inline_url_not_in_portal(self): + self.assertFalse(self.portal.portal_url.isURLInPortal('javascript%3Aalert(3)')) + self.assertFalse(self.portal.portal_url.isURLInPortal('javascript:alert(3)')) diff --git a/docs/CHANGES.rst b/docs/CHANGES.rst index fa6bf2c9b5..162e415db1 100644 --- a/docs/CHANGES.rst +++ b/docs/CHANGES.rst @@ -8,6 +8,9 @@ Changelog 4.3.7 (unreleased) ------------------ +- Apply hotfixes from https://pypi.python.org/pypi/Products.PloneHotfix20150910 + [vangheem] + - Do not throw a 404 on site root RSS feeds [vangheem]