summaryrefslogtreecommitdiff
path: root/plugins/OStatus
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-12-20 14:28:43 -0800
committerBrion Vibber <brion@pobox.com>2010-12-20 14:28:43 -0800
commitf82dd4e14f8e4797f2a14cf10527bb71bc224b72 (patch)
treea513dd8a0276e7586b45ad7dadd3741c2a006ca8 /plugins/OStatus
parentd8a3a88ec8eae3134694c98e5a9ae42bc30b289f (diff)
parentb83e7005ed9dfe8675f9fbbae00650a8c6a62511 (diff)
Merge branch '0.9.x' into 1.0.x
Diffstat (limited to 'plugins/OStatus')
-rw-r--r--plugins/OStatus/classes/FeedSub.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/OStatus/classes/FeedSub.php b/plugins/OStatus/classes/FeedSub.php
index 140f32384..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");
+ 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'");
}