forked from alemi/upub
fix: not all keys are #main-key
This commit is contained in:
parent
1b29f1d915
commit
267840a317
1 changed files with 4 additions and 1 deletions
|
@ -70,7 +70,10 @@ where
|
|||
let mut http_signature = HttpSignature::parse(sig);
|
||||
|
||||
// TODO assert payload's digest is equal to signature's
|
||||
let user_id = http_signature.key_id.replace("#main-key", "");
|
||||
let user_id = http_signature.key_id
|
||||
.split('#')
|
||||
.next().ok_or(UpubError::bad_request())?
|
||||
.to_string();
|
||||
|
||||
match ctx.fetch().user(&user_id).await {
|
||||
Ok(user) => match http_signature
|
||||
|
|
Loading…
Reference in a new issue