Commit Graph

57460 Commits

Author SHA1 Message Date
Baptiste Wojtkowski f5d9d12430
Update release notes for 24.11.18 release
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-08-06 14:50:03 +00:00
Baptiste Wojtkowski ecb6686b9d
Increment version for 24.11.18 release 2026-08-06 14:50:02 +00:00
Martin Renvoize 68b00b3bc1
Bug 42726: Add 26.11 release team
Add the 26.11 release team as voted at the development meeting.

Pedro Amorim as Release Manager, with Tomás Cohen Arazi and Martin
Renvoize as RM Assistants. Lisette Scheer as QA Manager with a
19-person QA team. David Cook as Security Release Manager.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2026-08-06 14:50:01 +00:00
David Cook d835fb1662
Bug 42847: [24.11] Fix unit test 2026-08-06 14:49:59 +00:00
Baptiste Wojtkowski 34190cd1d2
Revert "Bug 42726: Add 26.11 release team"
This reverts commit ee71d95015.
2026-08-06 08:48:15 +00:00
Kyle M Hall 5472968ec6
Bug 42847: [24.11] Prevent previously authenticated user (squashed)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-07-30 12:39:27 +00:00
Martin Renvoize ffad3df351
Bug 30233: (follow-up) Fix POD formatting codes in _apply_substitution
The angle-bracket delimiter notation in the POD prose (e.g.
PATTERN<DELIM>) caused the POD parser to treat the trailing letter of
each word as an unknown formatting code (N<>, T<>). Replace with
C<s/PATTERN/REPLACEMENT/FLAGS> and a parenthetical note that any
non-space delimiter is accepted.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 12:18:02 +00:00
Martin Renvoize 86a4896fd1
Bug 30233: (follow-up) Add tests for _apply_substitution and combined modifiers
- t/C4/ClassSplitRoutine/RegEx.t (new): exercises _apply_substitution via
  the public split_callnumber interface — basic substitution, alternate
  delimiters, \n/$n backrefs, /gi combined flag, /e rejection, and malformed
  or uncompilable rules (including the new logger warn path).
- t/Koha/Regex/Replacement.t: extend the subst() helper to handle the ig/gi
  combined modifier and add a subtest that confirms case-insensitive global
  replacement and backref case preservation.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 12:18:01 +00:00
Martin Renvoize 4bab6bf37f
Bug 30233: (follow-up) Log a warning when _apply_substitution discards a bad pattern
When eval { qr/$pattern/ } fails (e.g. the admin-configured s/// contains
an invalid regex), _apply_substitution previously returned silently with no
indication of why the rule was skipped. Add a Koha::Logger warn so the
failure appears in the log and is diagnosable without a debugger.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 12:18:00 +00:00
David Cook b6620915af
Bug 30233: (follow-up) fix some errors reported by QA tools
Note: While the methodology in Koha::Regex::Replacement may seem
bespoke, it's similar to how Python's re.sub(pattern, repl, string)
regex substitution works.

Unit tests:
prove -v t/Koha/Regex/Replacement.t \
    t/SimpleMARC.t \
    t/db_dependent/MarcModificationTemplates.t \
    t/Labels_split_Regex.t

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 12:17:58 +00:00
Sanjar Tulkinov Anvar o'g'li 868b54beb7
Bug 30233: Stop running call number split regexes as code
C4::ClassSplitRoutine::RegEx::split_callnumber ran the admin-configured rule
through eval "\$cn_item =~ $regex", executing arbitrary Perl. Parse the
rule as s<DELIM>PATTERN<DELIM>REPLACEMENT<DELIM>FLAGS, reject the /e flag,
compile the pattern with qr// and expand the replacement as data via
Koha::Regex::Replacement::expand_template, so the rule is applied without
eval.

Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 12:17:56 +00:00
Sanjar Tulkinov Anvar o'g'li 9f6b0da7ac
Bug 30233: Stop running MARC modification replacements as code
Koha::SimpleMARC::_modify_values and Koha::Items::apply_regex wrapped the
user replacement in a string and ran it through s///ee, so an interpolation
block such as \@{[ system(...) ]} executed arbitrary Perl. Expand the
replacement as data via Koha::Regex::Replacement::expand_template under a
single /e instead, which keeps capture-group replacements working but never
runs the input as code.

Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 12:17:00 +00:00
Sanjar Tulkinov Anvar o'g'li 4f021a1f1f
Bug 30233: Add Koha::Regex::Replacement to expand replacements as data
Add a small single-pass helper, Koha::Regex::Replacement::expand_template,
that expands a user-supplied regex replacement string as data: numbered
backreferences ($1..$n, ${n}, the legacy \1..\9 form), named captures
($+{name}, ${name}) and the \n \r \t escapes. Every other character is
copied through literally, so \@{...}/${...} interpolation blocks end up as
text rather than being run. This is used to replace the s///ee double-eval.

