Skip to content

Commit

Permalink
Add __traceback_info__ to response.redirect()
Browse files Browse the repository at this point in the history
Reason:

  ValueError: Untrusted redirect to host 'localhost:8080' not allowed.

does not give enough information to see where the app tried to redirect
us.
  • Loading branch information
mgedmin committed Nov 14, 2013
1 parent 5f816a9 commit 9d27ea0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/zope/publisher/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,8 @@ def redirect(self, location, status=None, trusted=False):
# convertable to string, for example, an URLGetter instance
location = str(location)

__traceback_info__ = location

if not trusted:
target_host = extract_host(location)
if target_host:
Expand Down

0 comments on commit 9d27ea0

Please sign in to comment.