Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.x

Conflicts:
	plugins/OStatus/classes/FeedSub.php
This commit is contained in:
Brion Vibber 2010-12-20 14:23:15 -08:00
commit b83e7005ed

View File

@ -487,7 +487,15 @@ class FeedSub extends Memcached_DataObject
if ($their_hmac === $our_hmac) { if ($their_hmac === $our_hmac) {
return true; return true;
} }
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"); 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 { } else {
common_log(LOG_ERR, __METHOD__ . ": ignoring PuSH with bogus HMAC '$hmac'"); common_log(LOG_ERR, __METHOD__ . ": ignoring PuSH with bogus HMAC '$hmac'");
} }