-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: resdb
action: commit
revision:
path_from:
revision_from: ce951043c47a3bf383f02c72865bacd175a98baf:
path_to:
revision_to:

git.thebackupbox.net

resdb

git://git.thebackupbox.net/resdb

commit ce951043c47a3bf383f02c72865bacd175a98baf
Author: Nick <nick@somerandomnick.ano>
Date:   Wed May 11 05:30:41 2011 +0000

    added host and IP verification to powerfulproxy

diff --git a/doc/www.powerfulproxy.com/public_html/do_it.php b/doc/www.powerfulproxy.com/public_html/do_it.php

index 20ac8dee4dddeade11881e0dc9f307f706d513fd..

index ..0a5fedb1660ab3410a0c7bed824090cbcdeb85ba 100644

--- a/doc/www.powerfulproxy.com/public_html/do_it.php
+++ b/doc/www.powerfulproxy.com/public_html/do_it.php
@@ -9,6 +9,9 @@ if (count($pall) <= 1) die('Unexpected path format');
 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);

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 13:36:08 2024