stages/identification: add error handling when password isn't set

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-28 12:54:10 +02:00
parent eb02c96281
commit f61736e3d1
1 changed files with 3 additions and 1 deletions

View File

@ -96,7 +96,9 @@ class IdentificationChallengeResponse(ChallengeResponse):
# No password stage select, don't validate the password
return attrs
password = attrs["password"]
password = attrs.get("password", None)
if not password:
LOGGER.warning("Password not set for ident+auth attempt")
try:
user = authenticate(
self.stage.request,