Skip to content

Commit

Permalink
Fix misformatted aud claims
Browse files Browse the repository at this point in the history
Closes #50
  • Loading branch information
andyblarblar committed Aug 21, 2023
1 parent b3d9797 commit 8d1844e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vapid/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ impl VapidSigner {
} else {
//Use provided claims if given. This is here to avoid breaking changes.
let aud = claims.custom.get("aud").unwrap().clone();
claims = claims.with_audience(aud);
//NOTE: This as_str is needed, else \" gets added around the string
claims = claims.with_audience(aud.as_str().ok_or(WebPushError::InvalidClaims)?);
claims.custom.remove("aud");
}

Expand Down

0 comments on commit 8d1844e

Please sign in to comment.