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

(-)a/misc/migration_tools/koha-svc.pl (-1 / +1 lines)
Lines 106-112 sub new { Link Here
106
    $ua->cookie_jar({});
106
    $ua->cookie_jar({});
107
107
108
    my $get_resp   = $ua->get("$url/authentication");
108
    my $get_resp   = $ua->get("$url/authentication");
109
    my $csrf_token = $get_resp->header('X-CSRF-TOKEN');
109
    my $csrf_token = $get_resp->header('CSRF-TOKEN');
110
    $self->{csrf_token} = $csrf_token;
110
    $self->{csrf_token} = $csrf_token;
111
111
112
    my $resp = $ua->post(
112
    my $resp = $ua->post(
(-)a/svc/authentication (-2 / +1 lines)
Lines 62-66 if ( $status eq "ok" ) { Link Here
62
    );
62
    );
63
    $csrf_token = Koha::Token->new->generate_csrf( { session_id => scalar $sessionID } );
63
    $csrf_token = Koha::Token->new->generate_csrf( { session_id => scalar $sessionID } );
64
}
64
}
65
print $query->header( -type => 'text/xml', cookie => $cookie, -'X-CSRF-TOKEN' => $csrf_token );
65
print $query->header( -type => 'text/xml', cookie => $cookie, -'CSRF-TOKEN' => $csrf_token );
66
print XMLout( { status => $status }, NoAttr => 1, RootName => 'response', XMLDecl => 1 );
66
print XMLout( { status => $status }, NoAttr => 1, RootName => 'response', XMLDecl => 1 );
67
- 

Return to bug 36700