From: Stephen Paul Weber Date: Sun, 25 Oct 2015 17:30:51 +0000 (+0000) Subject: Ignore self pings X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f09a82268f146f0c22a3a38ad0a88e999234fa5d;p=quix0rs-gnu-social.git Ignore self pings --- diff --git a/plugins/Linkback/lib/util.php b/plugins/Linkback/lib/util.php index 8f8388a3d2..94f0d992f4 100644 --- a/plugins/Linkback/lib/util.php +++ b/plugins/Linkback/lib/util.php @@ -5,6 +5,13 @@ function linkback_lenient_target_match($body, $target) { } function linkback_get_source($source, $target) { + // Check if we are pinging ourselves and ignore + $localprefix = common_config('site', 'server') . '/' . common_config('site', 'path'); + if(linkback_lenient_target_match($source, $localprefix)) { + common_debug('Ignoring self ping from ' . $source . ' to ' . $target); + return NULL; + } + $request = HTTPClient::start(); try {