Page MenuHomePhorge

Fix incorrect quoting of author in 'arc patch'

Authored by ldanna on Oct 17 2021, 20:02.
Referenced Files
Unknown Object (File)
Wed, Mar 15, 13:31
Unknown Object (File)
Tue, Mar 14, 11:47
Unknown Object (File)
Tue, Mar 14, 02:59
Unknown Object (File)
Wed, Mar 8, 06:00
Unknown Object (File)
Thu, Mar 2, 09:27
Unknown Object (File)
Thu, Mar 2, 09:26
Unknown Object (File)
Thu, Mar 2, 09:26
Unknown Object (File)
Wed, Mar 1, 17:27



Author field is formatted with csprintf, which would be appropriate
if the resulting string was concatenated into a shell command as a
string -- but because the flags are passed as a vector of strings
and not parsed by the shell, this results in extraneous shell
quoting making it into to author field. In particular this
renders my name as D'\''Anna instead of D'Anna

Test Plan

Performed 'arc patch' with and without these changes, confirmed
that my apostrophe was no longer mangled by shell quotes in the
resulting commit.

Diff Detail

rARC Arcanist
Lint Passed
Tests Passed
Build Status
Buildable 54
Build 54: arc lint + arc unit

Event Timeline

ldanna requested review of this revision.Oct 17 2021, 20:02

I feel like this is a good change. I do not see any security vulnerabilities that could be introduced by this..

I will let everyone else chime in as shell escaping code is an attack vector

This revision is now accepted and ready to land.Oct 22 2021, 15:48

Thank you for submitting this change!

@speck thanks, how do I land the change?

This revision was automatically updated to reflect the committed changes.