[libzapojit/wip/rishi/cve-2021-39360] skydrive: Guard against invalid SSL certificates




commit a033fe378d1683354adc3718fbdc7c07f793206d
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Oct 14 16:55:48 2021 +0200

    skydrive: Guard against invalid SSL certificates
    
    Fixes: CVE-2021-39360
    
    https://gitlab.gnome.org/GNOME/libzapojit/-/issues/4

 src/zpj-skydrive.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/zpj-skydrive.c b/src/zpj-skydrive.c
index 33d94d7..e75b7c3 100644
--- a/src/zpj-skydrive.c
+++ b/src/zpj-skydrive.c
@@ -162,6 +162,8 @@ zpj_skydrive_download_file_id_to_stream_full (ZpjSkydrive *self,
     goto out;
 
   session = soup_session_sync_new ();
+  g_object_set (session, SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE, NULL);
+
   requester = soup_requester_new ();
   soup_session_add_feature (session, SOUP_SESSION_FEATURE (requester));
 
@@ -500,6 +502,7 @@ zpj_skydrive_delete_entry_id (ZpjSkydrive *self, const gchar *entry_id, GCancell
     goto out;
 
   session = soup_session_sync_new ();
+  g_object_set (session, SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE, NULL);
 
   url = g_strconcat (live_endpoint, entry_id, NULL);
   message = soup_message_new ("DELETE", url);
@@ -793,6 +796,7 @@ zpj_skydrive_download_file_id_to_path (ZpjSkydrive *self,
   data.loop = g_main_loop_new (context, FALSE);
 
   session = soup_session_async_new_with_options (SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, NULL);
+  g_object_set (session, SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE, NULL);
 
   url = g_strconcat (live_endpoint, file_id, "/content", NULL);
   message = soup_message_new ("GET", url);
@@ -1396,6 +1400,7 @@ zpj_skydrive_upload_path_to_folder_id (ZpjSkydrive *self,
     goto out;
 
   session = soup_session_sync_new ();
+  g_object_set (session, SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE, NULL);
 
   url = g_strconcat (live_endpoint, folder_id, "/files", NULL);
   message = soup_message_new ("POST", url);


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