[PATCH] No longer need to escape '+' in a D-Bus address

Havoc Pennington hp at pobox.com
Sat Aug 16 21:29:49 PDT 2008


Hi,

On Sat, Aug 16, 2008 at 11:54 PM, Michael Witten <mfwitten at mit.edu> wrote:
> The character '+' wasn't included as a character
> that only needs to be optionally escaped. As a
> result, some generated paths wouldn't work (such
> as the following that was produced on a Mac OS X
> system:
>
>    <listen>unix:tmpdir=/var/folders/9Y/9YL5MvFhGfySA5DvYnUpJE+++TI/-Tmp-/</listen>
>

When you say "was produced," how was it produced, and why isn't it
escaped properly? Do we know that "+" is the only needs-escaping
character that could have turned up?

Changing this will require patching the spec as well:
http://dbus.freedesktop.org/doc/dbus-specification.html#addresses

It should also be simple to patch the unit tests at the bottom of
dbus-address.c to fail pre-change and succeed post-change.

Before patching all that though, let's figure out if it makes sense to
do so. Why is "+" in particular something to add? Would it be more
correct to just escape it wherever this address is created?

Looking at this, the change in
ee71e1ff6033ad1eb2385f11d4f3678259b8397b (2007-07-24, adding "*" in
addresses as part of allowing tcp bind to be wildcarded) was done
without a spec update changing the escaping algorithm. I think I
reviewed that patch, so my fault for missing it.

Havoc


More information about the dbus mailing list