Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
2e36c78e
Commit
2e36c78e
authored
Aug 07, 2013
by
Simon Green
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 897264 - letters_numbers_specialchars password restriction is incorrect
r=LpSolit, a=sgreen
parent
9ca3f8b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
User.pm
Bugzilla/User.pm
+1
-1
user-error.html.tmpl
template/en/default/global/user-error.html.tmpl
+15
-15
No files found.
Bugzilla/User.pm
View file @
2e36c78e
...
...
@@ -2116,7 +2116,7 @@ sub validate_password {
my
$complexity_level
=
Bugzilla
->
params
->
{
password_complexity
};
if
(
$complexity_level
eq
'letters_numbers_specialchars'
)
{
ThrowUserError
(
'password_not_complex'
)
if
(
$password
!~
/
\w
/
||
$password
!~
/\d/
||
$password
!~
/[[:punct:]]/
);
if
(
$password
!~
/
[[:alpha:]]
/
||
$password
!~
/\d/
||
$password
!~
/[[:punct:]]/
);
}
elsif
(
$complexity_level
eq
'letters_numbers'
)
{
ThrowUserError
(
'password_not_complex'
)
if
(
$password
!~
/[[:lower:]]/
||
$password
!~
/[[:upper:]]/
||
$password
!~
/\d/
);
...
...
template/en/default/global/user-error.html.tmpl
View file @
2e36c78e
...
...
@@ -1395,21 +1395,21 @@
[%+ constants.USER_PASSWORD_MIN_LENGTH FILTER html %] characters long.
[% ELSIF error == "password_not_complex" %]
[% title = "Password Fails Requirements" %]
[% passregex = Param('password_complexity') %]
The password must contain at least one:
<ul>
[% IF passregex.search('letters')
%]
<li>UPPERCASE
letter</li>
<li>lowercase let
ter</li>
[% END
%]
[% IF passregex.search('numbers') %]
<li>digit
</li>
[% END %]
[% IF passregex.search('specialcha
rs') %]
<li>special character
</li>
[% END %]
</ul>
[% title = "Password Fails Requirements" %]
[% passregex = Param('password_complexity') %]
The password must contain at least one:
<ul>
[% IF passregex == 'letters_numbers_specialchars'
%]
<li>
letter</li>
<li>special charac
ter</li>
[% ELSIF passregex.search('letters')
%]
<li>UPPERCASE letter</li>
<li>lowercase letter
</li>
[% END %]
[% IF passregex.search('numbe
rs') %]
<li>digit
</li>
[% END %]
</ul>
[% ELSIF error == "product_access_denied" %]
[% title = "Product Access Denied" %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment