Skip to content

Commit

Permalink
Merge branch 'master' into issue-165-multiple_sms_tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed Mar 14, 2024
2 parents edd112c + 765aae9 commit 697648c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/js/ppolicy.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
}

if (window.policy.pwd_no_reuse && window.policy.pwd_no_reuse == true) {
if( $( "#oldpassword" ) && $( "#oldpassword" ).val().length > 0 && password.length > 0 )
if( $( "#oldpassword" ).length )
{
oldpassword = $( "#oldpassword" ).val();
report( password != oldpassword , 'ppolicy-pwd_no_reuse-feedback');
Expand All @@ -112,7 +112,7 @@
}

if (window.policy.pwd_diff_login && window.policy.pwd_diff_login == true) {
if( $( "#login" ) && $( "#login" ).val().length > 0 && password.length > 0 )
if( $( "#login" ).length )
{
login = $( "#login" ).val();
report( password != login, 'ppolicy-pwd_diff_login-feedback');
Expand All @@ -124,7 +124,7 @@
}

if (window.policy.pwd_diff_last_min_chars > 0) {
if( $( "#oldpassword" ) && $( "#oldpassword" ).val().length > 0 && password.length > 0 )
if( $( "#oldpassword" ).length && $( "#oldpassword" ).val().length > 0 && password.length > 0 )
{
minDiffChars = window.policy.pwd_diff_last_min_chars;
oldpassword = $( "#oldpassword" ).val();
Expand Down

0 comments on commit 697648c

Please sign in to comment.