X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=public_html%2Fcgi-bin%2Fpostget.php;h=8ebabc756ad7b96a1a503ec613a8f195c1f7f9fa;hp=a95466a5dfe046da6a5867ad940f0ca08cc91355;hb=313036166b0eae851bbf36730186752cfaa2956d;hpb=be5f85b19ee36d0b2b5e1ce2cc5a31757c98d26e diff --git a/public_html/cgi-bin/postget.php b/public_html/cgi-bin/postget.php index a95466a..8ebabc7 100644 --- a/public_html/cgi-bin/postget.php +++ b/public_html/cgi-bin/postget.php @@ -1,17 +1,14 @@ '."\n"); -?> - - -
\n");
- unset($HTTP_GET_VARS["_postget"]);
foreach ($HTTP_GET_VARS as $key=>$val) {
if (ereg("^_priv_(postget.*)\$",$val,$matched)) {
- if ($HTTP_SERVER_VARS["REMOTE_ADDR"]!="127.0.0.1")
+ $permit=array("127.0.0.1"=>1,"192.168.192.1"=>1,"192.168.90.11"=>1,"192.168.90.12"=>1);
+ if (!$permit[$HTTP_SERVER_VARS["REMOTE_ADDR"]])
print("Forbidden:"
." REMOTE_ADDR=".htmlspecialchars($HTTP_SERVER_VARS["REMOTE_ADDR"])
.",key=".htmlspecialchars($key)
@@ -19,12 +16,41 @@
."
"
);
else
- $val=chop(join(" ",file("/home/short/priv/".$matched[1],false/*use_include_path*/)));
+ $HTTP_GET_VARS[$key]=chop(join(" ",file($path_priv.$matched[1],false/*use_include_path*/)));
+ }
+ }
+
+ if ($getget) {
+ $first='?';
+ foreach ($HTTP_GET_VARS as $key=>$val) {
+ $where.="${first}".urlencode($key)."=".urlencode($val);
+ $first='&';
}
- print("\n");
+ header("Location: $where");
+ }
+ header("Content-type: text/html");
+ print(''."\n");
+?>
+
+
+
\n" + ."get\n" + ."
\n"); + } + else { + print("" + ."\n" + ."\n"); } - print("\n"); - print("\n"); ?> - +