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

(-)a/Koha/Report.pm (-1 / +3 lines)
Lines 58-63 sub is_sql_valid { Link Here
58
    $sql //= '';
58
    $sql //= '';
59
    my @errors = ();
59
    my @errors = ();
60
60
61
    #strip the 'SET STATEMENT max_statement_time=%d FOR %s' bit added in Bug 39164 before validating the SQL
62
    $sql =~ s/^\s*SET\s+STATEMENT\s+max_statement_time\s*=\s*\d+\s+FOR\s+//i;
63
61
    if ( $sql =~ /;?\W?(UPDATE|DELETE|DROP|INSERT|SHOW|CREATE)\W/i ) {
64
    if ( $sql =~ /;?\W?(UPDATE|DELETE|DROP|INSERT|SHOW|CREATE)\W/i ) {
62
        push @errors, { sqlerr => $1 };
65
        push @errors, { sqlerr => $1 };
63
    } elsif ( $sql !~ /^\s*SELECT\b\s*/i ) {
66
    } elsif ( $sql !~ /^\s*SELECT\b\s*/i ) {
64
- 

Return to bug 39164