# HG changeset patch # User Nick # Date 1305091841 0 # Node ID 60ece78f8b364157e70de3f9b9f8ff9145ed1963 # Parent 4d73737f40ff27fa6b9e7b9b44b0775149fe2a29 added host and IP verification to powerfulproxy diff -r 4d73737f40ff -r 60ece78f8b36 doc/www.powerfulproxy.com/public_html/do_it.php --- a/doc/www.powerfulproxy.com/public_html/do_it.php Wed May 11 05:11:58 2011 +0000 +++ b/doc/www.powerfulproxy.com/public_html/do_it.php Wed May 11 05:30:41 2011 +0000 @@ -9,6 +9,9 @@ array_shift($pall); $proto = array_shift($pall); $host = array_shift($pall); +$hostparts = explode('.', $host); +if (ip2long(long2ip($host))===$host) if ($hostparts[0]!='1') die('Bad IP'); +if (!preg_match("/ano|ntwrk$/",array_pop($hostparts))) die('Bad host'); $path = implode('/', $pall); array_pop($pall); $rp = implode('/', $pall);