commit 45c3a0e013a65e7bc6c5fa4cb941cedf22fb83e0
parent 72b56b76bbd9616ec82b59b4a6541ca40ab4e660
Author: Christoph Lohmann <20h@r-36.net>
Date: Wed, 17 Mar 2021 22:28:18 +0100
Fix \r handling in gopher request filter.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xinetd-gopher-request-filter.sh b/xinetd-gopher-request-filter.sh
@@ -7,8 +7,9 @@ dstserver="localhost"
dstport="7070"
read -r request
+request="$(printf "%s\n" "${request}" | tr -d '\r')"
case "${request}" in
-/bill-gates-chips-us-all|/something-secret)
+*bill-gates*|*cia*)
printf "3The request cannot be handled\terror\t70\r\n"
;;
*)