Modify

Opened 15 years ago

Last modified 9 years ago

#5986 new defect

req.args.get('email') returns a list

Reported by: asterix@… Owned by:
Priority: normal Component: CaptchaAuthPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I don't know where the bug is, but captcha plugin fails when an anonymous user try to create (or just preview) a ticket.

here is the traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 444, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 175, in dispatch
    chosen_handler)
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 295, in _pre_process_request
    chosen_handler = filter_.pre_process_request(req, chosen_handler)
  File "/usr/lib/python2.5/site-packages/CaptchaAuth-0.6-py2.5.egg/captchaauth/auth.py", line 98, in pre_process_request
    name, email = self.identify(req)
  File "/usr/lib/python2.5/site-packages/CaptchaAuth-0.6-py2.5.egg/captchaauth/auth.py", line 378, in identify
    email = req.args.get('email', '').strip()
AttributeError: 'list' object has no attribute 'strip'

After some debugging, req.args.get('email', ) returns a list like that [u, u'test@…'] if I put test@… in email field.

trac-0.11.5 accountManager-0.2.1dev-r4679

Attachments (0)

Change History (3)

comment:1 Changed 15 years ago by Jeff Hammel

is there some other email field on the page that could cause this to be multi-valued?

comment:2 Changed 15 years ago by asterix

no there is not. email field contains only one email, no space arround. I tested to add emails to CC fielld, but that changes nothing: They don't appear in the email field.

comment:3 Changed 9 years ago by Ryan J Ollos

Owner: Jeff Hammel deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.