This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository www.
View the commit online.
commit 32fa65b582a3f59ebd7c451f15c1258b339230d3
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
AuthorDate: Thu Sep 28 08:18:15 2023 +0100
ss - remove the remove/ban stuff as it's kind of hard to maintain
---
public_html/ss/ban.php | 74 ----------------------------------------------
public_html/ss/display.php | 5 ----
public_html/ss/remove.php | 56 -----------------------------------
public_html/ss/rmabuse.sh | 5 ----
4 files changed, 140 deletions(-)
diff --git a/public_html/ss/ban.php b/public_html/ss/ban.php
deleted file mode 100644
index 2a7798f2..00000000
--- a/public_html/ss/ban.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-function get_ip()
-{
- if (getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR");
- else $ip = "UNKNOWN";
- return $ip;
-}
-
-$img = "";
-if (isset($_GET['image']))
- $img = $_GET['image'];
-
-$file = $_SERVER["DOCUMENT_ROOT"] . "/ss/" . $img;
-$ignore_file = $_SERVER["DOCUMENT_ROOT"] . "/ss/ignore-" . $img;
-$abuse_file = $_SERVER["DOCUMENT_ROOT"] . "/ss/abuse-" . $img;
-
-if (isset($img) && $img[0] == "e" && file_exists($file) && !file_exists($ignore_file))
- {
- $already = 0;
- $auth = md5($img . get_ip());
-
- $count = 0;
- if (file_exists($abuse_file) && ($fh = fopen($abuse_file, "r")))
- {
- $auth_eol = $auth . "\n";
- while (!feof($fh))
- {
- $tmp = fgets($fh);
- if ($auth_eol == $tmp)
- {
- // Don't let people vote multiple time somehow
- $already = 1;
- }
- else
- {
- $count++;
- }
- }
- fclose($fh);
- }
-
- if ($count > 3)
- {
- if (file_exists($_SERVER["DOCUMENT_ROOT"] . "/ss/ip-" . $img)) {
- rename($_SERVER["DOCUMENT_ROOT"] . "/ss/ip-" . $img,
- $_SERVER["DOCUMENT_ROOT"] . "/ss/ban/ip-" . $img);
- }
- if (file_exists($_SERVER["DOCUMENT_ROOT"] . "/ss/abuse-" . $img)) {
- rename($_SERVER["DOCUMENT_ROOT"] . "/ss/abuse-" . $img,
- $_SERVER["DOCUMENT_ROOT"] . "/ss/ban/abuse-" . $img);
- }
- if (file_exists($_SERVER["DOCUMENT_ROOT"] . "/ss/th-" . $img)) {
- rename($_SERVER["DOCUMENT_ROOT"] . "/ss/th-" . $img,
- $_SERVER["DOCUMENT_ROOT"] . "/ss/ban/th-" . $img);
- }
- if (file_exists($_SERVER["DOCUMENT_ROOT"] . "/ss/" . $img)) {
- rename($_SERVER["DOCUMENT_ROOT"] . "/ss/" . $img,
- $_SERVER["DOCUMENT_ROOT"] . "/ss/ban/" . $img);
- }
- }
- else
- {
- if ($already == 0)
- {
- $fh = fopen($abuse_file, "a");
- fwrite($fh, $auth . "\n");
- fclose($fh);
- }
- }
- }
-
-header("Location: http://www.enlightenment.org/ss/");
-die();
-?>
diff --git a/public_html/ss/display.php b/public_html/ss/display.php
index 166cef56..1517f307 100644
--- a/public_html/ss/display.php
+++ b/public_html/ss/display.php
@@ -38,11 +38,6 @@
print "<center><a href="" . $img . ">";
print "<img src="" . $img . " class=full>";
print "</a><br>\n";
- if ($head == $auth || get_ip() == "140.211.167.135")
- {
- print "<span><a href="" . $img . ">Remove my image</a></span>\n";
- }
- print "<span><a href="" . $img . ">This image is inappropriate</a></span><br>\n";
print "</center>\n";
?>
diff --git a/public_html/ss/remove.php b/public_html/ss/remove.php
deleted file mode 100644
index 9e3fcd45..00000000
--- a/public_html/ss/remove.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-function get_ip()
-{
- if (getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR");
- else $ip = "UNKNOWN";
- return $ip;
-}
-
-$img = "";
-if (isset($_GET['image']))
- $img = $_GET['image'];
-
-$file = $_SERVER["DOCUMENT_ROOT"] . "/ss/" . $img;
-$auth_file = $_SERVER["DOCUMENT_ROOT"] . "/ss/ip-" . $img;
-$ignore_file = $_SERVER["DOCUMENT_ROOT"] . "/ss/ignore-" . $img;
-$abuse_file = $_SERVER["DOCUMENT_ROOT"] . "/ss/abuse-" . $img;
-$auth_expire = 60 * 60;
-$ip = get_ip();
-
-if ($img[0] == "e" && file_exists($file))
- {
- $remove = 0;
- if ($ip = "140.211.167.135")
- {
- $remove = 1;
- }
- else if (time() - filemtime($auth_file) < $auth_expire)
- {
- $auth = md5($img . get_ip());
-
- $fh = fopen($auth_file, "r");
- $head = fgets($fh);
- fclose($fh);
-
- if ($auth == $head)
- {
- $remove = 1;
- }
- }
-
- if ($remove == 1)
- {
- rename($_SERVER["DOCUMENT_ROOT"] . "/ss/ip-" . $img,
- $_SERVER["DOCUMENT_ROOT"] . "/ss/kill/ip-" . $img);
- rename($_SERVER["DOCUMENT_ROOT"] . "/ss/abuse-" . $img,
- $_SERVER["DOCUMENT_ROOT"] . "/ss/kill/abuse-" . $img);
- rename($_SERVER["DOCUMENT_ROOT"] . "/ss/th-" . $img,
- $_SERVER["DOCUMENT_ROOT"] . "/ss/kill/th-" . $img);
- rename($_SERVER["DOCUMENT_ROOT"] . "/ss/" . $img,
- $_SERVER["DOCUMENT_ROOT"] . "/ss/kill/" . $img);
- }
- }
-
-header("Location: http://www.enlightenment.org/ss/");
-die();
-?>
diff --git a/public_html/ss/rmabuse.sh b/public_html/ss/rmabuse.sh
deleted file mode 100755
index 5f742ed7..00000000
--- a/public_html/ss/rmabuse.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-for I in abuse-e-*; do
- ID=`echo $I | sed 's/abuse-e-//g'`
- rm *"$ID"
-done
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.