#520 closed enhancement (fixed)
Missing crypt support on non-Windows systems
Reported by: | Owned by: | Matt Good | |
---|---|---|---|
Priority: | normal | Component: | AccountManagerPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.9 |
Description
From 'man htpasswd' on Linux:
-m Use MD5 encryption for passwords. On Windows, Netware and TPF, this is the default.
-d Use crypt() encryption for passwords. The default on all platforms but Windows, Netware and TPF. Though possibly supported by htpasswd on all platforms, it is not supported by the httpd server on Windows, Netware and TPF.
The attached patch implements system crypt checking in case the existing MD5 check doesn't match the given password.
Tested with Apache 2.2.2, Python 2.4.3, Trac 0.9.6 and AccountManagerPlugin for 0.9.
Attachments (1)
Change History (4)
Changed 18 years ago by
Attachment: | crypt-support.patch added |
---|
comment:1 Changed 18 years ago by
Okay, so in the attached patch returning False from the dummy crypt implementation was not what I really intended to do, but I forgot to change it. You get the point. I'd actually love to see from a real Python programmer what the proper is of dealing with the fact that the crypt Python package is marked as 'Unix' only.
comment:2 Changed 18 years ago by
Status: | new → assigned |
---|---|
Type: | defect → enhancement |
Catching the ImportError
is the recommended way to check for the presence of the crypt module. Your Python intuition is strong already :)
I'll probably change the "return False" to throw an error in the case where you try to use crypt passwords on a Windows system, but the patch looks good.
comment:3 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Patch implementing crypt support for password verification against htpasswd file