test(security): enforce lowercase token hex assertion
This commit is contained in:
parent
918be53a30
commit
75a9eb383c
1 changed files with 3 additions and 1 deletions
|
|
@ -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"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue