ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jler...@apache.org
Subject svn commit: r1421738 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
Date Fri, 14 Dec 2012 08:53:10 GMT
Author: jleroux
Date: Fri Dec 14 08:53:09 2012
New Revision: 1421738

URL: http://svn.apache.org/viewvc?rev=1421738&view=rev
Log:
Adrian remarked there was no need to use class fields

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=1421738&r1=1421737&r2=1421738&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java Fri Dec 14
08:53:09 2012
@@ -64,8 +64,6 @@ public class LoginServices {
 
     public static final String module = LoginServices.class.getName();
     public static final String resource = "SecurityextUiLabels";
-    public boolean usePasswordPattern = UtilProperties.getPropertyAsBoolean("security.properties",
"security.login.password.pattern.enable", true);
-    public String passwordPattern = UtilProperties.getPropertyValue("security.properties",
"security.login.password.pattern", "^.*(?=.{5,}).*$");
 
     /** Login service to authenticate username and password
      * @return Map of results including (userLogin) GenericValue object
@@ -961,6 +959,8 @@ public class LoginServices {
 
         if (newPassword != null) {
             // Matching password with pattern
+            String passwordPattern = UtilProperties.getPropertyValue("security.properties",
"security.login.password.pattern", "^.*(?=.{5,}).*$");
+            boolean usePasswordPattern = UtilProperties.getPropertyAsBoolean("security.properties",
"security.login.password.pattern.enable", true);
             if (usePasswordPattern) {
                 Pattern pattern = Pattern.compile(passwordPattern);
                 Matcher matcher = pattern.matcher(newPassword);



Mime
View raw message