CLOUDSTACK-10000: Fix remote access vpn does not work due to '#' in password (#2182)

This commit is contained in:
ustcweizhou 2017-08-10 01:30:21 +02:00 committed by Rohit Yadav
parent d17728dd7e
commit aee3dbb49a

View File

@ -381,8 +381,8 @@ public class RemoteAccessVpnManagerImpl extends ManagerBase implements RemoteAcc
if (!username.matches("^[a-zA-Z0-9][a-zA-Z0-9@._-]{2,63}$")) {
throw new InvalidParameterValueException("Username has to be begin with an alphabet have 3-64 characters including alphabets, numbers and the set '@.-_'");
}
if (!password.matches("^[a-zA-Z0-9][a-zA-Z0-9@#+=._-]{2,31}$")) {
throw new InvalidParameterValueException("Password has to be 3-32 characters including alphabets, numbers and the set '@#+=.-_'");
if (!password.matches("^[a-zA-Z0-9][a-zA-Z0-9@+=._-]{2,31}$")) {
throw new InvalidParameterValueException("Password has to be 3-32 characters including alphabets, numbers and the set '@+=.-_'");
}
return Transaction.execute(new TransactionCallback<VpnUser>() {