summaryrefslogtreecommitdiff
path: root/passlib/apache.py
Commit message (Collapse)AuthorAgeFilesLines
* py39 compat - fixed some uneeded escape sequencesEli Collins2020-10-031-2/+2
|
* passlib.apache: adjust default context to use "2y" bcrypt hashes instead of "2b"Eli Collins2019-11-111-2/+11
| | | | | | | (fixes issue 95). also added UT which checks behavior against locally-installed 'htpasswd' tool (if available).
* passlib.apache: updated internal commentsEli Collins2017-01-301-4/+4
|
* docs: minor wording corrections, replaced 'encrypt' with 'hash' in a bunch ↵Eli Collins2016-11-251-2/+2
| | | | of places.
* passlib.utils: relocated a bunch of properties & decorators to .utils.decorEli Collins2016-11-221-1/+2
|
* passlib.apache: reduce spam by delaying 'no bcrypt backend' errorEli Collins2016-11-201-3/+11
| | | | until a default scheme that would be affects is actually used.
* bugfix: passlib.apache: catch missing bcrypt backend, issue warning, use ↵Eli Collins2016-11-201-4/+12
| | | | next best choice.
* passlib.apache: updated htpasswd_context to support apache 2.4 & native os ↵Eli Collins2016-11-191-35/+110
| | | | | | | | | schemes. Expanded preset aliases to make it easier to pick desired behavior for htpasswd_context; picks strongest available hash for various different purposes: whether using apache 2.2 / 2.4, and whether output should be host-specific or portable.
* bugfix: passlib.apache: py3 compat fixEli Collins2016-06-111-2/+3
|
* passlib.apache: drastically rewrote parsing & rendering codeEli Collins2016-06-111-48/+169
| | | | | | | * now preserves whitespace & comments to match htpasswd. * now warns about & skips duplicate entries for same user. * added semi-private .set_hash() helpers for writing hash directly. * some internal cleanups to Htdigest's realm handling
* .encrypt() method renamed to .hash(), other api cleanupsEli Collins2016-06-101-2/+2
| | | | | | | | | | | | | | | | .encrypt() ---------- hash.encrypt() & context.encrypt() have been renamed to .hash(). this should take care of the long-standing issue 21 (the poor naming of .encrypt). per docs, legacy aliases will remain in place until passlib 2.0. .genhash() / .genconfig() ------------------------- taking advantage of this reorganization to also deprecate .genconfig() and .genhash() -- they're not really useful in a modern system, nor as needed for historical support as initially thought: .genconfig() will be retired completely in passlib 2.0; .genhash() is rolled into the new .hash() method along with .encrypt().
* Merge from stableEli Collins2015-07-221-11/+43
|\
| * HtpasswdFile's default context now recognized bcrypt, sha256_crypt (fixes ↵Eli Collins2015-07-201-11/+43
| | | | | | | | | | | | issue 55); also added default_scheme="portable" to ease transition to passlib 1.7's new default behavior.
| * style cleanups (transplant of rc94c6072a652 in default)Eli Collins2013-12-271-19/+19
| |
| * massive cleanup of documentation typos, thanks to Thomas Waldmann (issue 27, ↵Eli Collins2013-12-271-1/+1
| | | | | | | | comment 7) (transplant of r1f5b8860b743 from default branch)
* | added the official OrderedDict backport, replaced existing refsEli Collins2015-01-101-35/+1
| |
* | removed a LOT of compatibility shims -- dropped python 2.5, 3.0, and 3.1 ↵Eli Collins2015-01-101-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support; as well as PyPy 1.x and Jython 2.5. shims removed ------------- * b() shim replaced with b'' (py25) * 'bytes' alias no longer needed (py25) * callable() shim no longer needed (py30,31) * PY_MIN_32 flag replaced with PY3 flag (py30,31) * removed 'abc' module stub used by passlib.ifc (py25) * removed chain_from_iterable() backport (py25) * tests: removed catch_warnings() backport, replaced refs with real warnings.catch_warnings() (py25) * tests: removed unittest2 backports (py25, py30, py31) -- now throw hard error if unittest2 not present under py26 (the only release remaining which lacks the unittest2 features) * removed SUPPORTS_DIR_METHOD conditional (py25, pypy 1.x) * some other minor workarounds other ----- * added check in passlib.compat which now throws error telling user version isn't supported (to prevent spurious errors later)
* | removed some unused importsEli Collins2013-04-091-5/+3
| |
* | style cleanupsEli Collins2013-04-091-19/+19
| |
* | massive cleanup of documentation typos, thanks to Thomas Waldmann (issue 27, ↵Eli Collins2013-04-061-1/+1
|/ | | | comment 7)
* project-wide whitespace & comment cleanup (it's been a couple of years)Eli Collins2012-08-011-53/+52
|
* md5_crypt deprecated by author, updated docs accordinglyEli Collins2012-06-271-1/+5
|
* loads of documentation updatesEli Collins2012-05-011-3/+63
|
* moved is_ascii_codec() helper to utilsEli Collins2012-05-011-9/+1
|
* fleshed out passlib.apache tests; small bugfixe to moduleEli Collins2012-04-301-1/+2
|
* excluded some branches from coverageEli Collins2012-04-301-3/+3
|
* updated front matter and other documentationEli Collins2012-04-271-11/+16
|
* renamed 'errname' to 'param' for to_unicode, etc; to match some of the other ↵Eli Collins2012-04-271-4/+4
| | | | helper functions
* CryptPolicy deprecated, part2 - updated rest of library to use CryptContext ↵Eli Collins2012-04-171-1/+1
| | | | directly
* updated passlib.apache module's api - more flexible to use, changed some ↵Eli Collins2012-04-171-349/+793
| | | | ambiguous method names
* updated test support & py3 compat code from an external libraryEli Collins2012-03-121-2/+2
| | | | | | | | | | | | | | | | passlib.tests ------------- * deprecated support for unittest 1... accumulated too many backports, planning to require unittest2 in next release. * case_prefix renamed to shortDescription * test case now archives & clears warning registry state in addition to warning filter state passlib.utils.compat -------------------- * a bunch of the bytes-related functions were renamed for clarity * NativeStringIO alias added * trange alias merged into irange
* misc bugfixes from round of changesEli Collins2012-01-181-2/+2
| | | | | | | | | * added str_to_[ub]ascii to wrap hexdigest() calls * fixed some h64big calls I missed * some py3 fixes * removed utils.compat.aliases, using overlay to replace real compat module instead (to agree w/ imports already in code)
* import cleanupsEli Collins2012-01-181-3/+2
| | | | | | | | | | | | | | | * moved bytes compat functions from utils to utils.compat (bord, bjoin, bjoin_ints, bjoin_elems, ujoin) * renamed bord -> belem_ord for clarify * a bunch of to_native_str() always use ascii, and have fixed input types (always bytes or always unicode). these don't need overhead of to_native_str(), so replaced those calls with two new funcs: compat.bascii_to_str() / compat.uascii_to_str() * cleaned up a lot of imports from utils/utils.compat to pull from correct module * simplified the to_string() logic of a bunch of handlers to reduce unicode<->byte transitions
* couple of minor tweaks - basic unittests pass 2.7 & 3.2Eli Collins2011-12-061-1/+1
|
* ran a custom 2to3 fixer to replace all u"" with u() and add an import from ↵Eli Collins2011-12-061-2/+2
| | | | compat.u
* added compat.unicode imports in a number of placesEli Collins2011-12-061-2/+2
| | | | | | | | this distinguishes the types, so that for isinstance() tests... * 'unicode' always means the unicode type * 'bytes' always means the bytes type * 'str' always means the native string type
* added compatibility module (passlib.utils.compat)Eli Collins2011-12-061-3/+4
| | | | | | | | | exports specialized range & map aliases, and some dict helpers * all dict.iteritems() calls replaced with compat.iteritems(dict) * all xrange() calls replaced with compat.irange() * all range() calls replaced with compat.trange() and compat.lrange() as appropriate * all map() calls replaced with compat.lmap()
* branch exploring feasibility of removing need for 2to3Eli Collins2011-12-061-1/+1
| | | | this commit just fixes some error raises
* all verify() methods now use "constant time" comparison function (see ↵Eli Collins2011-12-011-2/+4
| | | | CHANGELOG for details)
* GAE compatibility fix: changed apache UTs to not rely on filesystem.Eli Collins2011-08-121-3/+36
| | | | | | * added private constructor Htpasswd._from_string(), will clean it up and make public in future * most apache tests now use _from_string() so they don't have to write to fs * tests which still require writing to fs (mainly the autoload tests) now skipped for GAE
* removed duplicate code inside passlib.apacheEli Collins2011-07-271-10/+12
|
* stripped trailing whitespace from a bunch of filesEli Collins2011-07-081-20/+20
|
* updated changelog to include python 3 compat; various other documentation ↵Eli Collins2011-06-291-23/+1
| | | | updates
* apache module rewritten for py3 compatEli Collins2011-06-201-53/+183
| | | | | | | | * added 'encoding' kwd to Htpasswd, Htdigest constructors, allowing user/realm encoding to be specified. * treats file as bytes internally * added UTs for encoding-specific behavior * added render_bytes() util helper - py2/3 compatible replacement for using % formatting with bytes
* replaced "raise exc, msg" with "raise exc(msg)" everywhere (working on py3k ↵Eli Collins2011-03-281-6/+6
| | | | compat, changes made by 2to3)
* split passlib.base into passlib.registry & passlib.context - the two have ↵Eli Collins2011-03-221-1/+1
| | | | little to do with eachother
* documentation work & rearrangingEli Collins2011-03-221-1/+1
| | | | | | | | | | ================================ * added documentation for overview, ldap digests * lots of other documentation updates * renamed passlib.unix -> passlib.hosts * renamed passlib.sqldb -> passlib.servers * added passlib.servers.custom_app_context for quickstart purposes * added ldap {CLEARTEXT} support
* passlib.apache: improved interface; added docs & UTs (all passlib.apache uts ↵Eli Collins2011-03-171-50/+234
| | | | pass)
* apache & misc workEli Collins2011-03-151-11/+181
| | | | | | | | ================== * added prelim helpers for htpasswd & htdigest * bugfix to ldap hashes * added CryptContext.replace() back * NOTE: all above need UTs and docs
* fixed wart - CryptContext now searches schemes in order, instead of reverse ↵Eli Collins2011-03-051-1/+1
| | | | order (and default is now first option)