blacklist path not starting with / and ports other than 70 or 7070 - gopherprox… | |
git clone git://git.codemadness.org/gopherproxy-c | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit d0cd571a262cbbca3c7d12f08799e6835552bf13 | |
parent 0c008b2c7e67000e28de30bb3fc85b956a7645e0 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Fri, 17 Aug 2018 18:36:45 +0200 | |
blacklist path not starting with / and ports other than 70 or 7070 | |
Diffstat: | |
M gopherproxy.c | 4 ++++ | |
1 file changed, 4 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/gopherproxy.c b/gopherproxy.c | |
@@ -134,6 +134,10 @@ isblacklisted(const char *host, const char *port, const ch… | |
{ | |
char *p; | |
+ if (path[0] != '/') | |
+ return 1; | |
+ if (strcmp(port, "70") && strcmp(port, "7070")) | |
+ return 1; | |
if ((p = strstr(host, ".onion")) && strlen(p) == strlen(".onion")) | |
return 1; | |
return 0; |