Modify

Opened 5 years ago

Last modified 5 years ago

#5986 new defect

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

Reported by: asterix@… Owned by: k0s
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 (2)

comment:1 Changed 5 years ago by k0s

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

comment:2 Changed 5 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.

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.