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

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

Return to bug 22990