Opened 13 years ago

Last modified 13 years ago

#194 closed defect (FIXED)

email validation assumes user is logged in

Reported by: Caleb Davis Owned by: Caleb Davis
Priority: minor Milestone: 0.0.5
Component: programming Keywords:
Cc: Parent Tickets:


When the user clicks their email validation link, a userid and a
token are sent in the querystring. However, in line 160 of
mediagoblin/auth/, we are redirecting according to the
'username' session variable.

If the user is not logged in, the following traceback ensues:


    Exception happened during processing of request from ('', 2850)
    Traceback (most recent call last):
      File "/home/ubuntu/src/mediagoblin/eggs/Paste-", line 1068, in process_request_in_thread
        self.finish_request(request, client_address)
      File "/usr/lib/python2.6/", line 320, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "/usr/lib/python2.6/", line 615, in __init__
      File "/home/ubuntu/src/mediagoblin/eggs/Paste-", line 442, in handle
      File "/usr/lib/python2.6/", line 329, in handle
      File "/home/ubuntu/src/mediagoblin/eggs/Paste-", line 437, in handle_one_request
      File "/home/ubuntu/src/mediagoblin/eggs/Paste-", line 287, in wsgi_execute
      File "/home/ubuntu/src/mediagoblin/eggs/Paste-", line 203, in __call__
        return app(environ, start_response)
      File "/home/ubuntu/src/mediagoblin/eggs/Beaker-1.5.4-py2.6.egg/beaker/", line 152, in __call__
        return self.wrap_app(environ, session_start_response)
      File "/home/ubuntu/src/mediagoblin/mediagoblin/", line 141, in __call__
        return controller(request)(environ, start_response)
      File "/home/ubuntu/src/mediagoblin/mediagoblin/auth/", line 160, in verify_email
    TypeError: 'NoneType' object is unsubscriptable

Change History (3)

comment:1 by Caleb Davis, 13 years ago

Status: NewFeedback
username will be empty if the user is not logged in. It would be
preferable to redirect in this line without depending on the
session state

`\_requests/15 <>`_

comment:2 by Christopher Allan Webber, 13 years ago

Component: Programming
Status: FeedbackClosed
Merged! Thanks!

comment:3 by Will Kahn-Greene, 12 years ago

The original url for this bug was .

Note: See TracTickets for help on using tickets.