From d0bc71a1d5957f5c1f62ff630e0d0bd6e9a63527 Mon Sep 17 00:00:00 2001
From: Matthieu Imbert
Date: Thu, 11 Aug 2016 15:18:05 +0200
Subject: [PATCH 4/4] document new password constraints to users
---
src/www/account/change_pw.php | 5 ++++-
src/www/account/register.php | 10 +++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/www/account/change_pw.php b/src/www/account/change_pw.php
index 0455517..5085848 100644
--- a/src/www/account/change_pw.php
+++ b/src/www/account/change_pw.php
@@ -73,8 +73,11 @@ if (getStringFromRequest('submit')) {
echo html_e('p', array(), _('Old Password')._(':').utils_requiredField().
html_e('br').
html_e('label', array('for' => 'old_passwd'), html_e('input',array('id' => 'old_passwd', 'type' => 'password', 'name' => 'old_passwd', 'required'=> 'required'))));
- echo html_e('p', array(), _('New Password (at least 8 characters)')._(':').utils_requiredField().
+ echo html_e('p', array(), _('New Password')._(':').utils_requiredField().
html_e('br').
+ html_e('em', array(),
+ _('Minimum 8 characters.').html_e('br').
+ (forge_get_config('check_password_strength') ? _('Must contain at least one uppercase letter, one lowercase, one digit, one non-alphanumeric character.').html_e('br') : '')).
html_e('label', array('for' => 'passwd'), html_e('input', array('id' => 'passwd', 'type' => 'password', 'name' => 'passwd', 'required' => 'required', 'pattern' => '.{8,}'))));
echo html_e('p', array(), _('New Password (repeat)')._(':').utils_requiredField().
html_e('br').
diff --git a/src/www/account/register.php b/src/www/account/register.php
index 6d933b0..75f5ea0 100644
--- a/src/www/account/register.php
+++ b/src/www/account/register.php
@@ -155,7 +155,15 @@ if (forge_get_config('require_unique_email')) {
-
+
+
+
+');
+}
+?>
+
--
2.8.1