ref: cc77058aea9001d9db60049500c50b971df89456
parent: 60fd51b9b7234f758849a442cf1abf4eb0f20729
author: cinap_lenrek <[email protected]>
date: Mon Feb 23 02:27:19 EST 2015
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.
--- a/sys/src/cmd/webfs/fs.c
+++ b/sys/src/cmd/webfs/fs.c
@@ -820,6 +820,8 @@
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);
}