Main Koha release repository https://koha-community.org
Find a file
Janusz Kaczmarek 35117c339e Bug 36794: Illegitimate modification of biblionumber subfield content (999 $c)
It happens that librarians, by mistake, open a biblio editor putting in the
URL, by hand, the biblionumber prefixed with a blank (e.g.
.../addbiblio.pl?biblionumber= 123 -- mind the space before 123).
In such a case the editor opens with the right biblio record (i.e. 123)
but, after saving the record, the content of the biblionumber MARC
field (999 $c for a standard MARC 21 installation) results modified and
contains additional initial blanks.

Moreover, while using ES and making a search for the record (with title,
author etc.) we get two records on the result list (instead of one).

This is because in the addbiblio.pl script $biblionumber is taken (and
continuously used) directly from CGI parameter, without any
validation and/or correction.

Test plan:
==========
0. Have a test installation with ES.
1. Open a biblio record in the editor with an added space before
   biblionumber value, e.g.:
   http://ktd:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber= 123
   Save the record.
2. From the Normal view choose Save -> MARCXML.  Open the saved file in
   your favourite editor.  You should see, at the end, something like:
   <datafield tag="999" ind1=" " ind2=" ">
     <subfield code="c"> 123</subfield>
   (mind the space before 123).
   This is not right.
3. Make a search with the title or author's name from the record (e.g.
   Henning Mankell for the record 123 from the default ktd data set).
   You should get two records instead of one (while using ES).
4. Apply the patch, restart_all.  Repeat p. 1 and 2 with a different
   biblionumber.  Notice the unchanged (i.e. without spaces) value
   of 999 $c subfield in the exported record and only one record
   as a result of a search.

WNC amended patch - rebased, added conditional in case no bib, moved comments to their own lines

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c74169ba27)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 076b82d520)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-30 19:18:47 +00: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 36554: Document languages from field 041 should be present in 'ln' search field and Languages facet (MARC 21) 2024-05-28 21:41:57 +00:00
api Bug 36329: Miscelaneous spec fixes 2024-05-13 14:40:58 +00:00
authorities Bug 36799: Illegitimate modification of MARC authid field content (001) 2024-05-30 19:18:03 +00:00
basket Bug 34731: Don't call SendQueuedMessages if message_id is bad 2023-09-14 07:54:48 -10:00
bin
C4 Bug 36335: Fix ILS-DI GetRecords bad encoding for UNIMARC 2024-05-30 19:09:36 +00:00
catalogue Bug 36438: Check object for calling metadata 2024-05-28 17:48:15 +00:00
cataloguing Bug 36794: Illegitimate modification of biblionumber subfield content (999 $c) 2024-05-30 19:18:47 +00:00
circ Bug 36376: (QA follow-up) Tidy 2024-05-28 16:27:54 +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 Bug 34663: Errors in UNIMARC default framework 2024-05-28 16:04:04 +00:00
Koha Bug 36794: Illegitimate modification of biblionumber subfield content (999 $c) 2024-05-30 19:18:47 +00:00
koha-tmpl Bug 27363: Restore temporary selection of Z39.50 targets throughout multiple searches 2024-05-28 21:59:04 +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
members Bug 33849: Do not reset new patrons home library when error occurs 2024-05-30 19:15:53 +00:00
misc Bug 36787: staticfines.pl add use Koha::DateUtils::output_pref 2024-05-28 21:46:49 +00:00
offline_circ Bug 33961: Remove built-in offline circ tool 2023-07-17 08:18:59 +01:00
opac Bug 35977: (follow-up) Cleaner working approach 2024-05-28 20:36:11 +00:00
patron_lists
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 31988: Remove reports/itemtypes.plugin 2024-03-26 15:54:33 +00:00
reserve Bug 35979: Check pref before inserting holds_queue background jobs 2024-05-28 20:22:48 +00:00
reviews
rotating_collections
serials Bug 36511: Some scripts missing a dependency following Bug 24879 2024-04-11 14:28:13 +00:00
services
skel
suggestion Bug 34963: Restore the ability to blank fields when editing a suggestion 2024-05-28 19:45:09 +00:00
svc Bug 34913: Adjust C4::Utils::DataTables::VirtualShelves 2024-03-19 19:19:13 +00:00
t Bug 36567: (Rmaint follow-up) fix failing test 2024-05-29 13:09:36 +00:00
tags Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
tools Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date' 2024-05-28 19:21:41 +00:00
virtualshelves Bug 35547: Show public "staff only" lists in addbybiblionumber.pl 2024-01-04 21:05:54 +00:00
xt Bug 36176: Exclude misc/releases_notes/* 2024-03-27 13:45:17 +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 Update .mailmap 2023-07-17 08:12:22 +01:00
.perlcriticrc
.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
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
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
gulpfile.js Bug 36730: (Bug 35428 follow-up) po files (sometimes) fail to update 2024-05-28 21:44:03 +00:00
help.pl
INSTALL
Koha.pm Bug 36033: DBRev 23.05.11.001 2024-05-23 14:47:34 +00:00
kohaversion.pl
LICENSE
mainpage.pl Bug 35019: Add a CSRF token when deleting news 2023-10-25 20:22:12 -10:00
Makefile.PL Bug 26700: Remove occurrences in Makefile.PL 2023-07-17 11:01:46 +01:00
MANIFEST.SKIP
package.json Bug 33066: Introduce a KohaTable Vue component 2023-04-10 07:38:28 -03:00
README
README.md
README.robots
rewrite-config.PL
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

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