You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2008/03/24 14:49:06 UTC

svn commit: r640417 - in /incubator/qpid/branches/M2.1/java: broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabase.java client/src/main/java/org/apache/qpid/client/AMQAuthenticationException.java

Author: rgodfrey
Date: Mon Mar 24 06:49:06 2008
New Revision: 640417

URL: http://svn.apache.org/viewvc?rev=640417&view=rev
Log:
QPID-873 : Authentication Exception should be hard error; also NPE in PropertiesPrincipalDatabase when user not known

Modified:
    incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabase.java
    incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/AMQAuthenticationException.java

Modified: incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabase.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabase.java?rev=640417&r1=640416&r2=640417&view=diff
==============================================================================
--- incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabase.java (original)
+++ incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabase.java Mon Mar 24 06:49:06 2008
@@ -69,10 +69,14 @@
         {
             throw new IllegalArgumentException("principal must not be null");
         }
-        char[] pwd = _users.getProperty(principal.getName()).toCharArray();
+
+
+
+        final String pwd = _users.getProperty(principal.getName());
+
         if (pwd != null)
         {
-            callback.setPassword(pwd);
+            callback.setPassword(pwd.toCharArray());
         }
         else
         {

Modified: incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/AMQAuthenticationException.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/AMQAuthenticationException.java?rev=640417&r1=640416&r2=640417&view=diff
==============================================================================
--- incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/AMQAuthenticationException.java (original)
+++ incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/AMQAuthenticationException.java Mon Mar 24 06:49:06 2008
@@ -41,7 +41,7 @@
     }
     public boolean isHardError()
     {
-        return false;
+        return true;
     }
 
 }