Tres Seaver
2011-03-16 d6ab696f0edee85949d92151b03c6507dc793444
More isochronous whack-a-mole fun.
1 files modified
6 ■■■■ changed files
repoze/who/plugins/htpasswd.py 6 ●●●● patch | view | raw | blame | history
repoze/who/plugins/htpasswd.py
@@ -79,9 +79,9 @@
def _same_string(x, y):
    # Attempt at isochronous string comparison.
    mismatches = sum([a != b for a, b, ignored
                              in itertools.izip_longest(x, y, PADDING)])
    return mismatches == 0
    mismatches = filter(None, [a != b for a, b, ignored
                                    in itertools.izip_longest(x, y, PADDING)])
    return len(mismatches) == 0
def crypt_check(password, hashed):
    from crypt import crypt