[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [RESEND PATCH] httpd: fix index.html with CGI and no basic auth
From: Ben Wolsieffer <ben.wolsieffer () hefring ! com>
Date: 2023-09-11 20:43:15
Message-ID: 20230911204315.2138270-1-ben.wolsieffer () hefring ! com
[Download RAW message or body]
From: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
The URL gets truncated if ENABLE_FEATURE_HTTPD_BASIC_AUTH or
ENABLE_FEATURE_HTTPD_CGI is set, but it is only restored if
ENABLE_FEATURE_HTTPD_BASIC_AUTH is set. This breaks index.html redirects
for configurations that have CGI enabled but basic auth disabled.
Fixes: 91a58b207ea0 ("httpd: no need to strcpy() when we only need to copy one byte")
Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
---
networking/httpd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/networking/httpd.c b/networking/httpd.c
index ddcb03bca..0098c7aea 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -2616,7 +2616,7 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
/* !CGI: it can be only GET or HEAD */
#endif
-#if ENABLE_FEATURE_HTTPD_BASIC_AUTH
+#if ENABLE_FEATURE_HTTPD_BASIC_AUTH || ENABLE_FEATURE_HTTPD_CGI
/* Restore truncated .../index.html */
if (urlp[-1] == '/')
urlp[0] = index_page[0];
--
2.42.0
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic