Lines 668-674
Exceptions are thrown if the password is not good enough.
Link Here
|
668 |
|
668 |
|
669 |
=item Koha::Exceptions::Password::TooShort |
669 |
=item Koha::Exceptions::Password::TooShort |
670 |
|
670 |
|
671 |
=item Koha::Exceptions::Password::TrailingWhitespaces |
671 |
=item Koha::Exceptions::Password::WhitespaceCharacters |
672 |
|
672 |
|
673 |
=item Koha::Exceptions::Password::TooWeak |
673 |
=item Koha::Exceptions::Password::TooWeak |
674 |
|
674 |
|
Lines 691-698
sub set_password {
Link Here
|
691 |
{ length => $password_length, min_length => $min_length } ); |
691 |
{ length => $password_length, min_length => $min_length } ); |
692 |
} |
692 |
} |
693 |
elsif ( $error eq 'has_whitespaces' ) { |
693 |
elsif ( $error eq 'has_whitespaces' ) { |
694 |
Koha::Exceptions::Password::TrailingWhitespaces->throw( |
694 |
Koha::Exceptions::Password::WhitespaceCharacters->throw(); |
695 |
"Password contains trailing spaces, which is forbidden."); |
|
|
696 |
} |
695 |
} |
697 |
elsif ( $error eq 'too_weak' ) { |
696 |
elsif ( $error eq 'too_weak' ) { |
698 |
Koha::Exceptions::Password::TooWeak->throw(); |
697 |
Koha::Exceptions::Password::TooWeak->throw(); |