The routine is fully qualified at the call sites rather than exported, and
case folding is left out to keep it small.

Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 12:15:00 +00:00
Martin Renvoize 606f33b3d6
Bug 42746: (QA follow-up) Sanitize agefield and substitution field at the sink too
The original fix only whitelisted agefield, condition_field, and
substitution_field at the point they're saved in
tools/automatic_item_modification_by_age.pl, leaving the actual
consumer of the stored syspref, C4::Items::ToggleNewStatus, trusting
agefield and substitution field unchecked. agefield is spliced
directly into raw SQL (TO_DAYS($agefield)) and so can't be
parameterized like an ordinary value; substitution field reaches a
dynamic method call ($item->$field($value)). Any future or
alternate writer of the automatic_item_modification_by_age_configuration
syspref would have reopened both holes without touching the form at
all.

This adds the same allow-list validation directly in ToggleNewStatus
(falling back to the safe default agefield, or skipping the
substitution/condition, exactly as before for missing values), shares
the age-field allow-list between the two files via a new
GetAutomaticItemModificationAgeFields() in C4::Items so it can't drift
between them, and logs rejected values via Koha::Logger instead of
silently discarding them so tampering leaves an audit trail.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-07-30 10:29:28 +00:00
Jonathan Druart 3624bf8caa
Bug 42746: Sanitize condition and substitution fields
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>

Amended-by: Jonathan Druart:
Replace , with ;

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 3b53d6711d)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 10:27:41 +00:00
Jonathan Druart f7194d2173
Bug 42746: Sanitize age_field
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
(cherry picked from commit 5cf846f9f8)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 10:27:40 +00:00
Martin Renvoize cbc7086677
Bug 42747: (QA follow-up) Parameterize query, dedupe, and log rejections
The original fix only whitelisted image_name at the point it's saved
in edit-layout.pl, leaving the actual injection sink in create-pdf.pl
unparameterized. This adds defense-in-depth by fixing the query itself,
avoids a redundant duplicate call to get_all_image_names() (already
fetched earlier in the script as $image_names), and logs rejected
image_name values instead of silently discarding them so tampering
attempts leave an audit trail.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 5b825da072)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 10:27:39 +00:00
Jonathan Druart 26418d381e
Bug 42747: Prevent SQL injection via image_name in edit-layout
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit dc4403aae0)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 10:27:38 +00:00
Jonathan Druart 1a552017ac
Bug 42866: Prevent SQL injection in Koha::AddtionalContents->search_for_display
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit c5968932fc)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 10:27:37 +00:00
Pedro Amorim 224945dc60
Bug 39900: Preparation: Refactor public_query_search_params for reusability
Ensure no regressions are introduced, run:
prove t/db_dependent/Koha/AdditionalContents.t

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-07-30 10:27:33 +00:00
Jonathan Druart 46eb21993c
Bug 42749: Prevent SQL injection from GetInvoices (order_by)
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit cb22264499)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 10:11:25 +00:00
Laura_Escamilla 605b6fc4b5
Bug 43019: Prevent access to pages belonging to another library (staff side)
To test:
1. Create two patron accounts:
    * One patron whose home library matches the library assigned to the page.
    * One patron whose home library is different from the library assigned to the page.
2. Create a new page with the following settings:
    * Display location = OPAC
    * Library = a specific library
    * Publication date = Today
    * Title and Content = minimally necessary content
3. Save the page.
4. Right-click the OPAC link and copy the link address.
5. Open the link in an incognito or private browser window without signing in.
    * Confirm that the library-specific page is not displayed.
    * Confirm that a 404 page is shown.
6. In the incognito window, sign in using the patron account whose home library matches the page library.
7. Open the copied OPAC link again.
    * Confirm that the page is displayed.
8. Sign out and sign in using the patron account whose home library does not match the page library.
9. Open the copied OPAC link again.
    * Confirm that the page is not displayed.
    * Confirm that a 404 page is shown.
