瀏覽代碼

Allow empty passwords as per http://forum.springframework.org/viewtopic.php?p=13343.

Ben Alex 20 年之前
父節點
當前提交
0be77abe75
共有 2 個文件被更改,包括 6 次插入3 次删除
  1. 2 2
      core/src/main/java/org/acegisecurity/userdetails/User.java
  2. 4 1
      doc/xdocs/changes.xml

+ 2 - 2
core/src/main/java/org/acegisecurity/userdetails/User.java

@@ -1,4 +1,4 @@
-/* Copyright 2004 Acegi Technology Pty Limited
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -93,7 +93,7 @@ public class User implements UserDetails {
         boolean accountNonExpired, boolean credentialsNonExpired,
         GrantedAuthority[] authorities) throws IllegalArgumentException {
         if (((username == null) || "".equals(username)) || (password == null)
-            || "".equals(password) || (authorities == null)) {
+            || (authorities == null)) {
             throw new IllegalArgumentException(
                 "Cannot pass null or empty values to constructor");
         }

+ 4 - 1
doc/xdocs/changes.xml

@@ -3,7 +3,7 @@
 <!--
  * ========================================================================
  * 
- * Copyright 2004 Acegi Technology Pty Limited
+ * Copyright 2004, 2005 Acegi Technology Pty Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,7 +27,10 @@
   <body>
     <release version="0.7.1" date="CVS">
       <action dev="benalex" type="update">Made ConfigAttributeDefinition and ConfigAttribute Serializable</action>
+      <action dev="benalex" type="update">User now accepted blank passwords (null passwords still rejected)</action>
       <action dev="benalex" type="update">FilterToBeanProxy now searches hierarchical bean factories</action>
+      <action dev="benalex" type="update">Improved Tapestry support in AbstractProcessingFilter</action>
+      <action dev="benalex" type="update">User now accepted blank passwords (null passwords still rejected)</action>
       <action dev="benalex" type="fix">Contacts sample web.xml no longer expect Log4j to be in classpath</action>
       <action dev="raykrueger" type="update">JaasAuthenticatinProvider now uses System.property "java.security.auth.login.config"</action>
       <action dev="raykrueger" type="update">JaasAuthenticationCallbackHandler Authentication is passed to handle method setAuthenticatoin removed</action>