On Sun, Feb 16, 2020 at 10:06:49AM -0500, James McCoy wrote: > On Sun, Feb 16, 2020 at 09:59:53AM +0000, Daniel Shahaf wrote: > > James McCoy wrote on Sat, 15 Feb 2020 13:10 -0500: > > > Well, that makes this more involved... I guess the simplest option is to > > > do our own scan of the string and pre-escape any whitespace before > > > having apr_pescape_shell() handle the rest. > > > > If we did that, apr_pescape_shell() would re-escape the backslashes or > > quotes we'd escape spaces with. > > Yes, I realized this after hitting "Send". :) > > > We could split on whitespace, apr_pescape_shell() each part, then join > > them back together. > > What I have locally is escaping whitespace after calling > apr_pescape_shell(). This should work as long as they don't change > the semantics of this API to also handle whitespace.
Done in r1874093. > However, the svn-x64-macosx-apr1.3-nothread buildbot informed me that > apr_pescape_shell() isn't available in that version. It wasn't added > until 1.5.0. > > Now we need to either: > > a) Raise the minimum APR version I'll do this next. Cheers, -- James GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB