WIP: forgejo: ???

This commit is contained in:
Paul Campbell 2024-06-19 07:03:01 +01:00
parent 74cf9a5d53
commit a9b35bdac5

View file

@ -36,7 +36,7 @@ impl git::ForgeLike for ForgeJo {
tracing::info!(?authorization, %expected, "is message authorised?");
authorization
.and_then(|header| header.strip_prefix("Basic ").map(|v| v.to_owned()))
.and_then(|value| config::WebhookAuth::new(value.as_str()).ok())
.and_then(|value| config::WebhookAuth::try_new(value.as_str()).ok())
.map(|auth| &auth == expected)
.unwrap_or(false)
}