summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-02-23 07:27:19 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2015-02-23 07:27:19 +0100
commitcc77058aea9001d9db60049500c50b971df89456 (patch)
tree4b4b5604f0d68907e2fa9bdac574a6f6fa183751 /sys/src
parent60fd51b9b7234f758849a442cf1abf4eb0f20729 (diff)
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.
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/cmd/webfs/fs.c2
1 files changed, 2 insertions, 0 deletions
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);
}