Mercurial > crates > nonstick
diff testharness/src/lib.rs @ 167:0cabe7b94a4f
Check for old_authtok in change_authtok to emulate real behavior.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Tue, 15 Jul 2025 00:39:08 -0400 |
parents | 2f5913131295 |
children | 6642e89d29a2 |
line wrap: on
line diff
--- a/testharness/src/lib.rs Tue Jul 15 00:32:24 2025 -0400 +++ b/testharness/src/lib.rs Tue Jul 15 00:39:08 2025 -0400 @@ -88,6 +88,9 @@ ) -> nonstick::Result<()> { match action { AuthtokAction::PreliminaryCheck => { + if handle.old_authtok(None)?.as_bytes() != b"old token!" { + return Err(ErrorCode::AuthenticationError); + } let password = handle.authtok(None)?; if password.as_bytes() != b"acceptable" { return Err(ErrorCode::PermissionDenied);