View | Details | Raw Unified | Return to bug 11944
Collapse All | Expand All

(-)a/C4/Auth.pm (+4 lines)
Lines 32-37 use C4::VirtualShelves; Link Here
32
use Koha::AuthUtils qw(hash_password);
32
use Koha::AuthUtils qw(hash_password);
33
use POSIX qw/strftime/;
33
use POSIX qw/strftime/;
34
use List::MoreUtils qw/ any /;
34
use List::MoreUtils qw/ any /;
35
use Encode qw( encode is_utf8);
35
36
36
# use utf8;
37
# use utf8;
37
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas $caslogout);
38
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas $caslogout);
Lines 1542-1547 sub checkpw { Link Here
1542
sub checkpw_internal {
1543
sub checkpw_internal {
1543
    my ( $dbh, $userid, $password ) = @_;
1544
    my ( $dbh, $userid, $password ) = @_;
1544
1545
1546
    $password = Encode::encode( 'UTF-8', $password )
1547
      if Encode::is_utf8($password);
1548
1545
    my $sth =
1549
    my $sth =
1546
      $dbh->prepare(
1550
      $dbh->prepare(
1547
"select password,cardnumber,borrowernumber,userid,firstname,surname,branchcode,flags from borrowers where userid=?"
1551
"select password,cardnumber,borrowernumber,userid,firstname,surname,branchcode,flags from borrowers where userid=?"
(-)a/Koha/AuthUtils.pm (-1 / +3 lines)
Lines 19-24 package Koha::AuthUtils; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64);
21
use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64);
22
use Encode qw( encode is_utf8 );
22
use Fcntl qw/O_RDONLY/; # O_RDONLY is used in generate_salt
23
use Fcntl qw/O_RDONLY/; # O_RDONLY is used in generate_salt
23
24
24
use base 'Exporter';
25
use base 'Exporter';
Lines 51-56 user passwords. Link Here
51
# Using Bcrypt method for hashing. This can be changed to something else in future, if needed.
52
# Using Bcrypt method for hashing. This can be changed to something else in future, if needed.
52
sub hash_password {
53
sub hash_password {
53
    my $password = shift;
54
    my $password = shift;
55
    $password = Encode::encode( 'UTF-8', $password )
56
      if Encode::is_utf8($password);
54
57
55
    # Generate a salt if one is not passed
58
    # Generate a salt if one is not passed
56
    my $settings = shift;
59
    my $settings = shift;
57
- 

Return to bug 11944