10. Edit the page and change Library to All libraries.
11. Open the OPAC link in an incognito or private browser window without signing in.
    * Confirm that the page is displayed.
12. While signed in as each patron account, open the OPAC link again.
    * Confirm that the page is displayed for patrons from both libraries.
13. Create or edit a page with the following settings:
    * Display location = Staff interface
    * Library = a specific library
    * Publication date = Today
    * Title and Content = minimally necessary content
14. Sign in to the staff interface using a staff account whose library matches the page library.
15. Open the page from the staff interface.
    * Confirm that the page is displayed.
16. Sign out and sign in using a staff account whose library does not match the page library.
17. Open the staff page link directly.
    * Confirm that the page is not displayed.
    * Confirm that a 404 page is shown.
18. Edit the staff page and change Library to All libraries.
19. Open the page while signed in with staff accounts from both libraries.
    * Confirm that the page is displayed for both accounts.
20. Repeat the OPAC and staff interface checks using Display location = Staff interface and OPAC.
    * Confirm that the page is displayed in both interfaces for users from the matching library.
    * Confirm that users from a different library receive a 404 page.
    * Confirm that pages assigned to All libraries are available in both interfaces.

Signed-off-by: David Cook <dcook@prosentient.com.au>
(cherry picked from commit 2dff8abf7f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 09:31:00 +00:00
David Cook 16299d41ab
Bug 43019: Fix branch comparison
This change fixes the branch comparison between the Page
and the user. Previously, it was doing a numeric "!=" and now it
does the string comparison "ne". Also, if no environmental variable
is set for the default branch, it defaults to an empty string
for anonymous (ie non-authenticated) users.

Test plan:
0. Apply the patch
1. restart_all
2. Log into the staff interface
3. Go to Tools
4. Click on "Pages"
5. Create a Page for All Libraries for the OPAC
6. Copy the "OPAC" link in the "Page URL" table cell and open it
in a private window or a separate browser
7. Note that the page appears
8. Now change the "Page" to a specific library
9. Revisit the URL in the private window
10. Note that it now gives a 404 error
11. Log into the OPAC with a user whose library matches the libary
of the Page
12. Note that now you can view the URL again
13. Change the library of the user or the Page
14. Note that you cannot see the Page now

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16df1a33b2)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 09:30:27 +00:00
Andrew Fuerste Henry a042773a78
Bug 41292: Rename whitelist to allowlist and add force_password_reset_when_set_by_staff
To test:
1 - Attempt to save a report containing "select force_password_reset_when_set_by_staff from categories"
2 - observe koha prevents this save
3 - apply patch, restart services
4 - repeat step 1
5 - observe your report now saves and runs successfully

While adding this new field to the list of allowed fields, I changed "whitelist" to "allowlist" as suggested by the terminology guide: https://wiki.koha-community.org/wiki/Terminology

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fdc57489a1)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit be019f4f92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-22 11:24:30 +02:00
Martin Renvoize 305ccb6482
Bug 41510: (RM follow-up) Perltidy a missed file at merge time
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 7fd796d8f8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit fd9be777fb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-22 11:17:25 +02:00
Paul Derscheid c4e7d5109a
Bug 41510: Handle undefined itemtype in item->effective_bookable
- Guard against undefined itemtype before calling ->bookable on it
- Return 0 (not bookable) when no itemtype is found and item-level
  bookable is not defined

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 99410bc27c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 327cb59546)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-22 11:17:24 +02:00
Paul Derscheid d524290897
Bug 41510: Add test for effective_bookable with missing itemtype
- Add test case for the scenario where an item has no itemtype
  because both items.itype and biblioitems.itemtype are NULL
- Note: We must set biblioitems.itemtype to NULL before creating the
  item because Koha::Item->store() automatically populates itype from
  biblioitems.itemtype when itype is not set

Test plan:
- Apply this patch only
- Run: prove t/db_dependent/Koha/Item.t :: effective_bookable
- Verify test 6 FAILS with "Can't call method 'bookable' on an
  undefined value"
- Apply the follow-up patch
- Run the test again
- Verify all tests PASS

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 26ffc16c38)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 00457f7e73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-22 11:17:23 +02:00
Hammat Wele 0228735b8b
Bug 41102: Error 500 on the About page when biblioserver Zebra configuration is missing
When either the <listen id=biblioserver> entry or the
<server id=biblioserver listenref=biblioserver> section
is not present in koha-conf.xml, the Staff interface > About page
triggers a 500 Internal Server Error.

