Opened 18 years ago
Closed 16 years ago
#1390 closed defect (fixed)
HTPASSWD custom auth fails under Win2K3
Reported by: | anonymous | Owned by: | Matt Good |
---|---|---|---|
Priority: | high | Component: | AccountManagerPlugin |
Severity: | critical | Keywords: | htpasswd login |
Cc: | Trac Release: | 0.10 |
Description
Configuration:
Win2K3 R2 Ent
Python 2.4
SQLite 3.3X
Trac 0.10.3.1
TracWebAdmin-0.1.2dev_r4240-py2.4.egg (working)
easy_install http://trac-hacks.org/svn/accountmanagerplugin/0.10
trac.ini relevant sections:
[components]
trac.web.auth.loginmodule = disabled
acct_mgr.admin.accountmanageradminpage = enabled
acct_mgr.api.accountmanager = enabled
acct_mgr.db.sessionstore = enabled
acct_mgr.htfile.abstractpasswordfilestore = enabled
acct_mgr.htfile.htdigeststore = disabled
acct_mgr.htfile.htpasswdstore = enabled
acct_mgr.http.httpauthstore = disabled
acct_mgr.pwhash.htdigesthashmethod = disabled
acct_mgr.pwhash.htpasswdhashmethod = enabled
acct_mgr.web_ui.accountmodule = enabled
acct_mgr.web_ui.loginmodule = enabled
acct_mgr.web_ui.registrationmodule = enabled
webadmin.* = enabled
[account-manager]
password_store = HtPasswdStore
password_file = D:\TracRoot\logins.txt
Upon launch of trac STANDALONE server
(python C:\Python24\Scripts\tracd --port 8000 D:\TracRoot\Project)
and entering CORRECT login the crash occurs:
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 387, in dispatch_request
dispatcher.dispatch(req)
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 182, in dispatch
req.authname = self.authenticate(req)
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 146, in authenticate
authname = authenticator.authenticate(req)
File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 334, in wrap File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 344, in authenticate File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 371, in _remote_user File "build\bdist.win32\egg\acct_mgr\api.py", line 104, in check_password File "build\bdist.win32\egg\acct_mgr\htfile.py", line 72, in check_password File "build\bdist.win32\egg\acct_mgr\htfile.py", line 138, in _check_userline File "build\bdist.win32\egg\acct_mgr\pwhash.py", line 94, in htpasswd
NotImplementedError: The "crypt" module is unavailable on this platform.
However, if the login is INCORRECT, no crash occurs and appropriate message is shown.
Attachments (0)
Change History (3)
comment:1 Changed 18 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 Changed 16 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Also check run.bat for start trac standalone
For example;
This is our run.bat
C:\Development\Python24\Python.exe C:\Development\Python24\Scripts\tracd --port 9000 --auth=javaloper,C:\Development\Trac\Javaloper\trac.htdigest,trac C:\Development\Trac\Javaloper
be carefull --auth=.... because if you didnt give same name which is project name 'for us javaloper', you can get same error like '..NotImplementedError?: The "crypt" module is unavailable on this platform. '
ciao.
As it seems, one must use Apache's htpasswd to generate passwords; numerous web-based generators skip the header of the hash causing hash-test to revert to crypt() on Win32