diff options
author | Robert Godfrey <rgodfrey@apache.org> | 2008-03-24 13:49:06 +0000 |
---|---|---|
committer | Robert Godfrey <rgodfrey@apache.org> | 2008-03-24 13:49:06 +0000 |
commit | 30c764cf4a22961f169bd5f6716acee85c49c431 (patch) | |
tree | acce94cfdafffe9773a6269acdd1e88a64ff6a6b | |
parent | 5667171be15385dacd50b7c84021216c81aedce9 (diff) | |
download | qpid-python-30c764cf4a22961f169bd5f6716acee85c49c431.tar.gz |
QPID-873 : Authentication Exception should be hard error; also NPE in PropertiesPrincipalDatabase when user not known
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@640417 13f79535-47bb-0310-9956-ffa450edef68
2 files changed, 7 insertions, 3 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabase.java b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabase.java index 73d58ca489..c8a4add0f1 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabase.java +++ b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabase.java @@ -69,10 +69,14 @@ public class PropertiesPrincipalDatabase implements PrincipalDatabase { 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 { diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQAuthenticationException.java b/java/client/src/main/java/org/apache/qpid/client/AMQAuthenticationException.java index 8f90a0bdfa..69ff7a2c19 100644 --- a/java/client/src/main/java/org/apache/qpid/client/AMQAuthenticationException.java +++ b/java/client/src/main/java/org/apache/qpid/client/AMQAuthenticationException.java @@ -41,7 +41,7 @@ public class AMQAuthenticationException extends AMQException } public boolean isHardError() { - return false; + return true; } } |