]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-14721 SONAR-14722 SONAR-14723 do not follow redirects when interacting with...
authorAurelien Poscia <aurelien.poscia@sonarsource.com>
Tue, 15 Mar 2022 13:40:51 +0000 (14:40 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 16 Mar 2022 20:03:28 +0000 (20:03 +0000)
server/sonar-alm-client/src/main/java/org/sonar/alm/client/azure/AzureDevOpsHttpClient.java
server/sonar-alm-client/src/main/java/org/sonar/alm/client/bitbucketserver/BitbucketServerRestClient.java
server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubApplicationHttpClientImpl.java

index 7727d7cb0f05485c5466e8a3395ac5a0f566dcad..818169de5b0e9e9556bfb511e7baf2c978c29b91 100644 (file)
@@ -59,6 +59,7 @@ public class AzureDevOpsHttpClient {
     client = new OkHttpClientBuilder()
       .setConnectTimeoutMs(timeoutConfiguration.getConnectTimeout())
       .setReadTimeoutMs(timeoutConfiguration.getReadTimeout())
+      .setFollowRedirects(false)
       .build();
   }
 
index 0e4eac5b87531ffc9625496a521775dd593aab97..8eda23af7244fbae8c8565737ce1ded7f971c505 100644 (file)
@@ -64,6 +64,7 @@ public class BitbucketServerRestClient {
     client = okHttpClientBuilder
       .setConnectTimeoutMs(timeoutConfiguration.getConnectTimeout())
       .setReadTimeoutMs(timeoutConfiguration.getReadTimeout())
+      .setFollowRedirects(false)
       .build();
   }
 
index 773acb8aaa7ac0ad9152c973250cfafab19cd2fc..5dc612914c0321d423190e8778a385ae09088549 100644 (file)
@@ -59,9 +59,10 @@ public class GithubApplicationHttpClientImpl implements GithubApplicationHttpCli
 
   public GithubApplicationHttpClientImpl(TimeoutConfiguration timeoutConfiguration) {
     client = new OkHttpClientBuilder()
-        .setConnectTimeoutMs(timeoutConfiguration.getConnectTimeout())
-        .setReadTimeoutMs(timeoutConfiguration.getReadTimeout())
-        .build();
+      .setConnectTimeoutMs(timeoutConfiguration.getConnectTimeout())
+      .setReadTimeoutMs(timeoutConfiguration.getReadTimeout())
+      .setFollowRedirects(false)
+      .build();
   }
 
   @Override