Tres Seaver
2011-03-15 40744337b5b7eb65df8e7fafbe6c97ee84660570
Avoid yet one more short-circuit.
1 files modified
7 ■■■■■ changed files
repoze/who/plugins/htpasswd.py 7 ●●●●● patch | view | raw | blame | history
repoze/who/plugins/htpasswd.py
@@ -79,10 +79,9 @@
def _same_string(x, y):
    # Attempt at isochronous string comparison.
    match = True
    for a, b, ignored in itertools.izip_longest(x, y, PADDING):
        match = a == b and match
    return match
    mismatches = sum([a != b for a, b, ignored
                              in itertools.izip_longest(x, y, PADDING)])
    return mismatches == 0
def crypt_check(password, hashed):
    from crypt import crypt