[Commits] [SCM] claws branch, gtk3, updated. 3.99.0-101-gfa3c6f74e

paul at claws-mail.org paul at claws-mail.org
Sun May 23 13:17:49 CEST 2021


The branch, gtk3 has been updated
       via  fa3c6f74e2217af644520034c45ef8cb432934ce (commit)
      from  251d9c2abe84debbb488fa8a6d40fe1436abbd12 (commit)

Summary of changes:
 src/textview.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit fa3c6f74e2217af644520034c45ef8cb432934ce
Author: Paul <paul at claws-mail.org>
Date:   Sun May 23 12:16:40 2021 +0100

    harden link checker before accepting click

diff --git a/src/textview.c b/src/textview.c
index c63c5d9c1..74ba34dfa 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -2847,7 +2847,7 @@ gboolean textview_uri_security_check(TextView *textview, ClickableText *uri)
 	gboolean retval = TRUE;
 
 	if (is_uri_string(uri->uri) == FALSE)
-		return TRUE;
+		return FALSE;
 
 	visible_str = textview_get_visible_uri(textview, uri);
 	if (visible_str == NULL)
@@ -2884,6 +2884,8 @@ gboolean textview_uri_security_check(TextView *textview, ClickableText *uri)
 		if (aval == G_ALERTALTERNATE)
 			retval = TRUE;
 	}
+	if (strlen(uri->uri) > get_uri_len(uri->uri))
+		retval = FALSE;
 
 	g_free(visible_str);
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list