mirror of
https://github.com/LemmyNet/activitypub-federation-rust
synced 2024-11-27 05:40:19 +00:00
Require signed digest when verifying signatures (#109)
This commit is contained in:
parent
ddc455510b
commit
be69efdee3
1 changed files with 5 additions and 2 deletions
|
@ -189,8 +189,11 @@ fn verify_signature_inner(
|
||||||
uri: &Uri,
|
uri: &Uri,
|
||||||
public_key: &str,
|
public_key: &str,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
static CONFIG: Lazy<http_signature_normalization::Config> =
|
static CONFIG: Lazy<http_signature_normalization::Config> = Lazy::new(|| {
|
||||||
Lazy::new(|| http_signature_normalization::Config::new().set_expiration(EXPIRES_AFTER));
|
http_signature_normalization::Config::new()
|
||||||
|
.set_expiration(EXPIRES_AFTER)
|
||||||
|
.require_digest()
|
||||||
|
});
|
||||||
|
|
||||||
let path_and_query = uri.path_and_query().map(PathAndQuery::as_str).unwrap_or("");
|
let path_and_query = uri.path_and_query().map(PathAndQuery::as_str).unwrap_or("");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue