You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/11/23 11:23:09 UTC

[1/2] git commit: updated refs/heads/master to 3f6d779

Repository: cloudstack
Updated Branches:
  refs/heads/master a3234349b -> 3f6d7796f


CLOUDSTACK-8951: validation for "remote.access.vpn.psk.length"

throwing error for value < 8 and value > 256
right now, 8, 256 are hardcoded in the code. They should be moved to a
constant and has to be reused everywhere.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/170a0257
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/170a0257
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/170a0257

Branch: refs/heads/master
Commit: 170a0257872954637b4f6ea1088aec5524b32961
Parents: bf0c4f2
Author: Rajani Karuturi <ra...@citrix.com>
Authored: Tue Oct 6 16:57:39 2015 +0530
Committer: Rajani Karuturi <ra...@citrix.com>
Committed: Tue Nov 17 14:34:57 2015 +0530

----------------------------------------------------------------------
 .../com/cloud/configuration/ConfigurationManagerImpl.java   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170a0257/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 69e70e6..78c1b10 100644
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -386,6 +386,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
         configValuesForValidation.add("ovm3.heartbeat.timeout");
         configValuesForValidation.add("incorrect.login.attempts.allowed");
         configValuesForValidation.add("vm.password.length");
+        configValuesForValidation.add("remote.access.vpn.psk.length");
     }
 
     private void weightBasedParametersForValidation() {
@@ -773,6 +774,14 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
                 if ("vm.password.length".equalsIgnoreCase(name) && val < 6) {
                     throw new InvalidParameterValueException("Please enter a value greater than 6 for the configuration parameter:" + name);
                 }
+                if ("remote.access.vpn.psk.length".equalsIgnoreCase(name)) {
+                    if (val < 8) {
+                        throw new InvalidParameterValueException("Please enter a value greater than 8 for the configuration parameter:" + name);
+                    }
+                    if (val > 256) {
+                        throw new InvalidParameterValueException("Please enter a value less than 256 for the configuration parameter:" + name);
+                    }
+                }
             } catch (final NumberFormatException e) {
                 s_logger.error("There was an error trying to parse the integer value for:" + name);
                 throw new InvalidParameterValueException("There was an error trying to parse the integer value for:" + name);


[2/2] git commit: updated refs/heads/master to 3f6d779

Posted by re...@apache.org.
Merge pull request #929 from karuturi/CLOUDSTACK-8951

[4.7] CLOUDSTACK-8951: validation for config param "remote.access.vpn.psk.length"throwing error for value < 8 and value > 256
right now, 8, 256 are hardcoded in the code. They should be moved to a
constant and has to be reused everywhere.

will update with test cases/testing later.

* pr/929:
  CLOUDSTACK-8951: validation for "remote.access.vpn.psk.length"

Signed-off-by: Remi Bergsma <gi...@remi.nl>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3f6d7796
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3f6d7796
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3f6d7796

Branch: refs/heads/master
Commit: 3f6d7796f1f43d1eab622f3922c1efcba68d911c
Parents: a323434 170a025
Author: Remi Bergsma <gi...@remi.nl>
Authored: Mon Nov 23 11:22:41 2015 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Mon Nov 23 11:22:42 2015 +0100

----------------------------------------------------------------------
 .../com/cloud/configuration/ConfigurationManagerImpl.java   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3f6d7796/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------