summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Weaver <stuart.weaver@datapath.co.uk>2015-11-25 11:30:42 +0000
committerSebastian Dröge <sebastian@centricular.com>2017-01-09 15:43:30 +0200
commita3a987ea48234c46777b02abe8bae1247bfd41a6 (patch)
tree11ce7f5d0269d51810ad0e1c1c158ff3e6035a65
parentb9702f6f8ec2035f836000279ad6984b9dafd276 (diff)
downloadgstreamer-plugins-base-a3a987ea48234c46777b02abe8bae1247bfd41a6.tar.gz
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@<IP-ADDR>/media/camera1 will now parse username and password into: User: view Pass: @dm:n https://bugzilla.gnome.org/show_bug.cgi?id=758389
-rw-r--r--gst-libs/gst/rtsp/gstrtspurl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/rtsp/gstrtspurl.c b/gst-libs/gst/rtsp/gstrtspurl.c
index 6c7e8c4fa..0acd3d79a 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;