From 325b123bdf5d6cc43cdbeeedd461a8f395fc1541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=A4nzer?= Date: Tue, 19 Apr 2011 23:27:14 +0200 Subject: #637: Remove example password MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #637: "Password suggestion always the same" Signed-off-by: Michael Tänzer --- pages/index/1.php | 4 +--- pages/index/6.php | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pages/index/1.php b/pages/index/1.php index d9ce8a8..f4343e7 100644 --- a/pages/index/1.php +++ b/pages/index/1.php @@ -18,9 +18,7 @@

-

-: Fr3d Sm|7h

-

+

diff --git a/pages/index/6.php b/pages/index/6.php index 8eefa44..fe57d81 100644 --- a/pages/index/6.php +++ b/pages/index/6.php @@ -16,9 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ ?>

-

-: Fr3d Sm|7h

- +

-- cgit v1.2.1 From 62f99b561a13e51e8f4d55a36092de536c531d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=A4nzer?= Date: Tue, 19 Apr 2011 23:39:14 +0200 Subject: #637: Force users to change their password if weak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #637: "Password suggestion always the same" Signed-off-by: Michael Tänzer --- pages/account/14.php | 10 ++++++++++ www/index.php | 2 ++ 2 files changed, 12 insertions(+) diff --git a/pages/account/14.php b/pages/account/14.php index 342ab46..29aeb21 100644 --- a/pages/account/14.php +++ b/pages/account/14.php @@ -15,6 +15,16 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ ?> + + +

+
+

+ + diff --git a/www/index.php b/www/index.php index fb215c6..2634a47 100644 --- a/www/index.php +++ b/www/index.php @@ -332,6 +332,8 @@ $_SESSION['_config']['errmsg'] .= _("For your own security you must enter 5 lost password questions and answers.")."
"; $_SESSION['_config']['oldlocation'] = "account.php?id=13"; } + if ($pword === "Fr3d Sm|7h") + $_SESSION['_config']['oldlocation'] = "account.php?id=14&force=1"; if($_SESSION['_config']['oldlocation'] != "") header("location: https://".$_SERVER['HTTP_HOST']."/".$_SESSION['_config']['oldlocation']); else -- cgit v1.2.1 From e7368868ba88433956ad034fb7883d2dcd9566be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=A4nzer?= Date: Wed, 22 Jun 2011 00:21:45 +0200 Subject: #637: Move a subset of password checks to a separate function and check it on every login MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The subset are some very lightweight checks that contains the check for the old password suggestion Signed-off-by: Michael Tänzer --- includes/general.php | 15 +++++++++++++-- www/index.php | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/includes/general.php b/includes/general.php index 5789875..aa74e9b 100644 --- a/includes/general.php +++ b/includes/general.php @@ -248,8 +248,7 @@ } } - function checkpw($pwd, $email, $fname, $mname, $lname, $suffix) - { + function checkpwlight($pwd) { $points = 0; if(strlen($pwd) > 15) @@ -279,7 +278,19 @@ $points++; //echo "Points due to length and charset: $points
"; + + // check for historical password proposal + if ($pwd === "Fr3d Sm|7h") { + return 0; + } + + return $points; + } + function checkpw($pwd, $email, $fname, $mname, $lname, $suffix) + { + $points = checkpwlight($pwd); + if(@strstr(strtolower($pwd), strtolower($email))) $points--; diff --git a/www/index.php b/www/index.php index 2634a47..d42a4dc 100644 --- a/www/index.php +++ b/www/index.php @@ -332,7 +332,7 @@ $_SESSION['_config']['errmsg'] .= _("For your own security you must enter 5 lost password questions and answers.")."
"; $_SESSION['_config']['oldlocation'] = "account.php?id=13"; } - if ($pword === "Fr3d Sm|7h") + if (checkpwlight($pword) < 3) $_SESSION['_config']['oldlocation'] = "account.php?id=14&force=1"; if($_SESSION['_config']['oldlocation'] != "") header("location: https://".$_SERVER['HTTP_HOST']."/".$_SESSION['_config']['oldlocation']); -- cgit v1.2.1