[aur-dev] [PATCH 1/3] Check password length on the password reset form
From: Lukas Fleischer <archlinux@cryptocrack.de> We already check for a minimum password length on the account edit page. Add the same check to the password reset form (which is also used to set an initial password). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/html/passreset.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/html/passreset.php b/web/html/passreset.php index 9d8e1ae..fecefe4 100644 --- a/web/html/passreset.php +++ b/web/html/passreset.php @@ -25,6 +25,10 @@ if (isset($_GET['resetkey'], $_POST['email'], $_POST['password'], $_POST['confir $error = __('Missing a required field.'); } elseif ($password != $confirm) { $error = __('Password fields do not match.'); + } elseif (!good_passwd($password)) { + $length_min = config_get_int('options', 'passwd_min_len'); + $error = __("Your password must be at least %s characters.", + $length_min); } elseif ($uid == null) { $error = __('Invalid e-mail.'); } -- 2.1.3
From: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/lib/acctfuncs.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 1d38fe1..5e83f42 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -660,7 +660,7 @@ function send_resetkey($email, $subject, $body) { /* Send e-mail with confirmation link. */ $body = wordwrap($body, 70); - $body .= "\n\n". aur_location() . "/" . get_uri('/passreset/') . + $body .= "\n\n". aur_location() . get_uri('/passreset/') . "?resetkey={$resetkey}"; $headers = "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8\r\n" . -- 2.1.3
From: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- po/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/Makefile b/po/Makefile index 49eab32..e27e85b 100644 --- a/po/Makefile +++ b/po/Makefile @@ -69,4 +69,4 @@ install: all uninstall: for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done -.PHONY: all update-pot update-po clean install uninstall +.PHONY: all update-pot update-po clean install uninstall POTFILES -- 2.1.3
participants (1)
-
archlinux@cryptocrack.de