diff options
author | Brion Vibber <brion@pobox.com> | 2010-12-20 14:23:15 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-12-20 14:23:15 -0800 |
commit | b83e7005ed9dfe8675f9fbbae00650a8c6a62511 (patch) | |
tree | d18c914503b1d4f0527174a866a3434b110400c0 /plugins/OStatus/classes | |
parent | c71d701a3f32472bb71ae38d21a4dd16ea1dcb97 (diff) | |
parent | 46123e37543be4ea784e90528176fd205bfece49 (diff) |
Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
plugins/OStatus/classes/FeedSub.php
Diffstat (limited to 'plugins/OStatus/classes')
-rw-r--r-- | plugins/OStatus/classes/FeedSub.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/OStatus/classes/FeedSub.php b/plugins/OStatus/classes/FeedSub.php index b34d7cd85..7756f6a23 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 for feed $this->uri on $this->huburi"); + 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'"); } |