[Commits] [SCM] claws branch, gtk2, updated. 3.19.0-81-gf19d766cf
miras at claws-mail.org
miras at claws-mail.org
Tue Oct 18 09:31:12 UTC 2022
The branch, gtk2 has been updated
via f19d766cf68b90f241cd6e4754db82855975c1d9 (commit)
via 0be9da8bc7fa6f9cc3d3b7ed8e83f1c52c16b483 (commit)
from 493e6b9893740d1b6d8e5bb9fe71329d07e15723 (commit)
Summary of changes:
src/oauth2.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit f19d766cf68b90f241cd6e4754db82855975c1d9
Author: Michael Rasmussen <mir at datanom.net>
Date: Tue Oct 18 11:29:05 2022 +0200
Use define for gnutls-priority instead of hard coded string
Signed-off-by: Michael Rasmussen <mir at datanom.net>
diff --git a/src/oauth2.c b/src/oauth2.c
index 5c79945b8..d65d06ea3 100644
--- a/src/oauth2.c
+++ b/src/oauth2.c
@@ -42,7 +42,7 @@
#include "time.h"
#include "common/passcrypt.h"
#include "prefs_common.h"
-
+#define GNUTLS_PRIORITY "NORMAL:!VERS-SSL3.0:!VERS-TLS1.0:!VERS-TLS1.1"
//Yahoo requires token requests to send POST header Authorization: Basic
//where the password is Base64 encoding of client_id:client_secret
@@ -255,7 +255,7 @@ int oauth2_obtain_tokens (Oauth2Service provider, OAUTH2Data *OAUTH2Data, const
gint timeout_secs = prefs_common_get_prefs()->io_timeout_secs;
debug_print("Socket timeout: %i sec(s)\n", timeout_secs);
sock_set_io_timeout(timeout_secs);
- sock->gnutls_priority = "NORMAL:!VERS-SSL3.0:!VERS-TLS1.0:!VERS-TLS1.1";
+ sock->gnutls_priority = GNUTLS_PRIORITY;
if (ssl_init_socket(sock) == FALSE) {
log_message(LOG_PROTOCOL, _("OAuth2 TLS connection error\n"));
g_free(token);
@@ -397,7 +397,7 @@ gint oauth2_use_refresh_token (Oauth2Service provider, OAUTH2Data *OAUTH2Data)
gint timeout_secs = prefs_common_get_prefs()->io_timeout_secs;
debug_print("Socket timeout: %i sec(s)\n", timeout_secs);
sock_set_io_timeout(timeout_secs);
- sock->gnutls_priority = "NORMAL:!VERS-SSL3.0:!VERS-TLS1.0:!VERS-TLS1.1";
+ sock->gnutls_priority = GNUTLS_PRIORITY;
if (ssl_init_socket(sock) == FALSE) {
log_message(LOG_PROTOCOL, _("OAuth2 TLS connection error\n"));
return (1);
commit 0be9da8bc7fa6f9cc3d3b7ed8e83f1c52c16b483
Author: Michael Rasmussen <mir at datanom.net>
Date: Tue Oct 18 11:26:22 2022 +0200
Handle non-ascii characters in server response. Fixes bug #4636
Signed-off-by: Michael Rasmussen <mir at datanom.net>
diff --git a/src/oauth2.c b/src/oauth2.c
index 8731d1ed5..5c79945b8 100644
--- a/src/oauth2.c
+++ b/src/oauth2.c
@@ -147,7 +147,7 @@ static gint oauth2_filter_access (gchar *json, gchar *access_token, gint *expiry
GMatchInfo *matchInfo;
GRegex *regex;
- regex = g_regex_new ("\"access_token\": ?\"(.*?)\",?", 0, 0, NULL);
+ regex = g_regex_new ("\"access_token\": ?\"(.*?)\",?", G_REGEX_RAW, 0, NULL);
g_regex_match (regex, json, 0, &matchInfo);
if (g_match_info_matches (matchInfo))
g_stpcpy (access_token,g_match_info_fetch (matchInfo, 1));
@@ -158,7 +158,7 @@ static gint oauth2_filter_access (gchar *json, gchar *access_token, gint *expiry
g_match_info_free (matchInfo);
- regex = g_regex_new ("\"expires_in\": ?([0-9]*),?", 0, 0, NULL);
+ regex = g_regex_new ("\"expires_in\": ?([0-9]*),?", G_REGEX_RAW, 0, NULL);
g_regex_match (regex, json, 0, &matchInfo);
if (g_match_info_matches (matchInfo)){
// Reduce available token life to avoid attempting connections with (near) expired tokens
@@ -178,7 +178,7 @@ static gint oauth2_filter_refresh (gchar *json, gchar *refresh_token)
GMatchInfo *matchInfo;
GRegex *regex;
- regex = g_regex_new ("\"refresh_token\": ?\"(.*?)\",?", 0, 0, NULL);
+ regex = g_regex_new ("\"refresh_token\": ?\"(.*?)\",?", G_REGEX_RAW, 0, NULL);
g_regex_match (regex, json, 0, &matchInfo);
if (g_match_info_matches (matchInfo))
g_stpcpy (refresh_token,g_match_info_fetch (matchInfo, 1));
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list