X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOStatus%2Fclasses%2FFeedSub.php;h=7756f6a234325a5a50e751ce65c4c168bc7cdd7f;hb=6455461c196fcb8e7c0047870d480e4a97986709;hp=140f323846498c91817d6dc59a20d083dbebd04d;hpb=22047f6412811cb340aee6ba49d15257581b5aa9;p=quix0rs-gnu-social.git diff --git a/plugins/OStatus/classes/FeedSub.php b/plugins/OStatus/classes/FeedSub.php index 140f323846..7756f6a234 100644 --- a/plugins/OStatus/classes/FeedSub.php +++ b/plugins/OStatus/classes/FeedSub.php @@ -487,7 +487,15 @@ class FeedSub extends Memcached_DataObject if ($their_hmac === $our_hmac) { return true; } - common_log(LOG_ERR, __METHOD__ . ": ignoring PuSH with bad SHA-1 HMAC: got $their_hmac, expected $our_hmac"); + if (common_config('feedsub', 'debug')) { + $tempfile = tempnam(sys_get_temp_dir(), 'feedsub-receive'); + if ($tempfile) { + file_put_contents($tempfile, $post); + } + common_log(LOG_ERR, __METHOD__ . ": ignoring PuSH with bad SHA-1 HMAC: got $their_hmac, expected $our_hmac for feed $this->uri on $this->huburi; saved to $tempfile"); + } else { + common_log(LOG_ERR, __METHOD__ . ": ignoring PuSH with bad SHA-1 HMAC: got $their_hmac, expected $our_hmac for feed $this->uri on $this->huburi"); + } } else { common_log(LOG_ERR, __METHOD__ . ": ignoring PuSH with bogus HMAC '$hmac'"); }