geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r696579 - /geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginRepositoryDownloader.java
Date Thu, 18 Sep 2008 07:02:50 GMT
Author: djencks
Date: Thu Sep 18 00:02:50 2008
New Revision: 696579

URL: http://svn.apache.org/viewvc?rev=696579&view=rev
Log:
GERONIMO-4309 use EncryptionManager to obscure plugin repo registry passwords

Modified:
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginRepositoryDownloader.java

Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginRepositoryDownloader.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginRepositoryDownloader.java?rev=696579&r1=696578&r2=696579&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginRepositoryDownloader.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginRepositoryDownloader.java
Thu Sep 18 00:02:50 2008
@@ -42,6 +42,7 @@
 import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.crypto.EncryptionManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -107,7 +108,13 @@
                     if (rawCreds.length() > 0) {
                         creds = rawCreds.split("=");
                         if (creds.length != 2) {
-                            break;
+                            continue;
+                        }
+                        String password = creds[1];
+                        creds[1] = (String) EncryptionManager.decrypt(password);
+                        if (password.equals(creds[1])) {
+                            //unencrypted password found
+                            modified = true;
                         }
                     }
                     userRepositories.put(url, creds);
@@ -131,7 +138,7 @@
             if (creds == null || creds.length != 2) {
                 properties.setProperty(url, "");
             } else {
-                properties.setProperty(url, creds[0] + "=" + creds[1]);
+                properties.setProperty(url, creds[0] + "=" + EncryptionManager.encrypt(creds[1]));
             }
         }
         try {



Mime
View raw message