Modify

Opened 8 years ago

Closed 5 years ago

#474 closed defect (wontfix)

Nonexistent login pages always fail

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

Description

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@… 8 years ago.
Patch to allow for 404 errors when attempting authentication.

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by adeason@…

Patch to allow for 404 errors when attempting authentication.

comment:1 Changed 5 years ago by coderanger

  • Resolution set to wontfix
  • Status changed from new to closed

Plugin is deprecated.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coderanger. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.