mbox series

[b4,0/6] Handle patch trailers with special characters

Message ID 20241027-trailer-special-chars-v1-0-1bd180dba425@gmail.com (mailing list archive)
Headers show
Series Handle patch trailers with special characters | expand

Message

Brandon Maier Oct. 27, 2024, 3:33 p.m. UTC
Fixes bug reported in https://github.com/mricon/b4/issues/50

Patch trailers that contain commas are not parsed correctly, this causes
the trailer to be set to a blank string. The issue is special characters
in emails are supposed to be quoted per RFC 2822. But it's fairly common
for patch trailers to be hand-written and be improperly formatted.

The trailer tests were hiding some of the parsing issues, so the first
few patches fix up the test.

While fixing this bug I discovered the trailer parser also breaks even
when the trailer is properly quoted, so I fix that in this series as
well.

Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
---
Brandon Maier (6):
      src/tests: check trailer extinfo
      src/tests: fix trailer test hiding parser errors
      b4: handle trailers with improper formatting
      src/tests: test for trailers with improper formatting
      b4: handle trailers with special characters
      src/tests: test for trailers with special characters

 src/b4/__init__.py                          |  6 +++---
 src/tests/samples/trailers-test-extinfo.txt |  1 +
 src/tests/samples/trailers-test-simple.txt  |  1 +
 src/tests/test___init__.py                  | 13 ++++++++++---
 4 files changed, 15 insertions(+), 6 deletions(-)
---
base-commit: 2a6338e451a0c1e81f214f48c820c1e52d76b2f1
change-id: 20241027-trailer-special-chars-78b97ff63ea9

Best regards,