| Fix \r handling in gopher request filter. - geomyidae - A small C-based gopherd. | |
| git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| LICENSE | |
| --- | |
| commit 45c3a0e013a65e7bc6c5fa4cb941cedf22fb83e0 | |
| parent 72b56b76bbd9616ec82b59b4a6541ca40ab4e660 | |
| Author: Christoph Lohmann <[email protected]> | |
| Date: Wed, 17 Mar 2021 22:28:18 +0100 | |
| Fix \r handling in gopher request filter. | |
| Diffstat: | |
| M xinetd-gopher-request-filter.sh | 3 ++- | |
| 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" | |
| ;; | |
| *) |