Test plan:
1. Edit koha-conf.xml and Comment out:
   <!--<listen id="biblioserver">unix:/path/to/zebradb/bibliosocket</listen>-->
2. Restart Apache: sudo systemctl restart apache2 (or restart_all)
3. Go to Intranet > About
   ==> Internal Server Error (500)
4. Now restore the <listen> line and instead comment out the entire
   <server id=biblioserver listenref=biblioserver>...</server> block.
   (Note that the commenting around <!-- The stuff below is used to enable SRU...
    interferes with adding a closing comment after </server> -
    close the comment before that section and add a comment around </server>.)
5. Repeat step 2, 3
   ==> Internal Server Error (500)
6. Apply the patch
7. Repeat step 2, 3
   ==> There is no Error (500)
       Note: Zebra status: Error message from Zebra: 10004
8. Uncomment <server id=biblioserver  listenref=biblioserver> </server>
   and Repeat Step 1
9. Repeat step 2, 3
   ==> There is no Error (500)
       Note: Zebra status: Zebra server seems not to be available. Is it started?

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 03fc6994a5)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 1b837562b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-17 14:33:47 +02:00
Andreas Roussos 5e0d278eab
Bug 41337: Add missing Bash variable to `koha-create`
When creating a new Koha instance using the two-step workflow
(`koha-create --request-db <instance>`, followed by
`koha-create --populate-db <instance>`), some log files under
/var/log/koha/<instance>/ end up with incorrect ownership.

Specifically, intranet-error.log and opac-error.log are owned
by root:root instead of <instance>-koha:<instance>-koha.

This patch fixes that.

Test plan (tailored for KTD):

1) Before applying this patch, run the following commands
   inside your KTD Koha container:

   $ sudo koha-create --request-db test1
   $ SQLPASS=`sudo grep password: test1-db-request.txt | cut -c 16-`
   $ mysql -hdb -uroot -ppassword -e "CREATE DATABASE koha_test1;"
   $ mysql -hdb -uroot -ppassword -e "GRANT ALL PRIVILEGES ON koha_test1.* TO 'koha_test1'@'%' IDENTIFIED BY '${SQLPASS}';"
   $ mysql -hdb -uroot -ppassword -e "FLUSH PRIVILEGES;"
   $ sudo koha-create --populate-db test1

   $ ls -l /var/log/koha/test1/
     total 8
     -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:35 indexer-error.log
     -rw-r--r-- 1 test1-koha test1-koha 1278 Feb  9 15:35 indexer-output.log
     -rw-r--r-- 1 root       root          0 Feb  9 15:35 intranet-error.log
     -rw-r--r-- 1 root       root          0 Feb  9 15:35 opac-error.log
     -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:35 worker-error.log
     -rw-r--r-- 1 test1-koha test1-koha 1828 Feb  9 15:35 worker-output.log
     -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:35 zebra-error.log
     -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:35 zebra-output.log

   Notice the incorrect user/group ownership on two
   files: `intranet-error.log` and `opac-error.log`.

2) Apply this patch, remove the `test1` instance along
   with the database request text file, and copy the
   modified script to its system-wide location:

   $ sudo koha-remove test1
   $ sudo rm test1-db-request.txt
   $ sudo cp debian/scripts/koha-create /usr/sbin/koha-create

3) Repeat the commands in Step 1. This time, the output of
   the last command should resemble the following:

   total 8
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 indexer-error.log
   -rw-r--r-- 1 test1-koha test1-koha 1520 Feb  9 15:42 indexer-output.log
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 intranet-error.log
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 opac-error.log
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 worker-error.log
   -rw-r--r-- 1 test1-koha test1-koha 1828 Feb  9 15:42 worker-output.log
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 zebra-error.log
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 zebra-output.log

   All files should now have the correct user/group ownership.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ee861e256)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit a45a642f35)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-17 14:24:52 +02:00
Jonathan Druart 98cb9971ff
Bug 42277: Remove JS error when viewing a subscription
If no orders exist yet, there is a JS error in the console:
Uncaught TypeError: can't access property "DataTable", table is
undefined

Test plan:
0. Do no apply this patch
1. Create a new subscription and go to the detail view
2. Open the console and notice the JS error
3. Apply this patch
4. Confirm that the JS error is gone
5. Create an order from this subscription
6. Confirm that the orders table is displayed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit da121583a4)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit da718a2a57)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-17 14:16:50 +02:00
Jonathan Druart c188a80fbc
Bug 40744: Ignore --del-exp-selfreg if pref is not set
If PatronSelfRegistration we should ignore (i.e. do nothing) if
--del-exp-selfreg is passed to cleanup_database.pl

