]> git.mxchange.org Git - friendica.git/commitdiff
Some more logging added for the DDoS prevention
authorMichael Vogel <icarus@dabo.de>
Sat, 28 Mar 2015 07:49:24 +0000 (08:49 +0100)
committerMichael Vogel <icarus@dabo.de>
Sat, 28 Mar 2015 07:49:24 +0000 (08:49 +0100)
boot.php
include/gprobe.php

index 3d4744d9b1314cb2a305d45e8c6fe8f0ec255d95..9db210840fd8cfccd0747e55ee17afd09ff2ef13 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -2184,13 +2184,13 @@ function zrl_init(&$a) {
 
                // Is it a DDoS attempt?
                // The check fetches the cached value from gprobe to reduce the load for this system
-               $urlparts = parse_url($url);
+               $urlparts = parse_url($tmp_str);
 
                $result = Cache::get("gprobe:".$urlparts["host"]);
                if (!is_null($result)) {
                        $result = unserialize($result);
                        if ($result["network"] == NETWORK_FEED) {
-                               logger("DDoS attempt detected for ".$urlparts["host"], LOGGER_DEBUG);
+                               logger("DDoS attempt detected for ".$urlparts["host"]." by ".$_SERVER["REMOTE_ADDR"].". server data: ".print_r($_SERVER, true), LOGGER_DEBUG);
                                return;
                        }
                }
index 3f3164f763cb8e590ff5009d5d8806f9d1f76743..03cdbd072ba6debb9e5e03ef3b5468d2e58a3d10 100644 (file)
@@ -48,7 +48,7 @@ function gprobe_run(&$argv, &$argc){
                if (!is_null($result)) {
                        $result = unserialize($result);
                        if ($result["network"] == NETWORK_FEED) {
-                               logger("DDoS attempt detected for ".$urlparts["host"], LOGGER_DEBUG);
+                               logger("DDoS attempt detected for ".$urlparts["host"]." by ".$_SERVER["REMOTE_ADDR"].". server data: ".print_r($_SERVER, true), LOGGER_DEBUG);
                                return;
                        }
                }