fix(auth): reject invalid challenge signatures instead of transitioning to AuthOk

This commit is contained in:
CleverWild
2026-03-29 23:05:38 +02:00
parent cdff5b6fe2
commit cc1e282022
2 changed files with 74 additions and 5 deletions

View File

@@ -210,13 +210,16 @@ where
}
};
if valid {
self.transport
.send(Ok(Outbound::AuthSuccess))
.await
.map_err(|_| Error::Transport)?;
if !valid {
error!("Invalid challenge solution signature");
return Err(Error::InvalidChallengeSolution);
}
self.transport
.send(Ok(Outbound::AuthSuccess))
.await
.map_err(|_| Error::Transport)?;
Ok(key.clone())
}
}