diff options
Diffstat (limited to 'src/plugin/gnsrecord/plugin_gnsrecord_dns.c')
-rw-r--r-- | src/plugin/gnsrecord/plugin_gnsrecord_dns.c | 9 |
1 files changed, 9 insertions, 0 deletions
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, | |||
671 | uri.target = target; | 671 | uri.target = target; |
672 | off = 0; | 672 | off = 0; |
673 | 673 | ||
674 | // TODO add more precise uri checking (RFC3986) | ||
675 | if (strstr(target, &":") == NULL || target[0] == 58 || target[strlen(target)-1] == 58) | ||
676 | { | ||
677 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
678 | _ ("Failed to serialize URI record with target `%s'\n"), | ||
679 | target); | ||
680 | return GNUNET_SYSERR; | ||
681 | } | ||
682 | |||
674 | char uribuf[sizeof(struct GNUNET_TUN_DnsUriRecord) + strlen(target) + 1]; | 683 | char uribuf[sizeof(struct GNUNET_TUN_DnsUriRecord) + strlen(target) + 1]; |
675 | 684 | ||
676 | if (GNUNET_OK != | 685 | if (GNUNET_OK != |