From 52aafe2a2512a0e415dcb2c41ff4a361571ec87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=B6hm?= Date: Wed, 20 Mar 2024 09:00:03 +0100 Subject: [PATCH] Add project key to cache key If a requests is sent with a project key, and the key is not part of the cache key, following requests for other projects will result in the cached repositories for the first project, leading to wrong results --- .../plugins/bitbucket/client/BitbucketCloudApiClient.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/client/BitbucketCloudApiClient.java b/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/client/BitbucketCloudApiClient.java index 4612f4d95..f06f12a24 100644 --- a/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/client/BitbucketCloudApiClient.java +++ b/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/client/BitbucketCloudApiClient.java @@ -768,6 +768,7 @@ public List getRepositories(@CheckForNull UserRoleInRe .set("pagelen", MAX_PAGE_LENGTH); if (StringUtils.isNotBlank(projectKey)) { template.set("q", "project.key=" + "\"" + projectKey + "\""); // q=project.key="" + cacheKey.append("::").append(projectKey); } if (role != null && authenticator != null) { template.set("role", role.getId());