James McCoy wrote on Sun, 16 Feb 2020 21:27 -0500:
> 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.
This approach is tightly coupled to apr_pescape_shell(), though: the escaping
task is a single logical task but it's accomplished partly by one product (APR)
and partly by another (Subversion). Is there a way to avoid this coupling?
(Yes, this would have applied to the splitting idea I floated yesterday too.
I didn't realize this then.)
> > 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.
Thanks!
Daniel
Received on 2020-02-17 09:44:30 CET