diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2011-03-29 19:17:28 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2011-03-29 19:17:28 -0400 |
| commit | 29738f29562013cb97933034649e457c86fb3d2a (patch) | |
| tree | d8e646206f726f8060ceb3d090247e252fc03596 /docs | |
| parent | 2a0a83bbf9a036b89832bdc9c0877d900e215e5c (diff) | |
| download | passlib-29738f29562013cb97933034649e457c86fb3d2a.tar.gz | |
unix_fallback: disabled wildcard support unless explicitly enabled
for security purposes, so as not to surprise new users.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/lib/passlib.hash.unix_fallback.rst | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/docs/lib/passlib.hash.unix_fallback.rst b/docs/lib/passlib.hash.unix_fallback.rst index 982e55f..4870d82 100644 --- a/docs/lib/passlib.hash.unix_fallback.rst +++ b/docs/lib/passlib.hash.unix_fallback.rst @@ -21,16 +21,32 @@ It can be used directly as follows:: >>> uf.encrypt("password") '!' - >>> uf.identify('!') #check if hash is recognized (all hashes are recognized) + >>> #check if hash is recognized (all strings are recognized) + >>> uf.identify('!') + True + >>> uf.identify('*') True >>> uf.identify('') True - >>> uf.verify("password", "") #verify against empty string - all password allowed - True - >>> uf.verify("password", "!") #verify against non-empty string - no passwords allowed + >>> #verify against non-empty string - no passwords allowed + >>> uf.verify("password", "!") + False + + >>> #verify against empty string: + >>> # * by default, no passwords allowed + >>> # * all passwords allowed IF enable_wildcard=True + >>> uf.verify("password", "") False + >>> uf.verify("password", "", enable_wildcard=True) + True Interface ========= .. autoclass:: unix_fallback + +Deviations +========== +According to the Linux ``shadow`` man page, an empty string is treated +as a wildcard by Linux, allowing all passwords. For security purposes, +this behavior is not enabled unless specifically requested by the application. |
