summaryrefslogtreecommitdiff
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2026-04-27 22:18:34 +0000
committerJunio C Hamano <gitster@pobox.com>2026-04-28 09:51:11 +0900
commit7735d7eee3a586181dc397afa5aa8f02e009833b (patch)
treec13debc0c2b439e69192bbe6781329df1f8893e3 /contrib/persistent-https
parent1ddc0481cfb744d51e235a8cccf97d4afb498743 (diff)
commit: sign commit after mutating buffer
The ensure_utf8 function can mutate the buffer to change its encoding, so we must call it before signing the buffer so that we do not invalidate the signature, which is made over raw bytes. Fix a bug which caused the compatibility code to not convert the compatibility buffer if the main buffer was invalid UTF-8. We expect both buffers to be valid UTF-8 or both invalid, since the only data that would differ between them would be hex object IDs, which are always valid UTF-8. Add a test for this case using 0xfe and 0xff, which are never valid in UTF-8. Reported-by: Kushal Das <kushal@sunet.se> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions