Form GitlabHook payloads again

Don't check for the secret validity at this point

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2024-07-10 17:20:45 +02:00
parent 407788af5a
commit 6903490ace
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -81,9 +81,7 @@ async fn hooks_inner(req: Request<Incoming>, secret: &str) -> Result<Hook, Error
let hook: ForgejoHook = serde_json::from_slice(&payload[..])?;
return Ok(Hook::Forgejo(hook));
} else if let Some(val) = headers.get("X-Gitlab-Token")
&& secret != val
{
} else if let Some(val) = headers.get("X-Gitlab-Token") {
if secret != val {
return Err(Error::InvalidSecret);
}