~sakuag333/mailman/lmtp-duplicate-id

« back to all changes in this revision

Viewing changes to src/mailman/utilities/passwords.py

  • Committer: Barry Warsaw
  • Date: 2012-12-26 23:57:33 UTC
  • mfrom: (7191.1.4 lp1065447)
  • Revision ID: barry@list.org-20121226235733-1bccgsjdgmijeqw0
 * A user's password can be verified by POSTing to .../user/<id>/login.  The
   data must contain a single parameter `cleartext_password` and if this
   matches, a 204 (No Content) will be returned, otherwise a 403 (Forbidden)
   is returned.  (LP: #1065447)

Also:
 * Clean up the users.rst REST page so that it reads as better documentation.
   Move some tests into the unittests.
 * Fix (with a new test), the handling of ExistingAddressError when creating
   new users via REST.
 * Fix (with a new test), the crashing when .../users/<id>/addresses is
   referenced on a non-existing user.
 * Add hex_md5 as a deprecated passlib hash scheme for the test suite.  This
   allows us to test hash migration by creating an initial has as hex_md5
   (another crappy hash), and watching verified passwords get migrated to
   roundup_plaintext (and even crappier hash ;).

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        :type password:
64
64
        :param hashed: The hash string to compare to.
65
65
        :type hashed: string
 
66
        :return: 2-tuple where the first element is a flag indicating whether
 
67
            the password verified or not, and the second value whether the
 
68
            existing hash needs to be replaced (a str if so, else None).
 
69
        :rtype: 2-tuple
66
70
        """
67
71
        return self._context.verify_and_update(password, hashed)
68
72