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

(-)a/acqui/check_uniqueness.pl (+7 lines)
Lines 37-42 use C4::Output qw( output_with_http_headers ); Link Here
37
use C4::Items qw( SearchItems );
37
use C4::Items qw( SearchItems );
38
38
39
my $input = CGI->new;
39
my $input = CGI->new;
40
my ($auth_status) =
41
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
42
if ( $auth_status ne "ok" ) {
43
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
44
    exit 0;
45
}
46
40
my @field = $input->multi_param('field[]');
47
my @field = $input->multi_param('field[]');
41
my @value = $input->multi_param('value[]');
48
my @value = $input->multi_param('value[]');
42
49
(-)a/catalogue/image.pl (+7 lines)
Lines 33-38 use Koha::CoverImages; Link Here
33
$| = 1;
33
$| = 1;
34
34
35
my $input = CGI->new;
35
my $input = CGI->new;
36
my ($auth_status) =
37
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
38
if ( $auth_status ne "ok" ) {
39
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
40
    exit 0;
41
}
42
36
my $imagenumber;
43
my $imagenumber;
37
44
38
=head1 NAME
45
=head1 NAME
(-)a/cataloguing/plugin_launcher.pl (+8 lines)
Lines 19-28 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth qw( check_cookie_auth );
22
23
23
use Koha::FrameworkPlugin;
24
use Koha::FrameworkPlugin;
24
25
25
my $input = CGI->new;
26
my $input = CGI->new;
27
my ($auth_status) =
28
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
29
if ( $auth_status ne "ok" ) {
30
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
31
    exit 0;
32
}
33
26
my $plugin= Koha::FrameworkPlugin->new( {
34
my $plugin= Koha::FrameworkPlugin->new( {
27
    name => scalar $input->param("plugin_name"),
35
    name => scalar $input->param("plugin_name"),
28
});
36
});
(-)a/cataloguing/value_builder/barcode.pl (+10 lines)
Lines 29-34 use Koha::DateUtils qw( dt_from_string ); Link Here
29
29
30
use Algorithm::CheckDigits qw( CheckDigits );
30
use Algorithm::CheckDigits qw( CheckDigits );
31
31
32
use CGI qw ( -utf8 );
33
use C4::Auth qw( check_cookie_auth );
34
my $input = CGI->new;
35
my ($auth_status) =
36
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
37
if ( $auth_status ne "ok" ) {
38
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
39
    exit 0;
40
}
41
32
my $builder = sub {
42
my $builder = sub {
33
    my ( $params ) = @_;
43
    my ( $params ) = @_;
34
    my $function_name = $params->{id};
44
    my $function_name = $params->{id};
(-)a/cataloguing/value_builder/barcode_manual.pl (+10 lines)
Lines 27-32 use C4::Barcodes::ValueBuilder; Link Here
27
use C4::Biblio qw( GetMarcFromKohaField );
27
use C4::Biblio qw( GetMarcFromKohaField );
28
use Koha::DateUtils qw( dt_from_string );
28
use Koha::DateUtils qw( dt_from_string );
29
29
30
use CGI qw ( -utf8 );
31
use C4::Auth qw( check_cookie_auth );
32
my $input = CGI->new;
33
my ($auth_status) =
34
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
35
if ( $auth_status ne "ok" ) {
36
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
37
    exit 0;
38
}
39
30
my $builder = sub {
40
my $builder = sub {
31
    my ( $params ) = @_;
41
    my ( $params ) = @_;
32
    my $function_name = $params->{id};
42
    my $function_name = $params->{id};
(-)a/cataloguing/value_builder/dateaccessioned.pl (+10 lines)
Lines 21-26 Link Here
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
25
use C4::Auth qw( check_cookie_auth );
26
my $input = CGI->new;
27
my ($auth_status) =
28
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
29
if ( $auth_status ne "ok" ) {
30
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
31
    exit 0;
32
}
33
24
my $builder = sub {
34
my $builder = sub {
25
    my ( $params ) = @_;
35
    my ( $params ) = @_;
26
    my $function_name = $params->{id};
36
    my $function_name = $params->{id};
(-)a/cataloguing/value_builder/marc21_field_005.pl (+10 lines)
Lines 21-26 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
25
use C4::Auth qw( check_cookie_auth );
26
my $input = CGI->new;
27
my ($auth_status) =
28
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
29
if ( $auth_status ne "ok" ) {
30
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
31
    exit 0;
32
}
33
24
my $builder = sub {
34
my $builder = sub {
25
    my ( $params ) = @_;
35
    my ( $params ) = @_;
26
    my $function_name = $params->{id};
36
    my $function_name = $params->{id};
(-)a/cataloguing/value_builder/marc21_field_245h.pl (-1 / +11 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use C4::Context;
23
24
use CGI qw ( -utf8 );
25
use C4::Auth qw( check_cookie_auth );
26
my $input = CGI->new;
27
my ($auth_status) =
28
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
29
if ( $auth_status ne "ok" ) {
30
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
31
    exit 0;
32
}
33
24
34
25
my $builder = sub {
35
my $builder = sub {
26
    my ( $params ) = @_;
36
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/marc21_field_260b.pl (+10 lines)
Lines 27-32 biblioitems.publishercode Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
use C4::Context;
28
use C4::Context;
29
29
30
use CGI qw ( -utf8 );
31
use C4::Auth qw( check_cookie_auth );
32
my $input = CGI->new;
33
my ($auth_status) =
34
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
35
if ( $auth_status ne "ok" ) {
36
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
37
    exit 0;
38
}
39
30
my $builder = sub {
40
my $builder = sub {
31
    my ( $params ) = @_;
41
    my ( $params ) = @_;
32
    my $function_name = $params->{id};
42
    my $function_name = $params->{id};
(-)a/cataloguing/value_builder/marc21_orgcode.pl (+9 lines)
Lines 24-29 use Modern::Perl; Link Here
24
use C4::Context;
24
use C4::Context;
25
25
26
use Koha::Libraries;
26
use Koha::Libraries;
27
use CGI qw ( -utf8 );
28
use C4::Auth qw( check_cookie_auth );
29
my $input = CGI->new;
30
my ($auth_status) =
31
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
32
if ( $auth_status ne "ok" ) {
33
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
34
    exit 0;
35
}
27
36
28
my $builder = sub {
37
my $builder = sub {
29
    my ( $params ) = @_;
38
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/stocknumber.pl (+9 lines)
Lines 21-26 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use C4::Context;
23
use C4::Context;
24
use CGI qw ( -utf8 );
25
use C4::Auth qw( check_cookie_auth );
26
my $input = CGI->new;
27
my ($auth_status) =
28
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
29
if ( $auth_status ne "ok" ) {
30
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
31
    exit 0;
32
}
24
33
25
my $builder = sub {
34
my $builder = sub {
26
    my ( $params ) = @_;
35
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/upload.pl (+10 lines)
Lines 30-35 use Modern::Perl; Link Here
30
# the possibility to delete the uploaded file. If the field is empty, you
30
# the possibility to delete the uploaded file. If the field is empty, you
31
# can upload a new file.
31
# can upload a new file.
32
32
33
use CGI qw ( -utf8 );
34
use C4::Auth qw( check_cookie_auth );
35
my $input = CGI->new;
36
my ($auth_status) =
37
    check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } );
38
if ( $auth_status ne "ok" ) {
39
    print $input->header( -type => 'text/plain', -status => '403 Forbidden' );
40
    exit 0;
41
}
42
33
my $builder = sub {
43
my $builder = sub {
34
    my ( $params ) = @_;
44
    my ( $params ) = @_;
35
    return <<"SCRIPT";
45
    return <<"SCRIPT";
(-)a/labels/label-create-csv.pl (+6 lines)
Lines 26-31 use Text::CSV_XS; Link Here
26
use C4::Labels;
26
use C4::Labels;
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
my ($auth_status) =
30
    check_cookie_auth( $cgi->cookie('CGISESSID'), { catalogue => 1 } );
31
if ( $auth_status ne "ok" ) {
32
    print $cgi->header( -type => 'text/plain', -status => '403 Forbidden' );
33
    exit 0;
34
}
29
35
30
my $batch_id;
36
my $batch_id;
31
my @label_ids;
37
my @label_ids;
(-)a/labels/label-create-xml.pl (+6 lines)
Lines 26-31 use XML::Simple; Link Here
26
use C4::Labels;
26
use C4::Labels;
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
my ($auth_status) =
30
    check_cookie_auth( $cgi->cookie('CGISESSID'), { catalogue => 1 } );
31
if ( $auth_status ne "ok" ) {
32
    print $cgi->header( -type => 'text/plain', -status => '403 Forbidden' );
33
    exit 0;
34
}
29
35
30
my $batch_id;
36
my $batch_id;
31
my @label_ids;
37
my @label_ids;
(-)a/serials/lateissues-export.pl (-1 / +7 lines)
Lines 27-32 use Koha::CsvProfiles; Link Here
27
use Text::CSV_XS;
27
use Text::CSV_XS;
28
28
29
my $query = CGI->new;
29
my $query = CGI->new;
30
my ($auth_status) =
31
    check_cookie_auth( $query->cookie('CGISESSID'), { catalogue => 1 } );
32
if ( $auth_status ne "ok" ) {
33
    print $query->header( -type => 'text/plain', -status => '403 Forbidden' );
34
    exit 0;
35
}
36
30
my $supplierid = $query->param('supplierid');
37
my $supplierid = $query->param('supplierid');
31
my @serialids = $query->multi_param('serialid');
38
my @serialids = $query->multi_param('serialid');
32
my $op = $query->param('op') || q{};
39
my $op = $query->param('op') || q{};
33
- 

Return to bug 24879