gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 07/09: Fix URI record serialization issue


From: gnunet
Subject: [gnunet] 07/09: Fix URI record serialization issue
Date: Fri, 01 Dec 2023 10:26:54 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 8b0cafb1d8545fc06c5670f42b759b00d5c059b5
Author: Sebastian Nadler <sebastian.nadler@tum.de>
AuthorDate: Sun Nov 19 17:06:55 2023 +0100

    Fix URI record serialization issue
---
 src/plugin/gnsrecord/plugin_gnsrecord_dns.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/plugin/gnsrecord/plugin_gnsrecord_dns.c 
b/src/plugin/gnsrecord/plugin_gnsrecord_dns.c
index 226481c5d..dde5ddcea 100644
--- a/src/plugin/gnsrecord/plugin_gnsrecord_dns.c
+++ b/src/plugin/gnsrecord/plugin_gnsrecord_dns.c
@@ -671,6 +671,15 @@ dns_string_to_value (void *cls,
       uri.target = target;
       off = 0;
 
+      // TODO add more precise uri checking (RFC3986)
+      if (strstr(target, &":") == NULL || target[0] == 58 || 
target[strlen(target)-1] == 58)
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                    _ ("Failed to serialize URI record with target `%s'\n"),
+                    target);
+        return GNUNET_SYSERR;
+      }
+
       char uribuf[sizeof(struct GNUNET_TUN_DnsUriRecord) + strlen(target) + 
1]; 
 
       if (GNUNET_OK !=

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]