Skip to content

Commit 525db7e

Browse files
committed
password logging fixes
1 parent 0dc8c3f commit 525db7e

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Mailman/SecurityManager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ def Authenticate(self, authcontexts, response, user=None):
139139
if not response:
140140
# Don't authenticate null passwords
141141
return mm_cfg.UnAuthorized
142+
# Log the type and encoding of the response
143+
mailman_log('debug', 'Auth response type: %s, encoding: %s',
144+
type(response), getattr(response, 'encoding', 'N/A'))
142145
# python3
143146
response = response.encode('UTF-8')
144147
for ac in authcontexts:

Mailman/Utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,11 @@ def check_global_password(response, siteadmin=True):
483483
challenge = get_global_password(siteadmin)
484484
if challenge is None:
485485
return None
486-
return challenge == sha_new(response).hexdigest()
486+
# Log the hashes for debugging
487+
computed_hash = sha_new(response).hexdigest()
488+
mailman_log('debug', 'Password check - stored hash: %s, computed hash: %s',
489+
challenge, computed_hash)
490+
return challenge == computed_hash
487491

488492

489493
_ampre = re.compile('&((?:#[0-9]+|[a-z]+);)', re.IGNORECASE)

0 commit comments

Comments
 (0)