]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 11 Sep 2024 15:51:31 +0000 (15:51 +0000)
commit3b993d2a14907a0ff6a6921539a6a7cdcd5678a3
tree6eba8b11430ba6a38bb18fac1314d6c5a7e67f32
parente486a1e28ea7a34aba382205775fceab80f9256b
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>
(cherry picked from commit bf427a2947113f73186c5de5f85479306e49daf5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
misc/migration_tools/koha-svc.pl