Opened 12 years ago

Closed 9 years ago

#474 closed defect (wontfix)

Nonexistent login pages always fail

Reported by: adeason@… Owned by: Noah Kantrowitz
Priority: normal Component: AuthFormPlugin
Severity: normal Keywords: patch
Cc: Trac Release: 0.9


If the login_path (specified in [authform] in trac.ini using the patch from #125) path does not exist, authform will get a 404 error trying to retrieve that page on successful login. This causes urllib2.urlopen() (and therefore _try_http_auth) to throw an exception, making authform think that authentication failed. So, if /login does not exist on a site, and the user authenticated successfully, a 404 error will cause the login page to say that the login failed anyway.

The attached patch catches a urllib2.HTTPError instead of an IOError, and detects for and accepts a 404 error if it occurs. Otherwise, it indicates a failed login like normal.

Attachments (1)

nonexist.diff (1.1 KB) - added by adeason@… 12 years ago.
Patch to allow for 404 errors when attempting authentication.

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by adeason@…

Attachment: nonexist.diff added

Patch to allow for 404 errors when attempting authentication.

comment:1 Changed 9 years ago by Noah Kantrowitz

Resolution: wontfix
Status: newclosed

Plugin is deprecated.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.