Opened 18 years ago
Last modified 17 years ago
#63 closed enhancement
support htpasswd with Windows and Python 2.3 — at Version 2
| Reported by: | sid|at|seegrid.com | Owned by: | Matt Good |
|---|---|---|---|
| Priority: | high | Component: | AccountManagerPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Matt Good | Trac Release: | 0.10 |
Description (last modified by )
Change password fails on Windows if running Python 2.3:
Traceback (most recent call last):
File "C:\Python23\Lib\site-packages\trac\web\modpython_frontend.py", line 205, in handler
dispatch_request(mpr.path_info, mpr, env)
File "C:\Python23\Lib\site-packages\trac\web\main.py", line 139, in dispatch_request
dispatcher.dispatch(req)
File "C:\Python23\Lib\site-packages\trac\web\main.py", line 107, in dispatch
resp = chosen_handler.process_request(req)
File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 48, in process_request
File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 64, in _do_change_password
File "build\bdist.win32\egg\acct_mgr\htfile.py", line 49, in set_password
File "build\bdist.win32\egg\acct_mgr\htfile.py", line 102, in userline
File "build\bdist.win32\egg\acct_mgr\htfile.py", line 75, in salt
File "build\bdist.win32\egg\acct_mgr\htfile.py", line 30, in urandom
IOError: [Errno 2] No such file or directory: '/dev/urandom'
I saw another site hinted at using windrandom.pyd file for Windows for Python 2.3 (although it is deprecated in 2.4 in favor of os.urandom).
Change History (2)
comment:1 Changed 18 years ago by
| Status: | new → assigned |
|---|---|
| Summary: | Change password fails on Windows with Python 2.3 → support htpasswd with Windows and Python 2.3 |
| Type: | defect → enhancement |
comment:2 Changed 18 years ago by
| Description: | modified (diff) |
|---|
Note: See
TracTickets for help on using
tickets.



Ok, I didn't find a reasonable way to generate cryptographically sound random data on Windows with Python 2.3, but that winrandom module may work. Can you try it with the following patch:
acct_mgr/htfile.py
Also, note that
htdigestdoes not require random data so it could be used instead ofhtpasswd.