From aa4f823781185fb18187714798795d7e4b0c9b65 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 11 Feb 2005 03:37:03 +0000 Subject: 2005-02-10 Havoc Pennington * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail (call dbus_g_proxy_add_signal) * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket): escape the hostname (_dbus_server_new_for_domain_socket): escape the path * dbus/dbus-address.c (dbus_address_escape_value): new (dbus_address_unescape_value): new (dbus_parse_address): unescape values * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function * doc/dbus-specification.xml: explain how to escape values in addresses --- doc/dbus-specification.xml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 75ffeea7..b56e0fc5 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -2131,13 +2131,40 @@ Server addresses consist of a transport name followed by a colon, and then an optional, comma-separated list of keys and values in the form key=value. - [FIXME how do you escape colon, comma, and semicolon in the values of the key=value pairs?] + Each value is escaped. For example: unix:path=/tmp/dbus-test Which is the address to a unix socket with the path /tmp/dbus-test. + + Value escaping is similar to URI escaping but simpler. + + + + The set of optionally-escaped bytes is: + [0-9A-Za-z_-/.\]. To escape, each + byte (note, not character) which is not in the + set of optionally-escaped bytes must be replaced with an ASCII + percent (%) and the value of the byte in hex. + The hex value must always be two digits, even if the first digit is + zero. The optionally-escaped bytes may be escaped if desired. + + + + + To unescape, append each byte in the value; if a byte is an ASCII + percent (%) character then append the following + hex value instead. It is an error if a % byte + does not have two hex digits following. It is an error if a + non-optionally-escaped byte is seen unescaped. + + + + The set of optionally-escaped bytes is intended to preserve address + readability and convenience. + [FIXME clarify if attempting to connect to each is a requirement or just a suggestion] -- cgit