#1022: IdentityFailure Redirect - Cherrypy causes 500 error if passing compound
form values
----------------------+-----------------------------------------------------
Reporter: Naomi | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 1.0b3
Component: Identity | Version: 0.9a6
Severity: major | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Comment (by fumanchu):
{{{
This should be an easy fix: either only call
applyFilters('before_main') the first time,
or put a check into decodingfilter.py to make
sure you're not trying to decode a dictionary.
}}}
Well, you don't want ''all'' before_main filters to be affected. The
proper fix is actually in-between: rewrite just DecodingFilter.before_main
to return if it's run more than once:
{{{
#!python
class DecodingFilter(BaseFilter):
"""Automatically decodes request parameters (except uploads)."""
def before_main(self):
conf = cherrypy.config.get
if not conf('decoding_filter.on', False):
return
if getattr(cherrypy.request, "_decoding_attempted", False):
return
cherrypy.request._decoding_attempted = True
}}}
This is even more of a problem in CP 3 (since InternalRedirect may re-
execute more filter hook points than just 'before_main'), and CP 3 should
gain some facility for managing it better. Would it be worth it for the CP
team to patch just this one filter for CP 2.2.2?
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/1022>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---