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/tests/test_authentication.py

    r14670 r15287  
    4040    IKofaPluggable)
    4141
     42SECRET = 'HgtuZZZ8'
    4243
    4344class FakeSite(grok.Site, grok.Container):
     
    133134        self.getRootFolder()['app'] = FakeSite()
    134135        self.site = self.getRootFolder()['app']
    135         self.site['users'] = {'bob': Account('bob', 'secret')}
     136        self.site['users'] = {'bob': Account('bob', SECRET)}
    136137        setSite(self.site)
    137138        return
     
    155156        plugin = UserAuthenticatorPlugin()
    156157        result1 = plugin.authenticateCredentials(
    157             dict(login='bob', password='secret'))
     158            dict(login='bob', password=SECRET))
    158159        result2 = plugin.authenticateCredentials(
    159160            dict(login='bob', password='nonsense'))
     
    185186        # do `num` failed logins and a valid one afterwards
    186187        del self.site['users']
    187         self.site['users'] = {'bob': Account('bob', 'secret')}
     188        self.site['users'] = {'bob': Account('bob', SECRET)}
    188189        plugin = UserAuthenticatorPlugin()
    189190        resultlist = []
     
    193194                dict(login='bob', password='wrongsecret')))
    194195        resultlist.append(plugin.authenticateCredentials(
    195             dict(login='bob', password='secret')))
     196            dict(login='bob', password=SECRET)))
    196197        return resultlist
    197198
Note: See TracChangeset for help on using the changeset viewer.