Don't set arbitrary limitations on the complexity of password

parent 6422a9a0
...@@ -24,7 +24,7 @@ $(document).ready(function () { ...@@ -24,7 +24,7 @@ $(document).ready(function () {
$("#error").Popup("Please enter a valid email adress!", {type: 'alert', duration: 3000}); $("#error").Popup("Please enter a valid email adress!", {type: 'alert', duration: 3000});
return false; return false;
} }
if (!hasAccount && !$("input#password").val().match(/^[\w\d\._\-]+$/)) { if (!hasAccount && !$("input#password").val()) {
$("#error").Popup("Please enter your new password!", {type: 'alert', duration: 3000}); $("#error").Popup("Please enter your new password!", {type: 'alert', duration: 3000});
return false; return false;
} }
...@@ -33,7 +33,7 @@ $(document).ready(function () { ...@@ -33,7 +33,7 @@ $(document).ready(function () {
return false; return false;
} }
if ($("input#password").val() !== "") { if ($("input#password").val() !== "") {
if ($("input#password").val() === "" || !$("input#password").val().match(/^[\w\d\._\-]+$/)) { if ($("input#password").val() === "" || !$("input#password").val()) {
$("#error").Popup("Please enter your new password!", {type: 'alert', duration: 3000}); $("#error").Popup("Please enter your new password!", {type: 'alert', duration: 3000});
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment