]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4781 Properties starting with "sonar.web." can't be encrypted in sonar.properties
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 18 Apr 2014 07:58:06 +0000 (09:58 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 18 Apr 2014 07:58:06 +0000 (09:58 +0200)
sonar-application/src/main/java/org/sonar/application/AesCipher.java
sonar-application/src/main/java/org/sonar/application/Props.java

index d006146a7e6dce944db693a66bbdb2ebc530499f..e778b0ebc184b46482bbb05e5426e1d0d3068a18 100644 (file)
@@ -48,7 +48,7 @@ final class AesCipher extends Cipher {
   /**
    * Duplication from CoreProperties.ENCRYPTION_SECRET_KEY_PATH
    */
-  private static final String ENCRYPTION_SECRET_KEY_PATH = "sonar.secretKeyPath";
+  static final String ENCRYPTION_SECRET_KEY_PATH = "sonar.secretKeyPath";
 
   private String pathToSecretKey;
 
index 51a6cdfe49e2d3e97ae64c738745a8f3adde6631..dbe24636d0e2e3380af860c4bb7a75290d6e1026 100644 (file)
@@ -101,7 +101,7 @@ class Props {
   }
 
   static Properties decrypt(Properties properties) {
-    Encryption encryption = new Encryption(null);
+    Encryption encryption = new Encryption(properties.getProperty(AesCipher.ENCRYPTION_SECRET_KEY_PATH));
     Properties result = new Properties();
 
     for (Map.Entry<Object, Object> entry : properties.entrySet()) {