aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2020-03-27 19:17:45 +0200
committerIgor Pashev <pashev.igor@gmail.com>2020-03-27 19:17:51 +0200
commit279c4e5ad1952478221ab7be883d750fbfe38c9c (patch)
tree44b336d63990497588e5d0150a339d81c4380810 /src/main
parent942c650dd2103cc7f50d5b15274c79017f60cc70 (diff)
downloadbbprb-279c4e5ad1952478221ab7be883d750fbfe38c9c.tar.gz
Remove check for user agentHEADmaster
Bitbucket server uses different user agents
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/jenkinsci/plugins/bbprb/BitbucketHookReceiver.java9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketHookReceiver.java b/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketHookReceiver.java
index 355a901..1757343 100644
--- a/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketHookReceiver.java
+++ b/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketHookReceiver.java
@@ -32,7 +32,6 @@ public class BitbucketHookReceiver
extends CrumbExclusion implements UnprotectedRootAction {
private static final String BITBUCKET_HOOK_URL = "bbprb-hook";
- private static final String BITBUCKET_UA = "Bitbucket-Webhooks/2.0";
@Override
public boolean process(HttpServletRequest req, HttpServletResponse resp,
@@ -49,14 +48,6 @@ public class BitbucketHookReceiver
public void doIndex(StaplerRequest req, StaplerResponse resp)
throws IOException {
- String userAgent = req.getHeader("user-agent");
- if (!BITBUCKET_UA.equals(userAgent)) {
- LOGGER.log(Level.WARNING, "Bad user agent: `{0}`, expected `{1}`",
- new Object[] {userAgent, BITBUCKET_UA});
- resp.setStatus(StaplerResponse.SC_BAD_REQUEST);
- return;
- }
-
String uri = req.getRequestURI();
if (!uri.contains("/" + BITBUCKET_HOOK_URL + "/")) {
LOGGER.log(Level.WARNING,