summaryrefslogtreecommitdiff
path: root/passlib/apache.py
Commit message (Collapse)AuthorAgeFilesLines
* python compat cleanup -- use magic super() callsEli Collins2020-10-061-2/+2
|
* cleanup old python compat - assorted minor cleanups & fixes from conversionEli Collins2020-10-061-1/+0
|
* cleanup old python compat -- replaced "unicode" alias in favor of "str"Eli Collins2020-10-061-6/+6
|
* cleanup old python compat -- removed IO aliases (BytesIO etc)Eli Collins2020-10-061-1/+2
|
* cleanup old python compat -- removed PY2 & PY3 conditionalsEli Collins2020-10-061-8/+7
|
* cleanup old python compat -- removed all "from __future__" importsEli Collins2020-10-061-1/+0
|
* Merge from stableEli Collins2020-10-061-2/+2
|\
| * py39 compat - fixed some uneeded escape sequencesEli Collins2020-10-031-2/+2
| |
* | Merge from stableEli Collins2019-11-111-2/+11
|\ \ | |/
| * 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).
* | Merge with stableEli Collins2017-01-301-4/+4
|\ \ | |/
| * passlib.apache: updated internal commentsEli Collins2017-01-301-4/+4
| |
* | general: went ahead and removed a bunch of deprecated features that were ↵Eli Collins2016-11-281-108/+13
|/ | | | | | | | | scheduled for removal in v1.8. this removes CryptPolicy, unix_fallback, some old HtpasswdFile methods, and more. tests were updated as well. see history/1.8 for a complete list.
* 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