Modify ↓
#12172 closed defect (fixed)
AttributeError: 'FakeSession' object has no attribute 'authenticated'
| 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: |
Fixed 'AttributeError: FakeSession' object has no attribute 'authenticated' error, due to missing attributes on |
||
| API Changes: |
|
||
| 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' 62 62 63 63 class FakeSession(dict): 64 64 sid = None 65 authenticated = False 66 last_visit = 0 65 67 def save(self): 66 68 pass 67 69
Attachments (0)
Change History (6)
comment:1 by , 10 years ago
| Milestone: | 1.0.9 → 1.0.10 |
|---|
comment:2 by , 10 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:3 by , 10 years ago
| Milestone: | 1.0.10 → 1.2 |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
Committed to trunk in [14385].
comment:4 by , 10 years ago
| Owner: | changed from to |
|---|
comment:5 by , 10 years ago
| API Changes: | modified (diff) |
|---|
comment:6 by , 9 years ago
| Release Notes: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.



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.