X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FDiaspora.php;h=586b6e9ec282e8b425adfbf42adff5a71d995bcc;hb=c0579bcad9c9bb3c98b5cb8a6d257a6cdf774835;hp=16f934eccf3cbef0d475be9de2228ec16163644b;hpb=3217de30fa66e38c8794758b16ff2dfe2c01961f;p=friendica.git diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 16f934eccf..586b6e9ec2 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -2870,9 +2870,9 @@ class Diaspora return false; } - $aes_key = openssl_random_pseudo_bytes(32); + $aes_key = random_bytes(32); $b_aes_key = base64_encode($aes_key); - $iv = openssl_random_pseudo_bytes(16); + $iv = random_bytes(16); $b_iv = base64_encode($iv); $ciphertext = self::aesEncrypt($aes_key, $iv, $msg); @@ -4049,13 +4049,11 @@ class Diaspora return false; } - $parent = Post::selectFirst(['parent-uri'], ['uri' => $item['thr-parent']]); - if (!DBA::isResult($parent)) { - return; + // This is only needed for the automated tests + if (empty($owner['uprvkey'])) { + return false; } - $item['parent-uri'] = $parent['parent-uri']; - $message = self::constructComment($item, $owner); if ($message === false) { return false;