From: Stuart Weaver Date: Wed, 25 Nov 2015 11:30:42 +0000 (+0000) Subject: rtsp-url: unescape special chars in user/pass part of URL X-Git-Tag: 1.12.2~201 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0cf08d90c0b6a2a795d53e124eaa80dee285f81d;p=platform%2Fupstream%2Fgst-plugins-base.git rtsp-url: unescape special chars in user/pass part of URL This way special characters such as '@' can be used in usernames or passwords, e.g. rtsp://view:%40dm%4An@/media/camera1 will now parse username and password into: User: view Pass: @dm:n https://bugzilla.gnome.org/show_bug.cgi?id=758389 --- diff --git a/gst-libs/gst/rtsp/gstrtspurl.c b/gst-libs/gst/rtsp/gstrtspurl.c index 6c7e8c4..0acd3d7 100644 --- a/gst-libs/gst/rtsp/gstrtspurl.c +++ b/gst-libs/gst/rtsp/gstrtspurl.c @@ -136,9 +136,9 @@ gst_rtsp_url_parse (const gchar * urlstr, GstRTSPUrl ** url) if (col == NULL || col > at) goto invalid; - res->user = g_strndup (p, col - p); + res->user = g_uri_unescape_segment (p, col, NULL); col++; - res->passwd = g_strndup (col, at - col); + res->passwd = g_uri_unescape_segment (col, at, NULL); /* move to host */ p = at + 1;