Bug 28468

Summary: Unicode escape and non-whitespace C0 controls characters crash when put in the name of a record
Product: Koha Reporter: Victor Grousset/tuxayo <victor>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Victor Grousset/tuxayo 2021-05-27 03:12:25 UTC
Test:
Edit a record and put the following as a name:
foobar

If above, there is nothing between foo and bar and there is no crash, copy it from this link:
https://github.com/minimaxir/big-list-of-naughty-strings/blob/master/blns.txt#L718

«Roses are [0;31mred[0m, violets are [0;34mblue. Hope you enjoy terminal hue»

error ↓↓↓↓↓↓↓

Invalid data, cannot decode metadata object (biblio_metadata.id=294, biblionumber=295, format=marcxml, schema=MARC21, decoding_error=':49: parser error : PCDATA invalid Char value 27
    <subfield code="a">foobar</subfield>
                          ^') at /usr/share/perl5/Exception/Class/Base.pm line 88


non-whitespace C0 controls characters:
https://github.com/minimaxir/big-list-of-naughty-strings/blob/master/blns.txt#L116
Comment 1 Katrin Fischer 2021-05-29 15:15:56 UTC
Can confirm.