jenkinsci / gogs-webhook-plugin

Jenkins Gogs Webhook
https://plugins.jenkins.io/gogs-webhook/
MIT License
79 stars 42 forks source link

Optional check on secret in body to prevent Exceptions when using secretless Gogs > 0.10.x #19

Closed willemvd closed 7 years ago

willemvd commented 7 years ago

when in Gogs > 0.10.x the secret is not set, the X-Gogs-Signature is empty. So only do an optional check if it exists in the body to prevent an Exception ( javax.servlet.ServletException: net.sf.json.JSONException: JSONObject["secret"] not found. ) when not found in the body This is to fix #18

sanderv32 commented 7 years ago

Hi Willem.. Is this PR still relevant?

slPerryRhodan commented 7 years ago

Hello,

And yes for me/us this is still relevant. Because, we don't use a password for our Webhooks in dev environment.