Modify

Opened 16 years ago

Closed 12 years ago

#2904 closed defect (wontfix)

authrequired.py not working correctly with 0.11beta2

Reported by: gabriele.garuglieri@… Owned by: Anton Graham
Priority: normal Component: AuthRequiredPlugin
Severity: normal Keywords:
Cc: flatfender@… Trac Release: 0.11

Description

I tried AuthRequiredPlugin with 0.11beta2 and i've seen that it has problems in accessing javascripts and css. Whenever the anonymous access is done it is correctly redirected to /login page, but the problem is that also any access to /chrome/* to download javascripts and css is also intercepted and redirected and they are not downloaded. The result is a completely screwed up and not functional /login page. To prove that i tried to modify authrequired.py as follow:

    def get_navigation_items(self, req):
        if ((req.authname and req.authname != 'anonymous') or \
            req.path_info.startswith('/chrome') or \
            req.path_info.startswith('/login') or \
            req.path_info.startswith('/reset_password') or \
            req.path_info.startswith('/register')):
            return []

Adding the bypass for /chrome prefix allow authrequired.py to work perfectly.

Be aware that this is not a suggested patch, i don't know python (yet) or trac internals and i don't know if this change may have collateral effects. It is just a proof to show the incorrect behavior. Regards, Gabriele

Attachments (0)

Change History (2)

comment:1 Changed 15 years ago by matthew.pusateri@…

Cc: flatfender@… added; anonymous removed

This works fine for me on 0.11 release, haven't tried it on 0.11.2 release

comment:2 Changed 12 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Plugin is deprecated. See the PermRedirectPlugin.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Anton Graham.
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.