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

(-)a/C4/Output.pm (-9 / +8 lines)
Lines 346-361 sub output_and_exit_if_error { Link Here
346
            # But in the long term we will want to get a biblio in parameter
346
            # But in the long term we will want to get a biblio in parameter
347
            $error = 'unknown_biblio' unless $params->{record};
347
            $error = 'unknown_biblio' unless $params->{record};
348
        }
348
        }
349
        elsif ( $params->{module} eq 'CSRF_TOKEN_CHECK' ) {
349
    }
350
            $error = 'wrong_csrf_token'
350
    elsif ( $params->{check} eq 'csrf_token' ) {
351
              unless Koha::Token->new->check_csrf(
351
        $error = 'wrong_csrf_token'
352
                {
352
          unless Koha::Token->new->check_csrf(
353
                    session_id => scalar $query->cookie('CGISESSID'),
353
            {
354
                    token      => scalar $query->param('csrf_token'),
354
                session_id => scalar $query->cookie('CGISESSID'),
355
                }
355
                token      => scalar $query->param('csrf_token'),
356
              );
357
            }
356
            }
358
        }
357
          );
359
    }
358
    }
360
    output_and_exit( $query, $cookie, $template, $error ) if $error;
359
    output_and_exit( $query, $cookie, $template, $error ) if $error;
361
    return;
360
    return;
(-)a/acqui/basketheader.pl (-3 / +2 lines)
Lines 143-150 if ( $op eq 'add_form' ) { Link Here
143
#End Edit
143
#End Edit
144
} elsif ( $op eq 'add_validate' ) {
144
} elsif ( $op eq 'add_validate' ) {
145
#we are confirming the changes, save the basket
145
#we are confirming the changes, save the basket
146
#we are checking CSRF Token. Module CSRF_TOKEN_CHECK indicate for CSRF token checking,
146
#we are checking CSRF Token.
147
    output_and_exit_if_error($input, $cookie, $template, { module => 'CSRF_TOKEN_CHECK' });
147
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
148
148
149
    if ( $is_an_edit ) {
149
    if ( $is_an_edit ) {
150
        ModBasketHeader(
150
        ModBasketHeader(
151
- 

Return to bug 22990