Skip to content

Commit

Permalink
Revert "Make the redirector return false and catch a UnicodeDecode er…
Browse files Browse the repository at this point in the history
…ror if a URL"

This reverts commit c44189b.
  • Loading branch information
Timo Stollenwerk committed Jun 19, 2012
1 parent c44189b commit d8ae884
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
4 changes: 0 additions & 4 deletions CHANGES.txt
Expand Up @@ -10,10 +10,6 @@ Changelog
- Move tests from PloneTestCase to plone.app.testing.
[timo]

- Make the redirector return false and catch a UnicodeDecode error if a URL
contains illegal characters.
[timo]


1.1.3 (2012-05-07)
------------------
Expand Down
8 changes: 1 addition & 7 deletions plone/app/redirector/storage.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from zope.interface import implements

from persistent import Persistent
Expand Down Expand Up @@ -270,12 +269,7 @@ def has_path(self, old_path):

def get(self, old_path, default=None):
old_path = self._canonical(old_path)
try:
return self._paths.get(old_path, default)
except UnicodeDecodeError:
# Always return False if the URL contains illegal characters and
# can not be decoded.
return False
return self._paths.get(old_path, default)

def redirects(self, new_path):
new_path = self._canonical(new_path)
Expand Down

0 comments on commit d8ae884

Please sign in to comment.