4 Star 0 Fork 4

src-openEuler/libzapojit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2021-39360.patch 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
starlet_dx 提交于 2021-11-12 14:32 . fix CVE-2021-39360
From a033fe378d1683354adc3718fbdc7c07f793206d Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 14 Oct 2021 16:55:48 +0200
Subject: [PATCH] skydrive: Guard against invalid SSL certificates
Fixes: CVE-2021-39360
https://gitlab.gnome.org/GNOME/libzapojit/-/issues/4
---
src/zpj-skydrive.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/zpj-skydrive.c b/src/zpj-skydrive.c
index c91b126..1d91d31 100644
--- a/src/zpj-skydrive.c
+++ b/src/zpj-skydrive.c
@@ -415,6 +415,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);
@@ -744,6 +745,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);
@@ -1291,6 +1293,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);
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/libzapojit.git
git@gitee.com:src-openeuler/libzapojit.git
src-openeuler
libzapojit
libzapojit
master

搜索帮助