[Commits] [SCM] claws branch, master, updated. 3.17.0-166-gb040d14
ticho at claws-mail.org
ticho at claws-mail.org
Thu Nov 15 08:35:27 CET 2018
The branch, master has been updated
via b040d141d67d2fccf9e0fe56443edbfa3244ba13 (commit)
from 5b177bbac61e0c9daa64b64e5e6c45d7aec76121 (commit)
Summary of changes:
src/common/ssl_certificate.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit b040d141d67d2fccf9e0fe56443edbfa3244ba13
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Thu Nov 15 08:31:33 2018 +0100
Sanitize filenames for saved TLS certificates.
Fixes using unsafe_ssl_certs pref on Windows, as that
includes certificate fingerprint in the filename.
Fingerprints contain colons, and those are not allowed
in filenames on Windows.
diff --git a/src/common/ssl_certificate.c b/src/common/ssl_certificate.c
index 6db05f5..28a554a 100644
--- a/src/common/ssl_certificate.c
+++ b/src/common/ssl_certificate.c
@@ -54,14 +54,19 @@ gboolean prefs_common_unsafe_ssl_certs(void);
static gchar *get_certificate_path(const gchar *host, const gchar *port, const gchar *fp)
{
+ gchar *ret;
+
if (fp != NULL && prefs_common_unsafe_ssl_certs())
- return g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
+ ret = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
"certs", G_DIR_SEPARATOR_S,
host, ".", port, ".", fp, ".cert", NULL);
else
- return g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
+ ret = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
"certs", G_DIR_SEPARATOR_S,
host, ".", port, ".cert", NULL);
+
+ subst_for_filename(ret);
+ return ret;
}
static gchar *get_certificate_chain_path(const gchar *host, const gchar *port, const gchar *fp)
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list