It prevents the script to warn that the pref is not set.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit d331c7aba8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 768f2a4882)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-17 14:15:32 +02:00
David Cook bc16381ca5
Bug 42317: Update minimum version for MARC::File::XML
This patch updates cpanfile to reflect the real minimum version
needed for MARC::File::XML. This is particularly important
due to vulnerabilities in version 1.0.1

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: mason james <mtj@kohaaloha.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 00655de4d0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 8943833fb1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-17 14:14:34 +02:00
Hammat Wele f970d0b7f3
Bug 41690: (follow-up) Add test
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a0b92c0bb6)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 9b394ddb7a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-17 14:12:38 +02:00
Hammat Wele a969fe51a2
Bug 41690: Add MARC21 245 (subtitle) to Cite option
The "Cite" option in the OPAC is missing the subtitle (245) in MARC21.

To recreate:
1. Add a record or find a record with a subtitle (in KTD, biblionumber 58 has a 245 http://localhost:8081/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=58
2. In the OPAC, go to the record
   http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=58
3. Click "Cite"
   --> The subtitle is not in any of the citations
4. Apply the patch
5. Repeat step 2 and 3
    --> The subtitle is now shown

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 412e4e4d95)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit ea6fd886a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-17 14:11:19 +02:00
Lucas Gass a524dbd403
Bug 42262: encodeURIComponent for the 006 value
To test:
1- have a MARC record with Type of Material "BKS - Books" that does not have an 006 defined (biblio 1 in the KTD default data will work)
2- edit the biblio in the basic editor
3- open the tag editor for the 006
4- observe that the values along the top of the tag editor window show a value of "" (blank) in position 17
5- click Save in the tag editor window
6- confirm that the values in the 006 tag end with a space
7- open the 006 tag editor again
8- observe that the values along the top of the tag editor window no longer show any value for position 17. Instead, they end with the zero in position 16
9- click Save in the tag editor window
10- confirm that the values in the 006 tag now end with a zero, not followed by a space
11- save your biblio
12- edit the biblio in the basic editor again, get warning "The following fixed-length control field(s) have an invalid length: 006. Please fix."
13- APPLY PATCH and restart_all
14. Try editing the 006 value again, the whitespace should be preserved and you get no error.

Signed-off-by: Justin Swink <Justin.Swink@littleelm.gov>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1a0501f5e8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit f26f323aee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-17 14:09:03 +02:00
Lucas Gass b25d8814ae
Bug 37143: Do not allow required fields with only whitespace to be submitted
To test:
1. Make some fields for OPAC self registration required.
2. Create a new patron via self reg.
3. Fill out those required fields as an empty string like "  ".
4. Submit the form, it succeeds.
5. APPLY PATCH, restart_all
6. Try again. Required fields with only whitespace are treated as if they were empty.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 12426b5924)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 01df1563bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-08 07:39:35 +02:00
Paul Derscheid 5563202f84
Bug 41352: Add link to the manual for the Bookings to Collect page
To test:
- Go to Circulation > Bookings to collect
- Click Help
- Verify it links to the correct manual section

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f53159bfa4)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit d6f529c38c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-08 07:39:34 +02:00
Jonathan Druart dc4144ff7b
Bug 42130: ERM - Index biblio when local title is created/updated
The indexation step has been removed by
  commit d2820f57d6
  Bug 34788: (QA follow-up)

Koha/ERM/EHoldings/Title.pm
-            C4::Biblio::ModBiblio( $record, $self->biblio_id, '' );
+            C4::Biblio::ModBiblio( $record, $self->biblio_id, '', { skip_record_index => 1 } );

From the commit message:
2) The background job now uses skip_record_index to avoid queuing indexing jobs for every new biblio and instead queues one job at the end

it's then missing when we add or edit a local title.

