Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ludovic Kiefer
erp5
Commits
669565f3
Commit
669565f3
authored
Mar 26, 2014
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_jquery_plugin_validation: Tolerant more repetitions in passwords.
Also, expose and document unicity score divisor.
parent
19188308
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
bt5/erp5_jquery_plugin_validation/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin/validation/password.js.xml
...kins/erp5_jquery/jquery/plugin/validation/password.js.xml
+12
-2
No files found.
bt5/erp5_jquery_plugin_validation/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin/validation/password.js.xml
View file @
669565f3
...
...
@@ -128,7 +128,17 @@ function PasswordValidator() {\n
window.PasswordValidator =
PasswordValidator;\n
\n
\n
/*
Uniqueness
is
a
reweard
for
not
reusing
the
same
character
several
times.\n
*
SCORE_UNIQUE
increase
this
reward,
SCORE_UNIQUE_DIVISOR
is
the
divisor\n
*
used
to
determine
the
score
of
repetitions.
*/\n
PasswordValidator.prototype.SCORE_UNIQUE =
1;\n
/*
Obviously:\n
*
-
zero
is
will
cause
errors\n
*
-
negative
values
will
give
non-linear
scores\n
*
-
values
between
zero
and
one
will
reward
for
repetitions
(you
do
not
want\n
*
this)\n
*
-
use
Infinity
to
only
reward
unique
chars
*/\n
PasswordValidator.prototype.SCORE_UNIQUE_DIVISOR =
1.5;\n
PasswordValidator.prototype.SCORE_UPPER =
1;\n
PasswordValidator.prototype.SCORE_LOWER =
1;\n
/*
Password
variety
is
the
number
of
unique
chars
in
it.
Score
is
computed\n
...
...
@@ -173,7 +183,7 @@ PasswordValidator.prototype.PADDING = "\\x00";\n
PasswordValidator.prototype.RANGE_BASE =
"too-weak"
;\n
/*
Above-weakest
range
definition,
as
threshold
and
range
name
pairs.
*/\n
PasswordValidator.prototype.RANGE_THRESHOLDS =
[\n
[5
5
,
"weak"],\n
[5
4
,
"weak"],\n
[70,
"medium"],\n
[90,
"strong"]\n
];\n
...
...
@@ -280,7 +290,7 @@ PasswordValidator.prototype.getScore = function (value, tracer) {\n
character_score =
this.SCORE_UNIQUE;\n
}\n
lazy_tracer(value_index,
"variety:",
character_score);\n
variety_map[current_lower]
=
character_score
/
2
;\n
variety_map[current_lower]
=
character_score
/
this.SCORE_UNIQUE_DIVISOR
;\n
new_sequences =
[];\n
sequence_matched =
false;\n
for
(
i =
0;
i
<
sequences.length;
i
+=
1)
{\n
...
...
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