[telepathy-sofiasip/master] RFC-compliant escaping of alias characters
Mikhail Zabaluev
mikhail.zabaluev at nokia.com
Mon Sep 28 10:46:20 PDT 2009
Don't escape CR and LF that must not be escaped accordingly to SIP syntax.
Should be obviated by the previous commit, but better safe than sorry.
---
src/sip-connection-helpers.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/sip-connection-helpers.c b/src/sip-connection-helpers.c
index e47dfee..d72c1ea 100644
--- a/src/sip-connection-helpers.c
+++ b/src/sip-connection-helpers.c
@@ -91,7 +91,8 @@ priv_sip_from_url_make (TpsipConnection *conn,
if (escape_regex == NULL)
{
escape_regex = g_regex_new (
- "[\"\\\\[:cntrl:]]", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
+ "[\"\\\\\\x01-\\x09\\x0b\\x0c\\x0e-\\x1f\\x7f]",
+ G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
}
escaped_alias = g_regex_replace (escape_regex, alias, -1, 0,
--
1.5.6.5
More information about the telepathy-commits
mailing list