Go to file
Jonathan Druart 8b73d2bb3b Bug 37720: Prevent XSS in label creator
Because labels/label-edit-batch.pl fills a DataTable with things that include
a link created by C4/Creators/Lib.pm, it outputs them with the $raw filter,
so HTML in author/title/callnumber is executed in the label batch editor.
While we wait for a fix that moves the link creation into the template and
out of C4, encoding HTML in Lib.pm for the bits going into the link, and
switching from $raw to the html filter for the rest of the things, will at
least get rid of the XSS.

Test plan:
 1. Without this patch, but with the patch from bug 37654 so you don't get
    alert()s in batch import, download attachment 170675 [details]
 2. Cataloging - Stage records for import - browse to the downloaded file -
    Upload file - when the upload finishes Stage for import - when staging
    finishes View batch (get alert()s if you didn't apply bug 37654) - Import
    this batch into the catalog
 3. Once the import finishes, Cataloging - Manage staged records
 4. In the row for your import, in the # Items column, click "(Create label
    batch)"
 5. In the "Label batch #n created" message, click the link to the batch #
 6. Because the batch includes a call number with an open <script>, you'll
    get XSS alert()s and then one about something going wrong while loading
    the table, with only one of the two records showing in the batch editor
 7. Apply patch, restart_all
 8. Cataloging - Label creator - Manage Label batches
 9. In the row for your batch, click Edit
