summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-20 04:53:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-20 04:59:04 +0000
commit8998f6d25eacd1a9e98e4f3e91864fa75e58bed5 (patch)
treeb7db888f9db562e505eaa7f264cb266d907d9bab
parentMerging upstream version 1.41.0. (diff)
downloadnetdata-8998f6d25eacd1a9e98e4f3e91864fa75e58bed5.tar.xz
netdata-8998f6d25eacd1a9e98e4f3e91864fa75e58bed5.zip
Refreshing allow-symlinks.patch.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/patches/upstream/0001-allow-symlinks.patch18
1 files changed, 9 insertions, 9 deletions
diff --git a/debian/patches/upstream/0001-allow-symlinks.patch b/debian/patches/upstream/0001-allow-symlinks.patch
index 8619327ec..06bbd9356 100644
--- a/debian/patches/upstream/0001-allow-symlinks.patch
+++ b/debian/patches/upstream/0001-allow-symlinks.patch
@@ -4,12 +4,12 @@ Description: Remove file serve restrictions for symlinks.
diff -Naurp netdata.orig/web/server/web_client.c netdata/web/server/web_client.c
--- netdata.orig/web/server/web_client.c
+++ netdata/web/server/web_client.c
-@@ -379,7 +379,7 @@ int mysendfile(struct web_client *w, cha
- int done = 0;
- while(!done) {
- // check if the file exists
-- if (lstat(webfilename, &statbuf) != 0) {
-+ if (stat(webfilename, &statbuf) != 0) {
- debug(D_WEB_CLIENT_ACCESS, "%llu: File '%s' is not found.", w->id, webfilename);
- w->response.data->content_type = CT_TEXT_HTML;
- buffer_strcat(w->response.data, "File does not exist, or is not accessible: ");
+@@ -513,7 +513,7 @@ static int mysendfile(struct web_client
+ bool is_dir = false;
+ char web_filename[FILENAME_MAX + 1];
+ struct stat statbuf;
+- if(!find_filename_to_serve(filename, web_filename, FILENAME_MAX, &statbuf, w, &is_dir)) {
++ if (stat(web_filename, &statbuf) != 0) {
+ w->response.data->content_type = CT_TEXT_HTML;
+ buffer_strcat(w->response.data, "File does not exist, or is not accessible: ");
+ buffer_strcat_htmlescape(w->response.data, web_filename);