Edgewall Software

Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#12172 closed defect (fixed)

AttributeError: 'FakeSession' object has no attribute 'authenticated' — at Version 5

Reported by: Ryan J Ollos Owned by: Jun Omae
Priority: normal Milestone: 1.2
Component: web frontend Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:

FakeSession has attributes of DetachedSession.

Internal Changes:

Description

This was initially reported in comment:11:ticket:12129.

2015-07-27 04:09:41,414 Trac[main] ERROR: Exception caught while post-processing request:
Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 274, in dispatch
    self._post_process_request(req)
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 387, in _post_process_request
    f.post_process_request(req, *(None,)*extra_arg_count)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracAccountManager-0.4.3-py2.6.egg/acct_mgr/register.py", line 509, in post_process_request
    if not req.session.authenticated:
AttributeError: 'FakeSession' object has no attribute 'authenticated'
2015-07-27 04:09:41,415 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 551, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 209, in dispatch
    self._pre_process_request(req, chosen_handler)
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 372, in _pre_process_request
    chosen_handler = filter_.pre_process_request(req, chosen_handler)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracAccountManager-0.4.3-py2.6.egg/acct_mgr/register.py", line 479, in pre_process_request
    if not req.session.authenticated:
AttributeError: 'FakeSession' object has no attribute 'authenticated'

The proposed fix is:

  • trac/web/main.py

    diff --git a/trac/web/main.py b/trac/web/main.py
    index 909d75ec0..728141655 100644
    a b default_tracker = 'http://trac.edgewall.org'  
    6262
    6363class FakeSession(dict):
    6464    sid = None
     65    authenticated = False
     66    last_visit = 0
    6567    def save(self):
    6668        pass
    6769

Change History (5)

comment:1 by Ryan J Ollos, 9 years ago

Milestone: 1.0.91.0.10

Moving tickets that appear to be uncompleted for milestone:1.0.9. Please move back to milestone:1.0.9 if the ticket can be completed by 2015-09-07 18:00 UTC.

comment:2 by Ryan J Ollos, 8 years ago

Owner: set to Ryan J Ollos
Status: newassigned

comment:3 by Ryan J Ollos, 8 years ago

Milestone: 1.0.101.2
Resolution: fixed
Status: assignedclosed

Committed to trunk in [14385].

comment:4 by Ryan J Ollos, 8 years ago

Owner: changed from Ryan J Ollos to Jun Omae

comment:5 by Ryan J Ollos, 8 years ago

API Changes: modified (diff)
Note: See TracTickets for help on using tickets.