Koha-clms/C4
David Cook b20741c4eb Bug 38826: Make check_api_auth $sessionID consistent
This change makes $sessionID consistently return using the session
ID and not sometimes the session object.

Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. curl -v 'http://localhost:8081/cgi-bin/koha/svc/authentication' --cookie-jar /tmp/test.cookies
3. Note the Csrf-Token header value
4. Replace the <CSRF-TOKEN>, <USERID>, and <PASSWORD> tokens in the next step
using the appropriate values (eg the CSRF-TOKEN is from the previous step)
5. curl -v -H "Content-Type: application/x-www-form-urlencoded" \
    -H "Csrf-Token: <CSRF-TOKEN>" -XPOST \
    'http://localhost:8081/cgi-bin/koha/svc/authentication' \
    -d "login_userid=<USERID>&login_password=<PASSWORD>" \
    --cookie /tmp/test.cookies --cookie-jar /tmp/test.cookies
6. curl -XGET -v 'http://localhost:8081/cgi-bin/koha/svc/bib/29' \
    --cookie /tmp/test.cookies > rec.marcxml
7. curl -v 'http://localhost:8081/cgi-bin/koha/svc/authentication' \
    --cookie /tmp/test.cookies --cookie-jar /tmp/test.cookies
8. Note the Csrf-Token header value
9. curl -H "Content-Type: text/xml" -H "Csrf-Token: <CSRF-TOKEN>" \
    -XPOST -v 'http://localhost:8081/cgi-bin/koha/svc/bib/29' \
    --cookie /tmp/test.cookies --data @rec.marcxml

Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04dbbcc2f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
2025-03-20 02:56:04 +00:00
..
AuthoritiesMarc
…
Barcodes
…
ClassSortRoutine
…
ClassSplitRoutine
…
Creators Bug 37720: Prevent XSS in label creator 2024-10-01 13:42:28 +00:00
External
…
Form
…
Heading Bug 36917: (follow-up) Remove Elasticsearch warnings and tidy 2024-05-24 15:36:42 +02:00
ILSDI Bug 38233: respect OPAC visibility for ILS-DI GetRecords 2024-12-05 18:10:41 +00:00
Installer
…
Labels Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-07 23:02:54 +00:00
Linker Bug 35125: Respect LinkerConsiderThesaurus in update_cache 2024-10-25 21:35:48 +00:00
Members
…
OAI
…
Output
…
Patroncards
…
Reports Bug 37508: (QA follow-up) Use ->check_columns 2024-08-12 15:35:15 -03:00
SIP Bug 37816: (QA follow-up) Avoid repetition, typo and pipe test 2025-02-05 01:45:46 +00:00
Search
…
Serials
…
Utils/DataTables
…
Accounts.pm
…
Acquisition.pm Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-07 23:02:54 +00:00
Auth.pm Bug 38826: Make check_api_auth $sessionID consistent 2025-03-20 02:56:04 +00:00
Auth_cas_servers.yaml.sample
…
Auth_with_cas.pm
…
Auth_with_ldap.pm Bug 36822: LDAP - Add discard_changes 2024-11-15 16:12:30 +00:00
Auth_with_shibboleth.pm Bug 36822: Shibboleth - Add discard_changes 2024-11-15 16:12:29 +00:00
AuthoritiesMarc.pm Bug 33348: (follow-up) Fix if no 008 defined 2024-12-05 22:12:00 +00:00
Barcodes.pm Bug 37070: (QA follow-up) Fix qa script issues 2024-11-18 23:24:53 +00:00
Biblio.pm Bug 30648: Tidy 2024-12-05 16:47:04 +00:00
Breeding.pm
…
Budgets.pm
…
Calendar.pm
…
Charset.pm
…
Circulation.pm Bug 37505: (QA follow-up) Don't log return stat if ignore_localuse and no checkout 2024-11-19 15:59:42 +00:00
ClassSortRoutine.pm
…
ClassSource.pm
…
ClassSplitRoutine.pm
…
Context.pm Bug 36081: Use multivalue_preference 2025-02-24 20:43:45 +00:00
Contract.pm
…
CourseReserves.pm
…
Creators.pm
…
HTML5Media.pm
…
Heading.pm Bug 30047: (follow-up) Fix failing tests 2024-05-13 16:24:18 +02:00
HoldsQueue.pm Bug 38126: Skip allocated holds when filling from transport cost matrix 2024-10-25 21:27:10 +00:00
ImportBatch.pm
…
ImportExportFramework.pm Bug 37606: Fix framework export module to escape double quotes 2024-11-19 15:55:13 +00:00
InstallAuth.pm
…
Installer.pm
…
ItemCirculationAlertPreference.pm
…
Items.pm Bug 37550: CheckItemPreSave should run barcodes through barcodedecode 2024-12-05 21:50:39 +00:00
Koha.pm Bug 36750: Use the same label for Zebra 2024-05-07 17:41:19 +02:00
Labels.pm
…
Languages.pm Bug 35582: Supress possible warning 2024-04-29 18:53:13 +02:00
Letters.pm Bug 37642: Generated letter should use https in header 2024-11-15 16:26:52 +00:00
Linker.pm
…
Log.pm Bug 25159: (QA follow-up) Tidy changes 2024-05-02 16:47:44 +02:00
MarcModificationTemplates.pm
…
Matcher.pm
…
Members.pm
…
Message.pm
…
Output.pm
…
Overdues.pm Bug 38303: Set item's replacement price to defaultreplacecost if 0.00 2024-12-05 21:18:46 +00:00
Patroncards.pm
…
Record.pm Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-07 23:02:54 +00:00
Reports.pm
…
Reserves.pm Bug 38531: add diff when reverting hold 2025-03-20 02:13:06 +00:00
Ris.pm
…
RotatingCollections.pm
…
SMS.pm
…
Scheduler.pm
…
Scrubber.pm
…
Search.pm Bug 35138: Add the ability to manage ES facets 2024-04-30 12:00:56 +02:00
Serials.pm Bug 38829: Sanitize GetLateOrMissingIssues inputs 2025-02-03 23:20:25 +00:00
Service.pm
…
ShelfBrowser.pm
…
SocialData.pm
…
Stats.pm
…
Suggestions.pm
…
TTParser.pm Bug 36171: Fix template toolkit tags split by HTML parser 2024-11-20 18:42:06 +00:00
Tags.pm Bug 36785: Typo unreconized and bilbio in tags code 2024-05-17 10:36:35 +02:00
Templates.pm Bug 38467: Make uri and url filters rfc3986 when using C4::Template 2025-02-10 02:50:12 +00:00
TmplToken.pm
…
TmplTokenType.pm
…
UsageStats.pm Bug 26176: (QA follow-up) Branch -> Library 2024-05-23 17:51:18 +02:00
XISBN.pm
…
XSLT.pm Bug 38100: (QA follow-up) Tidy changes in C4/XSLT.pm 2024-12-05 22:09:46 +00:00