Diaspora: Possibility to disable the checking of the signature of likes. This is a workaround for the known problem of not receiving likes from Diaspora.
This commit is contained in:
parent
6e67d39241
commit
c7f1f2e4f2
|
@ -1868,10 +1868,14 @@ function diaspora_like($importer,$xml,$msg) {
|
|||
$parent_author_signature = base64_decode($parent_author_signature);
|
||||
|
||||
if(! rsa_verify($signed_data,$parent_author_signature,$key,'sha256')) {
|
||||
if (intval(get_config('system','ignore_diaspora_like_signature')))
|
||||
logger('diaspora_like: top-level owner verification failed. Proceeding anyway.');
|
||||
else {
|
||||
logger('diaspora_like: top-level owner verification failed.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// If there's no parent_author_signature, then we've received the like
|
||||
// from the like creator. In that case, the person is "like"ing
|
||||
|
@ -1881,10 +1885,14 @@ function diaspora_like($importer,$xml,$msg) {
|
|||
$author_signature = base64_decode($author_signature);
|
||||
|
||||
if(! rsa_verify($signed_data,$author_signature,$key,'sha256')) {
|
||||
if (intval(get_config('system','ignore_diaspora_like_signature')))
|
||||
logger('diaspora_like: like creator verification failed. Proceeding anyway');
|
||||
else {
|
||||
logger('diaspora_like: like creator verification failed.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Phew! Everything checks out. Now create an item.
|
||||
|
||||
|
|
Loading…
Reference in a new issue