Modify

Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#1184 closed defect (wontfix)

Crash while attempting to access a restricted area

Reported by: johnsons633@… Owned by: Christian Spurk
Priority: normal Component: RestrictedAreaPlugin
Severity: critical Keywords:
Cc: Trac Release: 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

Attachments (0)

Change History (3)

comment:1 Changed 18 years ago by Christian Spurk

Resolution: wontfix
Status: newclosed

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!

comment:2 Changed 18 years ago by Christian Spurk

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

comment:3 Changed 18 years ago by Zoran Regvart

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Spurk.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.