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

(-)a/C4/Output.pm (-9 / +10 lines)
Lines 347-360 sub output_and_exit_if_error { Link Here
347
            $error = 'unknown_biblio' unless $params->{record};
347
            $error = 'unknown_biblio' unless $params->{record};
348
        }
348
        }
349
    }
349
    }
350
    elsif ( $params->{check} eq 'csrf_token' ) {
350
    elsif ( $params and exists $params->{check} ) {
351
        $error = 'wrong_csrf_token'
351
        if ( $params->{check} eq 'csrf_token' ) {
352
          unless Koha::Token->new->check_csrf(
352
            $error = 'wrong_csrf_token'
353
            {
353
              unless Koha::Token->new->check_csrf(
354
                session_id => scalar $query->cookie('CGISESSID'),
354
                {
355
                token      => scalar $query->param('csrf_token'),
355
                    session_id => scalar $query->cookie('CGISESSID'),
356
            }
356
                    token      => scalar $query->param('csrf_token'),
357
          );
357
                }
358
              );
359
        }
358
    }
360
    }
359
    output_and_exit( $query, $cookie, $template, $error ) if $error;
361
    output_and_exit( $query, $cookie, $template, $error ) if $error;
360
    return;
362
    return;
361
- 

Return to bug 22990