Mercurial > hg > anonet-resdb
comparison doc/www.powerfulproxy.com/public_html/do_it.php @ 503:1ca0de1bb813 draft
bugfix in powerfulproxy
author | Nick <nick@somerandomnick.ano> |
---|---|
date | Wed, 11 May 2011 05:33:56 +0000 |
parents | 60ece78f8b36 |
children | 83bc7f6e03ae |
comparison
equal
deleted
inserted
replaced
502:60ece78f8b36 | 503:1ca0de1bb813 |
---|---|
8 if (count($pall) <= 1) die('Unexpected path format'); | 8 if (count($pall) <= 1) die('Unexpected path format'); |
9 array_shift($pall); | 9 array_shift($pall); |
10 $proto = array_shift($pall); | 10 $proto = array_shift($pall); |
11 $host = array_shift($pall); | 11 $host = array_shift($pall); |
12 $hostparts = explode('.', $host); | 12 $hostparts = explode('.', $host); |
13 if (ip2long(long2ip($host))===$host) if ($hostparts[0]!='1') die('Bad IP'); | 13 if (ip2long(long2ip($host))===$host) { |
14 if (!preg_match("/ano|ntwrk$/",array_pop($hostparts))) die('Bad host'); | 14 if ($hostparts[0]!='1') die('Bad IP'); |
15 } elseif (!preg_match("/ano|ntwrk$/",array_pop($hostparts))) die('Bad host'); | |
15 $path = implode('/', $pall); | 16 $path = implode('/', $pall); |
16 array_pop($pall); | 17 array_pop($pall); |
17 $rp = implode('/', $pall); | 18 $rp = implode('/', $pall); |
18 | 19 |
19 /* CONFIGURATION */ | 20 /* CONFIGURATION */ |