test(security): enforce lowercase token hex assertion

This commit is contained in:
Chummy 2026-02-18 16:53:16 +08:00
parent 918be53a30
commit 75a9eb383c

View file

@ -424,7 +424,9 @@ mod tests {
assert_eq!(payload.len(), 64, "Token payload should be 32 bytes in hex");
assert!(
payload.chars().all(|c| c.is_ascii_hexdigit()),
payload
.chars()
.all(|c| c.is_ascii_digit() || matches!(c, 'a'..='f')),
"Token payload should be lowercase hex"
);
}