Fix double printing notfounderr and fix notfound on not allowed dir trav. - geomyidae - A small C-based gopherd. HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 32c1854864ce91a873e607659294eda9012411e6 DIR parent e35d04d03d5c4c8ddc88e73c5c3f092e3d309a40 HTML Author: Christoph Lohmann <20h@r-36.net> Date: Mon, 21 Aug 2023 11:37:44 +0200 Fix double printing notfounderr and fix notfound on not allowed dir trav. Diffstat: M main.c | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) --- DIR diff --git a/main.c b/main.c @@ -329,6 +329,7 @@ dothegopher: dprintf(sock, notfounderr, recvc); if (loglvl & ERRORS) logentry(clienth, clientp, recvc, "not found"); + return; } if (stat(rpath, &dir) != -1) { /* @@ -426,6 +427,7 @@ dothegopher: } } else { if (pathfallthrough && S_ISDIR(dir.st_mode)) { + dprintf(sock, notfounderr, recvc); if (loglvl & ERRORS) { logentry(clienth, clientp, recvc, "directory listing in traversal not allowed");