Koha-clms/opac
David Cook 0fd9463f38
Bug 41261: Valid inputs to unapi
This change adds data validation to the "unapi" API endpoint.

Test plan:
0. Apply the patch
1. Go to http://localhost:8080/cgi-bin/koha/unapi
2. Note the 400 HTTP response code
3. Go to http://localhost:8080/cgi-bin/koha/unapi?id=bad
4. Note the 400 HTTP response code
5. Go to http://localhost:8080/cgi-bin/koha/unapi?id=koha:biblionumber:1&format=bad
6. Note the XML response listing the available formats for that ID
7. Go to http://localhost:8080//cgi-bin/koha/unapi?id=koha:biblionumber:1
8. Note the XML response listing the available formats for that ID
9. Go to http://localhost:8080//cgi-bin/koha/unapi?format=mods
10. Note the 400 HTTP response code
11. Go to http://localhost:8080//cgi-bin/koha/unapi?id=koha:biblionumber:1&format=mods
12. Note the MODS format returned for biblionumber 1

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-03-27 13:50:53 +00:00
..
clubs
…
errors
…
external/overdrive
…
sci Revert "Bug 36586: Define self-checkin timer using Javascript class" 2025-07-31 14:34:37 +02:00
sco Bug 39738: Obsolete call on system preference 'SelfCheckHelpMessage' 2025-09-29 10:55:16 +02:00
svc
…
ilsdi.pl Bug 36867: (follow-up) Don't check IP if ILS-DI disabled 2025-05-23 12:18:30 +02:00
maintenance.pl
…
oai.pl
…
opac-ISBDdetail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-02-18 19:17:20 +01:00
opac-MARCdetail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-02-18 19:17:20 +01:00
opac-account-pay-return.pl
…
opac-account-pay.pl
…
opac-account.pl
…
opac-addbybiblionumber.pl Bug 40585: Check on Biblios->find in addbybiblionumber scripts 2025-10-16 11:17:08 +02:00
opac-alert-subscribe.pl
…
opac-alert-subscriptions.pl
…
opac-article-request-cancel.pl
…
opac-authorities-home.pl
…
opac-authoritiesdetail.pl
…
opac-basket.pl
…
opac-blocked.pl
…
opac-browse.pl
…
opac-browser.pl
…
opac-changelanguage.pl
…
opac-course-details.pl
…
opac-course-reserves.pl
…
opac-curbside-pickups.pl Bug 38813: Make the 'curbside pickups' tab display selected if so 2025-02-04 21:46:04 +01:00
opac-detail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-02-18 19:17:20 +01:00
opac-discharge.pl
…
opac-dismiss-message.pl
…
opac-downloadcart.pl Bug 35975: Show biblionumber when download cart as BibTeX 2025-03-19 23:57:49 +01:00
opac-downloadshelf.pl
…
opac-export.pl Bug 39485: Fix wide character in print-warn in opac-export 2025-09-29 09:55:22 +02:00
opac-holdshistory.pl
…
opac-ics.pl
…
opac-idref.pl
…
opac-illrequests.pl Bug 41237: (QA follow-up): Utilize available logged in user object 2026-03-06 15:00:24 +00:00
opac-image.pl
…
opac-imageviewer.pl
…
opac-issue-note.pl
…
opac-library.pl
…
opac-main.pl
…
opac-memberentry.pl Bug 39737: Obsolete call on system preference 'PatronSelfRegistrationAdditionalInstructions' 2025-10-03 14:58:52 +02:00
opac-messaging.pl Bug 38903: Fix theme in some getTranslatedLanguages calls 2025-09-29 09:37:15 +02:00
opac-modrequest-suspend.pl
…
opac-modrequest.pl Bug 40929: Add $hold test in opac-modrequest 2025-10-31 15:12:36 +00:00
opac-mymessages.pl
…
opac-news-rss.pl
…
opac-overdrive-search.pl
…
opac-page.pl
…
opac-passwd.pl
…
opac-password-recovery.pl Bug 38772: Typo 'minPasswordPreference' system preference 2025-03-19 23:57:37 +01:00
opac-patron-consent.pl Bug 41662: Prevent CSRF on opac-patron-consent.pl 2026-01-22 14:42:47 +00:00
opac-patron-image.pl
…
opac-privacy.pl
…
opac-ratings.pl
…
opac-readingrecord.pl Bug 38102: Fix default sort order 2025-08-01 14:46:04 +02:00
opac-recall.pl
…
opac-recalls.pl
…
opac-registration-verify.pl Bug 39737: Obsolete call on system preference 'PatronSelfRegistrationAdditionalInstructions' 2025-10-03 14:58:52 +02:00
opac-renew.pl
…
opac-reportproblem.pl
…
opac-request-article.pl
…
opac-reserve.pl Bug 33224: OPACHoldsIfAvailableAtPickup and no on-shelf holds don't mix well 2025-10-03 16:17:15 +02:00
opac-reset-password.pl
…
opac-restrictedpage.pl
…
opac-retrieve-file.pl
…
opac-review.pl
…
opac-routing-lists.pl
…
opac-search-history.pl
…
opac-search.pl Bug 39736: Remove obsolete call on system preference 'OPACResultsSidebar' 2025-10-03 14:57:01 +02:00
opac-sendbasket.pl
…
opac-sendshelf.pl Bug 39374: Add feature to block sending of lists from OPAC 2025-08-06 16:32:58 +02:00
opac-serial-issues.pl
…
opac-shareshelf.pl
…
opac-shelves.pl Bug 39148: Correct sort by publicationdate in OPAC lists 2025-08-06 13:38:38 +00:00
opac-showmarc.pl
…
opac-showreviews.pl
…
opac-suggestions.pl
…
opac-tags.pl Bug 38969: Prevent JS error when adding tags with quote at the OPAC 2025-04-24 18:42:31 +02:00
opac-tags_subject.pl
…
opac-topissues.pl
…
opac-user.pl Bug 39735: Fix typo in system preference call 'OPACFineNoRenewalsIncludeCredit' 2025-09-29 11:19:13 +02:00
opac-virtual-card.pl
…
tracklinks.pl
…
unapi Bug 41261: Valid inputs to unapi 2026-03-27 13:50:53 +00:00