Merge branch 'main' into chore-release

pull/626/head
sigoden 2025-09-03 21:21:00 +08:00
commit bbeff4ed06
1 changed files with 4 additions and 0 deletions

View File

@ -173,6 +173,10 @@ impl AccessControl {
fn verify_token<'a>(&'a self, token: &str, path: &str) -> Result<(String, &'a AccessPaths)> {
let raw = hex::decode(token)?;
if raw.len() < 72 {
bail!("Invalid token");
}
let sig_bytes = &raw[..64];
let exp_bytes = &raw[64..72];
let user_bytes = &raw[72..];