]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/http: always accept /dns-query again
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 29 Aug 2025 07:08:58 +0000 (09:08 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 9 Oct 2025 09:04:30 +0000 (11:04 +0200)
Things changing all the time.
At least this should fix CI on this branch.

daemon/http.c

index 6ac54a7a0d75c844e173ed0456783c0add4fe487..cf86935a4deed96b2112b335dcc3cdc6f2b07c66 100644 (file)
@@ -39,8 +39,9 @@
 #define HTTP_FRAME_HDLEN 9
 #define HTTP_FRAME_PADLEN 1
 
-/** accept only non-normal URIs,
- * otherwise only /doh and /dns-query are accepted */
+/** accept ~only~ also non-normal URIs,
+ * otherwise only /doh and /dns-query are accepted
+ * FIXME: really figure out details. */
 #define DOH_IS_PRIVATE 1
 
 struct http_stream {
@@ -139,11 +140,12 @@ static bool check_uri(struct pl_http_sess_data *ctx, const char *path)
                match_found = strlen(endpoints[i]) == endpoint_len
                        && !strncmp(path + 1, endpoints[i], strlen(endpoints[i]));
        }
-
+#if 0 // FIXME: figure out details in here
        if (DOH_IS_PRIVATE && match_found) { // specifically forbid normal DoH URIs
                set_status(ctx, HTTP_STATUS_FORBIDDEN);
                return false;
        }
+#endif
        if (!DOH_IS_PRIVATE && !match_found) {
                set_status(ctx, HTTP_STATUS_NOT_FOUND);
                return false;