]> git.koha-community.org Git - koha.git/commit
Bug 37553: Consistently send Csrf-Token in request header
authorDavid Cook <dcook@prosentient.com.au>
Fri, 2 Aug 2024 01:49:06 +0000 (01:49 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 2 Aug 2024 16:59:59 +0000 (18:59 +0200)
commitbf427a2947113f73186c5de5f85479306e49daf5
tree96a7d28aed5be4fbc1e06cebf7afddf89bf6f33f
parenteabd792ee93ce4dd84b36f143ee2ccaa184ed147
Bug 37553: Consistently send Csrf-Token in request header

This change consistently sends the Csrf-Token in the request header.
Previously, one POST sent it in the request body, while the other POST
sent it in the request header. Since we're using an API, it's best
for us to always send it in the request header

Test plan:
0. Apply the patch
1. perl ./misc/migration_tools/koha-svc.pl \
http://localhost:8081/cgi-bin/koha/svc koha koha 29 > bib-29.xml
2. perl ./misc/migration_tools/koha-svc.pl \
http://localhost:8081/cgi-bin/koha/svc koha koha 29 bib-29.xml
3. Note that the following appears in STDOUT and there is no 403 error:
"update 29 from bib-29.xml"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
misc/migration_tools/koha-svc.pl