Skip to content
Snippets Groups Projects
Verified Commit 81a4909e authored by Cyaniventer's avatar Cyaniventer
Browse files

Let users choose anything as their password

Forcing users to use at least one letter and number is bad practice and
you should let users choose anything as their password as long as it is
greater than 7 characters.

Current Password Policy

- should be greater than 7 characters
parent f327aa9c
No related branches found
No related tags found
No related merge requests found
......@@ -93,7 +93,7 @@
<h3>password</h3>
<input type='password' name='password' required><br>
<code>must be longer than 7 characters, should include at least letter & number.</code>
<code>must be longer than 7 characters.</code>
<h3>email</h3>
<input type='email' name='email' maxlength='256'><br>
......
......@@ -96,12 +96,14 @@
if (strlen($_POST['password']) < 7) {
echo "<p class='reply'>your password must be longer than 7 characters. $errorMsg";
exit; }
/**
if (!preg_match("#[0-9]+#", $_POST['password'])) {
echo "<p class='reply'>your password must include at least one number. $errorMsg";
exit; }
if (!preg_match("#[a-zA-Z]+#", $_POST['password'])) {
echo "<p class='reply'>your password must include at least one letter. $errorMsg";
exit; }
*/
//password, username checks are complete
$options = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment