浏览代码

[Bug fix for 1031006] Configuration editor will now generate the size of password requested up to 1000 characters

rkeil 8 年之前
父节点
当前提交
c5164325ea

+ 1 - 1
src/main/angular/src/services/promise.service.ts

@@ -3,7 +3,7 @@
  * http://www.pwm-project.org
  *
  * Copyright (c) 2006-2009 Novell, Inc.
- * Copyright (c) 2009-2017 The PWM Project
+ * Copyright (c) 2009-2016 The PWM Project
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by

+ 0 - 4
src/main/java/password/pwm/http/PwmHttpRequestWrapper.java

@@ -362,13 +362,9 @@ public abstract class PwmHttpRequestWrapper {
         String decodedValue = input;
         try {
             decodedValue = new String(input.getBytes("ISO-8859-1"), PwmConstants.DEFAULT_CHARSET);
-            if (decodedValue.contains("?")) {
-                decodedValue = input;
-            }
         } catch (UnsupportedEncodingException e) {
             LOGGER.error("error decoding request parameter: " + e.getMessage());
         }
-
         return decodedValue;
     }
 

+ 1 - 0
src/main/java/password/pwm/util/PwmPasswordRuleValidator.java

@@ -651,6 +651,7 @@ public class PwmPasswordRuleValidator {
         //Check maximum length
         {
             final int passwordMaximumLength = ruleHelper.readIntValue(PwmPasswordRule.MaximumLength);
+
             if (passwordMaximumLength > 0 && passwordLength > passwordMaximumLength) {
                 errorList.add(new ErrorInformation(PwmError.PASSWORD_TOO_LONG));
             }

+ 3 - 0
src/main/java/password/pwm/util/RandomPasswordGenerator.java

@@ -166,6 +166,9 @@ public class RandomPasswordGenerator {
         {
             final Map<String, String> newPolicyMap = new HashMap<>();
             newPolicyMap.putAll(randomGeneratorConfig.getPasswordPolicy().getPolicyMap());
+
+            final String max = newPolicyMap.put(PwmPasswordRule.MaximumLength.getKey(), String.valueOf(randomGeneratorConfig.getMaximumLength()));
+
             if (randomGeneratorConfig.getMinimumLength() > randomGeneratorConfig.getPasswordPolicy().getRuleHelper().readIntValue(PwmPasswordRule.MinimumLength)) {
                 newPolicyMap.put(PwmPasswordRule.MinimumLength.getKey(), String.valueOf(randomGeneratorConfig.getMinimumLength()));
             }