Test plan:
1 - Enable ERMModule
2 - Go to ERM
3 - eHoldings->Titles
4 - New title
5 - Populate the form
6 - Check the create bibliographic record box
7 - Save
=> Confirm that the biblio is now indexed
8. Edit the title, modify a value, tick the box, save
=> Confirm that the biblio is now indexed with the new value

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5dcec8b803)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 1dac2edcf6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-08 07:39:34 +02:00
Eric Phetteplace 379794d548
Bug 42723: Purchase suggestion 500 when EmailPurchaseSuggestions is set to BranchEmailAddress
Testing plan:
- Set EmailPurchaseSuggestions to BranchEmailAddress
- Go to create suggestion on the staff side /suggestion/suggestion.pl?op=add_form
- Create a suggestion with Library: Any
- 500 error: inbound_email_address is not a method of undef
- Apply patch & repeat
- Suggestion created

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 33a8dc5d6f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit f699bb4c50)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-08 07:39:33 +02:00
Martin Renvoize ee71d95015
Bug 42726: Add 26.11 release team
Add the 26.11 release team as voted at the development meeting.

Pedro Amorim as Release Manager, with Tomás Cohen Arazi and Martin
Renvoize as RM Assistants. Lisette Scheer as QA Manager with a
19-person QA team. David Cook as Security Release Manager.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f0bb03d6e9)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit bbff807136)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-07-08 07:39:32 +02:00
Martin Renvoize 63bf386697
Bug 42726: Fix 25.11 QA team list to match dashboard
Update the 25.11 QA team to reflect the definitive list from the
dashboard. Remove Aleisha Amohia and Julian Maurice who did not
appear in the final count, and add John Vinke, Matt Blenkinsop,
Alex Carver and Victor Grousset who did. Reorder by descending
QA count.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5d12a83751)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-08 07:39:31 +02:00
Fridolin Somers 926655c0a8
Update release notes for 24.11.17 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-06-24 10:34:08 +02:00
Fridolin Somers bd3ef5f037
Increment version for 24.11.17 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-06-24 10:20:07 +02:00
Jonathan Druart 8ddc98a6fc
Bug 42735: [24.11] Fix SQL injection
This change fixes an SQL injection in the circulation stats.

Test plan:
0. Apply the patch
1. sudo koha-plack --restart kohadev
2. Go to /cgi-bin/koha/reports/issues_stats.pl
3. Try out a bunch of options
4. Try to break it
5. Note that you just get output and no errors

Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit da14a2f672330d445b442cd057bd72688bfb0c37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-06-18 15:50:41 +02:00
Jonathan Druart caa66ac91f
Bug 42369: [24.11] Use C4::Context::csv_delimiter for delimiter validation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bd98e67192f955faf402b56f8933bc3997ce9e7e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-06-18 15:50:41 +02:00
David Cook f6049a2d27
Bug 42369: [24.11] Fix SQL injection
This change fixes SQL injection in bor issues top

Test plan:
0. Apply patch
1. sudo koha-plack --restart kohadev
2. Go to /cgi-bin/koha/reports/bor_issues_top.pl
3. Try out all the different options
4. Try to break it
5. Note that you get output and no errors

Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0d1efd812b9d1d6ac8fe71b7115f5368b8ba271f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-06-18 15:50:41 +02:00
Jonathan Druart 79b9b1cd91
Bug 42368: [24.11] Use C4::Context::csv_delimiter for delimiter validation
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit ab36cbffc837a3e7ac7dcd501fb510ea5c7059b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-06-18 15:50:40 +02:00
David Cook 92865a3bec
Bug 42368: [24.11] Fix SQL injection in issue avg stats
This change fixes SQL injection in issues avg stats

Test plan:
0. Apply the patch
1. sudo koha-plack --restart kohadev
2. Go to /cgi-bin/koha/reports/issues_avg_stats.pl
3. Try out all the different options
4. Try to break the report
5. Note that you always get output instead of errors

Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit f0d3bf850b8ff85c9393126763b1477d1cdc5c09)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-06-18 15:50:40 +02:00
Jonathan Druart 202dafc63b
Bug 42363: [24.11] Use C4::Context::csv_delimiter for delimiter validation
(cherry picked from commit 710c20075396beaeee056efeec28fc95d10fbb1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-06-18 15:50:39 +02:00
David Cook 171c7044fd
Bug 42363: [24.11] Fix SQL injection
This change cixes an SQL injection in cat stats

Test plan:
0. Apply patch
1. sudo koha-plack --restart kohadev
2. Go to /cgi-bin/koha/reports/catalogue_stats.pl
3. Try out different values
4. Try to break the report
5. Note that you just get output and not errors

Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
(cherry picked from commit a9f741b79d231d81e7cdaef2201b8c00c9efe349)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-06-18 15:50:39 +02:00