From cc77058aea9001d9db60049500c50b971df89456 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 23 Feb 2015 07:27:19 +0100 Subject: webfs: check $httpproxy and error when its bogus the httpproxy environment variable needs to be a url as stated in the manpage, so give an error when it isnt. --- sys/src/cmd/webfs/fs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/src') diff --git a/sys/src/cmd/webfs/fs.c b/sys/src/cmd/webfs/fs.c index 65b4e4ce7..abd8de013 100644 --- a/sys/src/cmd/webfs/fs.c +++ b/sys/src/cmd/webfs/fs.c @@ -820,6 +820,8 @@ main(int argc, char *argv[]) if(s = getenv("httpproxy")){ proxy = saneurl(url(s, 0)); + if(proxy == nil || strcmp(proxy->scheme, "http") && strcmp(proxy->scheme, "https")) + sysfatal("invalid httpproxy url: %s", s); free(s); } -- cgit v1.2.3