[Bug 36794] New: Illegitimate modification of biblionumber subfield content (999 $c)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Bug ID: 36794 Summary: Illegitimate modification of biblionumber subfield content (999 $c) Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Cataloging Assignee: januszop@gmail.com Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 166224 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166224&action=edit Bug 36794: 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. Sponsored-by: Ignatianum University in Cracow -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 --- Comment #2 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 166235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166235&action=edit Bug 36794: 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. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 --- Comment #3 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 166236 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166236&action=edit 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. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166224|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166235|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36799 CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166236|0 |1 is obsolete| | --- Comment #4 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 166587 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166587&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 --- Comment #5 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- This a bug 36799 are a little odd, but biblionumber and authid should always be numeric, it fixes issues if a library does a bad copy and paste, passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please rebase - I didn't want to mess it up :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166587|0 |1 is obsolete| | --- Comment #7 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 166619 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166619&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 --- Comment #8 from Janusz Kaczmarek <januszop@gmail.com> --- (In reply to Katrin Fischer from comment #6)
Please rebase - I didn't want to mess it up :)
Done--should apply smoothly now. Thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.06 released in| | Status|Pushed to main |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |lucas@bywatersolutions.com Version(s)|24.05.00,23.11.06 |24.05.00,23.11.06,23.05.12 released in| | --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Keywords| |additional_work_needed --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- When creating a fresh record, I'm seeing this in the logs: [2024/08/26 17:52:31] [WARN] Use of uninitialized value in substitution (s///) at /kohadevbox/koha/Koha/UI/Form/Builder/Biblio.pm line 53. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37867 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37867 [Bug 37867] (Bug 36794 follow-up) Warning "Use of uninitialized value in substitution..." while creating a new bibliographical record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 --- Comment #13 from Janusz Kaczmarek <januszop@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #12)
When creating a fresh record, I'm seeing this in the logs:
[2024/08/26 17:52:31] [WARN] Use of uninitialized value in substitution (s///) at /kohadevbox/koha/Koha/UI/Form/Builder/Biblio.pm line 53.
Thanks Tomás for catching this. I have submitted a new bug 37867. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- additional_work_needed resolved by bug 37870. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36794 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED CC| |wainuiwitikapark@catalyst.n | |et.nz Resolution|--- |FIXED --- Comment #15 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org