Ticket #1184 (closed defect: wontfix)

Opened 6 years ago

Crash while attempting to access a restricted area

Reported by: Assigned to: johnsons633@sacredheart.edu Chriki normal RestrictedAreaPlugin critical 0.10

Description

Trying to load the page /wiki/restricted gets me this error:

AttributeError: 'NoneType' object has no attribute 'has_permission'


Error Log reports:

2007-02-06 14:13:23,076 Trac[main] ERROR: 'NoneType' object has no attribute 'has_permission'
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 387, in dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 176, in dispatch
chosen_handler = self._pre_process_request(req, chosen_handler)
File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 264, in _pre_process_request
chosen_handler = f.pre_process_request(req, chosen_handler)
File "build/bdist.linux-i686/egg/restrictedarea/filter.py", line 26, in pre_process_request
AttributeError: 'NoneType' object has no attribute 'has_permission'


Using Trac 0.10.2

Change History

02/07/07 10:06:22 changed by Chriki

• status changed from new to closed.
• resolution set to wontfix.

Thanks for your bug report. Unfortunately I can only recommend you to upgrade to the latest Trac version 0.10.3.

I've looked into the problem but can't find the actual cause for it. Obviously in Trac 0.10.2 the Request object req which is being passed to my IRequestFilter method pre_process_request doesn't have the perm field set appropriately. As I'm using the has_permission method of perm, the reported error occurs. I'm not really sure wether this was a Trac bug in 0.10.2 that somehow got fixed in 0.10.3 or wether I'm doing something wrong in the plugin. For the moment I'm assuming the former. If somebody reading this knows the cause, then I'd appreciate to hear it!

02/07/07 10:26:24 changed by Chriki

I've added a clear error message in r1928 for users that have this problem.

04/18/07 17:09:55 changed by zregvart@gmail.com

Had this in trac 0.10.3, fixed it by upgrading the Web Admin plugin to 0.1.2.4429 (current freebsd port version)

Add/Change #1184 (Crash while attempting to access a restricted area)

Change Properties