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

(-)a/Koha/REST/V1/Auth.pm (-1 / +1 lines)
Lines 447-452 sub _basic_auth { Link Here
447
    my ( $user_id, $password ) = split( /:/, $decoded_credentials, 2 );
447
    my ( $user_id, $password ) = split( /:/, $decoded_credentials, 2 );
448
448
449
    my $dbh = C4::Context->dbh;
449
    my $dbh = C4::Context->dbh;
450
    C4::Context->_new_userenv($user_id) unless defined C4::Context->userenv;
450
    unless ( checkpw_internal($dbh, $user_id, $password ) ) {
451
    unless ( checkpw_internal($dbh, $user_id, $password ) ) {
451
        Koha::Exceptions::Authorization::Unauthorized->throw( error => 'Invalid password' );
452
        Koha::Exceptions::Authorization::Unauthorized->throw( error => 'Invalid password' );
452
    }
453
    }
453
- 

Return to bug 24003