Opened 12 years ago
Closed 12 years ago
#10134 closed defect (fixed)
httpauth login throws traceback
Reported by: | tekknokrat | Owned by: | Steffen Hoffmann |
---|---|---|---|
Priority: | normal | Component: | AccountManagerPlugin |
Severity: | normal | Keywords: | traceback recursion httpauth loginform |
Cc: | tekknokrat, Ryan J Ollos | Trac Release: | 0.11 |
Description
Current trunk throws a traceback like attached if a wrong password is supplied.
Attachments (2)
Change History (11)
Changed 12 years ago by
Attachment: | traceback.log added |
---|
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
What I see from your traceback is an recursion in urllib2
.
Maybe there is something wrong in the way we call both, simple and digest auth handlers at once. The HTTP401 on digest authentication seems to recall the previous request to basic auth, so it could help to call them in separate try..catch parts. Although I'm not sure how such a grave bug should have survived more than 6 years since the initial implementation in r1534.
Any more insights how your (web server) configuration could be different from many others?
Changed 12 years ago by
Attachment: | 20120705_acctmgr_http-auth_t10134.patch added |
---|
split basic and digest authentication attempts to prevent recusion from second to previous method
comment:3 Changed 12 years ago by
Try this patch please, even if it looks like a clumsy solution and probably could be coded more elegant.
comment:4 Changed 12 years ago by
Cc: | Ryan J Ollos added |
---|---|
Keywords: | needinfo added |
Priority: | normal → low |
Ping.
Not often, that you get a patch within a day after the report, but no feedback afterwards, even not after half a year by now. That's really a disappointment to me.
Anyone remaining interested in fixing this issue? It's unreasonable to assume, that I'll push code I've provided for good, but can't verify on my own. Even if the issue meanwhile has been resolved by other means, it would be fair at minimum to tell it to me.
Drop a comment, please, or I'll certainly drop the issue.
comment:5 Changed 12 years ago by
According to http://bugs.python.org/issue8797, it seems the Python issue. Also, Bitten has the same issue and has fixed in bitten:changeset:974. See bitten:ticket:658.
But I couldn't reproduce it....
comment:6 Changed 12 years ago by
Keywords: | needinfo removed |
---|---|
Priority: | low → normal |
Wonderful, thanks Jun.
That finally casts some light up-on the scenery. So this is a Python bug. Strange encounter, but you gave me valuable pointers, that I'll use to verify my interim solution.
comment:7 Changed 12 years ago by
(In [12408]) AccountManagerPlugin: Use own HTTPBasicAuthHandler under Python 2.6 to avoid recursion in urllib2 (http://bugs.python.org/issue8797), refs #10134.
Special thanks to Jun Omae for pointing at hodgestar's changes to fix this issue for Bitten (bitten:r974).
comment:9 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [12482]) AccountManagerPlugin: Publish maintenance release 0.4.1, closes #5964, #8545, #10134, #10625, #10700 and #10701.
This is an update for current stable acct_mgr-0.4 with a number of fixes for issues resolved within the last weeks, i.e.:
- a final fix for Single-Sign-On functionality (refs #9676),
- a long-standing HttpAuth login issue and
- one for
acct_mgr.LoginModule
, that is relevant if used with web-servers, that evaluate the REMOTE_USER environment variable.
Changeset [12468] is included, that may require a Trac db fix-up. Run python ./contrib/fix-session_attribute-failed_logins.py <env> once on any Trac environment, that had account locking enabled with time constraints before.
Btw. everythings fine with a correct password given. Configuration snippets of my setup...
apache2 config:
trac.ini: