From 35e6a532f56d1a3e54476d2adb36375169e9bef9 Mon Sep 17 00:00:00 2001
From: Go MAEDA
Date: Thu, 29 Aug 2019 01:35:09 +0000
Subject: Force passwords to contain specified character classes (#4221).
Patch by Takenori TAKAKI.
git-svn-id: http://svn.redmine.org/redmine/trunk@18411 e93f8b46-1217-0410-a6f0-8f06a7374b81
---
app/views/account/password_recovery.html.erb | 3 +++
app/views/account/register.html.erb | 7 +++++--
2 files changed, 8 insertions(+), 2 deletions(-)
(limited to 'app/views/account')
diff --git a/app/views/account/password_recovery.html.erb b/app/views/account/password_recovery.html.erb
index 24da8223b..0c275b476 100644
--- a/app/views/account/password_recovery.html.erb
+++ b/app/views/account/password_recovery.html.erb
@@ -9,6 +9,9 @@
<%= password_field_tag 'new_password', nil, :size => 25 %>
<%= l(:text_caracters_minimum, :count => Setting.password_min_length) %>
+ <% if Setting.password_required_char_classes.any? %>
+ <%= l(:text_characters_must_contain, :character_classes => Setting.password_required_char_classes.collect{|c| l("label_password_char_class_#{c}")}.join(", ")) %>
+ <% end %>
diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb
index ade00adfc..f35e0e0cc 100644
--- a/app/views/account/register.html.erb
+++ b/app/views/account/register.html.erb
@@ -8,8 +8,11 @@
<%= f.text_field :login, :size => 25, :required => true %>
<%= f.password_field :password, :size => 25, :required => true %>
- <%= l(:text_caracters_minimum, :count => Setting.password_min_length) %>
-
+ <%= l(:text_caracters_minimum, :count => Setting.password_min_length) %>
+ <% if Setting.password_required_char_classes.any? %>
+ <%= l(:text_characters_must_contain, :character_classes => Setting.password_required_char_classes.collect{|c| l("label_password_char_class_#{c}")}.join(", ")) %>
+ <% end %>
+
<%= f.password_field :password_confirmation, :size => 25, :required => true %>
<% end %>
--
cgit v1.2.3