File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 8
8
)
9
9
10
10
11
+ HASHED_PASSWORD = re .compile (r'^pbkdf2.+?\$(?P<salt>.+?)\$(?P<password>.+)' )
12
+
13
+
11
14
def retrieve_salt (user : User ) -> str :
12
- HASHED_PASSWORD = re .compile (
13
- r'^pbkdf2.+?\$(?P<salt>.+?)\$(?P<password>.+)' ,
14
- )
15
15
password = HASHED_PASSWORD .match (user .password )
16
16
try :
17
17
return password .groupdict ().get ('salt' )
18
18
except AttributeError : # should never happen
19
- raise UnhashedPasswordError
19
+ raise UnhashedPasswordError ( 'Password format is invalid.' )
20
20
21
21
22
22
def auth (username : str , password : str ) -> User :
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ def admin_user():
178
178
)
179
179
180
180
181
- @pytest .fixture (autouse = True , scope = 'session ' )
181
+ @pytest .fixture (autouse = True , scope = 'function ' )
182
182
def captured_templates ():
183
183
recorded = []
184
184
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ FEATURE_FLAG_CHECK_IDENTICAL_CODE_ON = os.getenv(
14
14
)
15
15
16
16
17
-
18
17
MAIL_WELCOME_MESSAGE = 'welcome-email'
19
18
USERS_CSV = 'users.csv'
20
19
ERRORS_CSV = 'errors.csv'
You can’t perform that action at this time.
0 commit comments