[totem/wip/hadess/unescape-proxy: 2/2] backend: Unescape proxy user/password info



commit c1c93932f169a68ffa9bf87870d31fbda4a2836d
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Dec 10 13:42:35 2019 +0100

    backend: Unescape proxy user/password info

 src/backend/bacon-video-widget.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 4ed7388fa..23725ac71 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -2672,6 +2672,8 @@ bvw_set_http_proxy_on_element (BaconVideoWidget *bvw,
   const char *host, *userinfo;
   guint port;
   char **user_strv;
+  g_auto char *user = NULL;
+  g_auto char *password = NULL;
 
   uri = gst_uri_from_string (uri_str);
   if (!uri) {
@@ -2696,9 +2698,12 @@ bvw_set_http_proxy_on_element (BaconVideoWidget *bvw,
     goto finish;
 
   user_strv = g_strsplit (userinfo, ":", 2);
+  user = g_uri_unescape_string (user_strv[0], NULL);
+  password = g_uri_unescape_string (user_strv[1], NULL);
+
   g_object_set (element,
-               "proxy-id", user_strv[0],
-               "proxy-pw", user_strv[1],
+               "proxy-id", user,
+               "proxy-pw", password,
                NULL);
   g_strfreev (user_strv);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]