Ignore:
Timestamp:
9 Jan 2019, 21:17:08 (6 years ago)
Author:
Henrik Bettermann
Message:

Stored insecure passwords are no longer accepted.
Officers with an insecure password can't login and are
redirected to the ChangePasswordRequestPage to request a
new password.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py

    r13990 r15287  
    3434from waeup.kofa.mandates.mandate import PasswordMandate, RefereeReportMandate
    3535from waeup.kofa.testing import (FunctionalLayer, FunctionalTestCase)
     36from waeup.kofa.tests.test_authentication import SECRET
    3637
    3738class MandatesContainerTestCase(FunctionalTestCase):
     
    123124
    124125    def test_set_officer_password(self):
    125         self.app['users'].addUser('bob', 'bobssecret')
     126        self.app['users'].addUser('bob', SECRET)
    126127        officer = self.app['users']['bob']
    127128        mandate = PasswordMandate()
    128129        mandate.params['user'] = officer
    129         mandate.params['password'] = 'mypwd1'
     130        mandate.params['password'] = SECRET
    130131        self.app['mandates'].addMandate(mandate)
    131132        (msg, redirect_path) = mandate.execute()
     
    134135            'Password has been successfully set. Login with your new password.')
    135136        self.assertEqual(redirect_path, '/login')
    136         self.assertTrue(IUserAccount(officer).checkPassword('mypwd1'))
     137        self.assertTrue(IUserAccount(officer).checkPassword(SECRET))
    137138        logfile = os.path.join(
    138139            self.app['datacenter'].storage, 'logs', 'main.log')
Note: See TracChangeset for help on using the changeset viewer.