10. You will see both labels, with their attempts at XSS visible as text
    rather than being interpreted as HTML

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2024-09-23 05:36:32 +00:00
C4 Bug 37720: Prevent XSS in label creator 2024-09-23 05:36:32 +00:00
Koha Bug 37508: (QA follow-up) Move check to Koha::Report, extend 2024-08-13 11:05:35 -03:00
acqui Bug 35927: Selecting MARC framework again doesn't work when adding to basket from an external source 2024-05-30 19:10:54 +00:00
admin Bug 33099: Add missing MARC21 Match authority mappings so "Search all headings" search works 2024-05-30 19:29:19 +00:00
api Bug 37018: Add 400 response definition to all routes 2024-07-23 04:42:52 +00:00
authorities Bug 36792: Limit POSIX imports 2024-05-31 15:56:28 +00:00
basket Bug 34731: Don't call SendQueuedMessages if message_id is bad 2023-09-14 07:54:48 -10:00
bin Bug 20582: Turn Koha into a Mojolicious application 2020-10-06 12:00:04 +02:00
catalogue Bug 36834: (Bug 29697 follow-up) Koha explodes when trying to open in Labeled MARC view a bibliographic record with an invalid biblionumber 2024-05-31 13:11:16 +00:00
cataloguing Bug 36792: Limit POSIX imports 2024-05-31 15:56:28 +00:00
circ Bug 37210: Properly escape SQL query parameters by using bind values 2024-07-23 23:16:39 +00:00
clubs Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
course_reserves Bug 20256: Use new methods 2023-02-02 11:59:26 -03:00
debian Bug 36531: Serve text/javascript compressed, like application/javascript is 2024-05-28 17:46:35 +00:00
docs Bug 35504: Corrections to wiki team 2024-02-02 16:16:48 +00:00
erm Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
errors Bug 29420: HTTP status code incorrect when calling error pages directly under Plack/PSGI 2022-04-20 09:03:39 -10:00
etc Bug 34041: (follow-up) escape double dashes to prevent issues 2024-05-30 19:07:54 +00:00
ill Bug 28909: Allow illview to use backend template 2022-08-09 13:21:39 -03:00
installer Increment version for 23.05.14 release 2024-08-13 11:05:38 -03:00
koha-tmpl Bug 37720: Prevent XSS in label creator 2024-09-23 05:36:32 +00:00
labels Bug 36511: Some scripts missing a dependency following Bug 24879 2024-04-11 14:28:13 +00:00
lib/CGI/Session/Serialize Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
members Bug 33849: Do not reset new patrons home library when error occurs 2024-05-30 19:15:53 +00:00
misc Update release notes for 23.05.14 release 2024-08-14 07:59:13 +02:00
offline_circ Bug 33961: Remove built-in offline circ tool 2023-07-17 08:18:59 +01:00
opac Bug 13342: Not logged user can place a review/comment 2024-09-11 03:46:30 +00:00
patron_lists Bug 16446: Add ability to add patrons to list by borrowernumber 2021-10-21 12:24:04 +02:00
patroncards Bug 24001: Fix patron card template edition 2022-04-28 10:49:20 -10:00
plugins Bug 30367: (follow-up) Same adjustment for gitlab 2023-05-05 10:18:57 -03:00
pos Bug 34731: Don't call SendQueuedMessages if message_id is bad 2023-09-14 07:54:48 -10:00
recalls Bug 34013: Recalls awaiting pickup doesn't show count on each tab 2023-07-17 14:51:00 +01:00
reports Bug 37508: Don't return Internal server error when running report 2024-08-13 11:05:36 -03:00
reserve Bug 35979: Check pref before inserting holds_queue background jobs 2024-05-28 20:22:48 +00:00
reviews Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
rotating_collections Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
serials Bug 37247: [23.05.x] Send Koha::Subscription to template 2024-07-25 02:17:34 +00:00
services Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
skel
…
suggestion Bug 34963: Restore the ability to blank fields when editing a suggestion 2024-05-28 19:45:09 +00:00
svc Bug 37508: Throw error if password column is detected in SQL report 2024-08-13 11:05:32 -03:00
t Bug 37508: (QA follow-up) Use ->check_columns 2024-08-13 11:05:36 -03:00
tags Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
tools Bug 37488: Validate paths in datalink.txt/idlink.txt files 2024-08-13 11:05:30 -03:00
virtualshelves Bug 36858: Remove warnings 2024-05-31 13:21:45 +00:00
xt Bug 37018: Add 400 response definition to all routes 2024-07-23 04:42:52 +00:00
.editorconfig Bug 27375: Set YAML file settings in .editorconfig 2021-11-03 15:40:52 +01:00
.eslintrc.json
…
.gitignore Bug 35174: Add misc/translator/po to .gitignore 2023-11-22 09:34:59 +01:00
.htaccess
…
.mailmap Bug 36943: (follow-up) 24.05.00 - Update .mailmap 2024-05-31 15:30:58 +00:00
.perlcriticrc Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
.perltidyrc Bug 30002: Adjust perltidy 2023-07-12 07:55:00 +01:00
.proverc.dist Bug 19821: Install sample data, ES mappings and Version syspref 2021-10-25 11:27:40 +02:00
.stylelintrc.json Bug 31528: (follow-up) A few additional rules 2022-10-03 08:23:15 -03:00
INSTALL Bug 26617: Update INSTALL file to include koha-testing-docker and Gitlab links 2020-10-15 12:56:30 +02:00
Koha.pm Increment version for 23.05.14 release 2024-08-13 11:05:38 -03:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 26700: Remove occurrences in Makefile.PL 2023-07-17 11:01:46 +01:00
README
…
README.md Bug 27092: Remove note about "synced repo" from README.md 2020-11-25 16:31:58 +01:00
README.robots
…
about.pl Bug 36134: Read complete Elasticsearch configuration in about.pl 2024-03-19 20:05:37 +00:00
app.psgi Bug 36149: Add userenv middleware to app.psgi 2024-05-01 15:35:19 +00:00
build-resources.PL Bug 32609: Use the current yarn.lock to generate node_modules 2023-02-10 11:07:57 -03:00
changelanguage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
cpanfile Bug 33964: (QA follow-up) Remove library from cpanfile 2023-08-07 20:05:46 -10:00
cypress.json Bug 33408: Extend defaultCommandTimeout for cypress 2023-04-13 11:48:00 -03:00
fix-perl-path.PL Bug 28606: Remove $DEBUG and $ENV{DEBUG} 2021-06-24 11:53:44 +02:00
gulpfile.js Bug 36730: (Bug 35428 follow-up) po files (sometimes) fail to update 2024-05-28 21:44:03 +00:00
help.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
kohaversion.pl Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
mainpage.pl Bug 35019: Add a CSRF token when deleting news 2023-10-25 20:22:12 -10:00
package.json Bug 33066: Introduce a KohaTable Vue component 2023-04-10 07:38:28 -03:00
rewrite-config.PL Bug 28519: Put CGI::Session::Serialize::yamlxs in lib directory 2021-06-17 10:07:36 +02:00
tsconfig.json Bug 32030: Move cypress to t - fix build_js/watch_js 2022-11-08 09:44:52 -03:00
webpack.config.js Bug 32806: Move main-erm.ts to modules/erm.ts 2023-02-27 11:12:01 -03:00
yarn.lock Bug 33066: Introduce a KohaTable Vue component 2023-04-10 07:38:28 -03:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo