aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-gns-proxy.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-06-15 23:10:38 +0200
committerChristian Grothoff <christian@grothoff.org>2018-06-15 23:14:12 +0200
commit15498a268e2f38e590d49294a646fe1ef82f134f (patch)
treebc8920da9515aa35062d3001ee2334358136a28d /src/gns/gnunet-gns-proxy.c
parentc5dcba5df9ff6a02f680ce4a2818abd3a8dd3839 (diff)
downloadgnunet-15498a268e2f38e590d49294a646fe1ef82f134f.tar.gz
gnunet-15498a268e2f38e590d49294a646fe1ef82f134f.zip
support wildcard cookie domains starting with .
Diffstat (limited to 'src/gns/gnunet-gns-proxy.c')
-rw-r--r--src/gns/gnunet-gns-proxy.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c
index e68d6d540..e8f0854f1 100644
--- a/src/gns/gnunet-gns-proxy.c
+++ b/src/gns/gnunet-gns-proxy.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2012-2014 GNUnet e.V. 3 Copyright (C) 2012-2018 GNUnet e.V.
4 4
5 GNUnet is free software: you can redistribute it and/or modify it 5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published 6 under the terms of the GNU Affero General Public License as published
@@ -1178,7 +1178,6 @@ curl_check_hdr (void *buffer,
1178 s5r->domain); 1178 s5r->domain);
1179 continue; 1179 continue;
1180 } 1180 }
1181 }
1182 else if (0 == strcmp (cookie_domain, 1181 else if (0 == strcmp (cookie_domain,
1183 s5r->leho)) 1182 s5r->leho))
1184 { 1183 {
@@ -1187,6 +1186,15 @@ curl_check_hdr (void *buffer,
1187 s5r->domain); 1186 s5r->domain);
1188 continue; 1187 continue;
1189 } 1188 }
1189 else if ( ('.' == cookie_domain[0]) &&
1190 (0 == strcmp (&cookie_domain[1],
1191 s5r->leho)) )
1192 {
1193 offset += sprintf (new_cookie_hdr + offset,
1194 " domain=.%s;",
1195 s5r->domain);
1196 continue;
1197 }
1190 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1198 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1191 _("Cookie domain `%s' supplied by server is invalid\n"), 1199 _("Cookie domain `%s' supplied by server is invalid\n"),
1192 tok); 1200 tok);