karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: [KARAF-3660] Setting JMX SSL causes StringIndexOutOfBoundsException when setting keyPasswords without = symbol
Date Mon, 13 Apr 2015 11:31:27 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-2.x 672d6a949 -> 9da4d6ae4


[KARAF-3660] Setting JMX SSL causes StringIndexOutOfBoundsException when setting keyPasswords
without = symbol


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/9da4d6ae
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/9da4d6ae
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/9da4d6ae

Branch: refs/heads/karaf-2.x
Commit: 9da4d6ae41345ad5b51c0fa8ccbf7b05135a6dee
Parents: 672d6a9
Author: Jay SenSharma <joy.sensharma@gmail.com>
Authored: Sun Apr 12 16:04:45 2015 +0530
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Mon Apr 13 12:57:02 2015 +0200

----------------------------------------------------------------------
 .../apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/9da4d6ae/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java
----------------------------------------------------------------------
diff --git a/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java
b/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java
index f2c7260..9ced5fa 100644
--- a/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java
+++ b/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java
@@ -130,7 +130,9 @@ public class ResourceKeystoreInstance implements KeystoreInstance {
             for (int i = 0; i < keys.length; i++) {
                 String key = keys[i];
                 int pos = key.indexOf('=');
-                this.keyPasswords.put(key.substring(0, pos), key.substring(pos + 1).toCharArray());
+                if (pos > 0) {
+                    this.keyPasswords.put(key.substring(0, pos), key.substring(pos + 1).toCharArray());
+                }
             }
         }
     }


Mime
View raw message