Bug 41709 - GIR segment data should be encoded in EDI ORDERs
Summary: GIR segment data should be encoded in EDI ORDERs
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-26 09:47 UTC by Martin Renvoize (ashimema)
Modified: 2026-01-26 12:12 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: Sponsored
Comma delimited list of Sponsors: OpenFifth <https://openfifth.co.uk/>
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41709: Fix EDIfact special character escaping in GIR segments and other fields (5.97 KB, patch)
2026-01-26 10:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 41709: Fix EDIfact special character escaping in GIR segments and other fields (6.02 KB, patch)
2026-01-26 10:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2026-01-26 09:47:25 UTC
We're properly escaping special characters from bib/item records in EDI Order messages, but we don't apply that escaping to any of the GIR contents which may well also include special characters.
Comment 1 Martin Renvoize (ashimema) 2026-01-26 10:22:56 UTC
Created attachment 192014 [details] [review]
Bug 41709: Fix EDIfact special character escaping in GIR segments and other fields

Apply encode_text function to all text fields in EDIfact Order messages
to properly escape special characters (?, ', :, +) that could break
message parsing. Previously only bibliographic description fields were
escaped, but GIR segments containing collection codes, branch codes,
item types, call numbers, and other data were vulnerable.

Test plan:
- Verify all existing tests pass
- Added comprehensive tests for special character escaping in GIR segments
- Confirmed that fields containing ?, ', :, + are properly escaped
Comment 2 Martin Renvoize (ashimema) 2026-01-26 10:23:29 UTC
Created attachment 192015 [details] [review]
Bug 41709: Fix EDIfact special character escaping in GIR segments and other fields

Apply encode_text function to all text fields in EDIfact Order messages
to properly escape special characters (?, ', :, +) that could break
message parsing. Previously only bibliographic description fields were
escaped, but GIR segments containing collection codes, branch codes,
item types, call numbers, and other data were vulnerable.

Test plan:
- Verify all existing tests pass
- Added comprehensive tests for special character escaping in GIR segments
- Confirmed that fields containing ?, ', :, + are properly escaped

Sponsored-by: OpenFifth <https://openfifth.co.uk/>