]> git.koha-community.org Git - koha.git/commit
Bug 37654: XSS in Batch record import for Citation column
authorPhil Ringnalda <phil@chetcolibrary.org>
Fri, 16 Aug 2024 02:57:42 +0000 (19:57 -0700)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 1 Oct 2024 13:10:48 +0000 (15:10 +0200)
commitf23eef5aa3270ae278d280fde65b655093810398
treed3b9c5058d6de72b2959968c0bd2f8ae2b8f4ee3
parentb90f3d051401247a96fa81078df9a594be5a392d
Bug 37654: XSS in Batch record import for Citation column

Viewing a staged MARC record batch loads a DataTable from
/tools/batch_records_ajax.pl, and both batch_records_ajax.pl and the
DataTable just trust the author/title/isbn/issn to be free of HTML. They
shouldn't.

Test plan:
1. Without this patch applied, download attachment 170418, then Cataloging
   - Stage records for import - Select the downloaded file - Upload file -
   Stage for import
2. When the background job completes, View batch - you'll get three alert()s
   from the title, author, and ISSN, and the author and ISSN displayed huge
3. Apply patch, restart_all
4. Manage staged records - click HTMLescapingimporttestrecord.mrc - get zero
   alerts and no <h2> display

Sponsored-by: Chetco Community Public Library
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 25672f82f090ac411c027da9ca044f7269f82814)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt