Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/959/head
Maxence Lange 2020-08-22 01:51:40 -01:00
rodzic f876c25c73
commit db9a804de0
5 zmienionych plików z 9 dodań i 10 usunięć

Wyświetl plik

@ -54,6 +54,7 @@ use OCA\Social\Service\SignatureService;
use OCA\Social\Service\StreamQueueService;
use OCA\Social\Service\StreamService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\Response;
use OCP\IRequest;
@ -205,7 +206,7 @@ class ActivityPubController extends Controller {
try {
$body = file_get_contents('php://input');
$this->miscService->log('[<<] shared-inbox: ' . $body, 1);
$this->miscService->log('[<<] sharedInbox: ' . $body, 1);
$requestTime = 0;
$origin = $this->signatureService->checkRequest($this->request, $body, $requestTime);
@ -255,8 +256,7 @@ class ActivityPubController extends Controller {
$origin = $this->signatureService->checkRequest($this->request, $body, $requestTime);
$this->fediverseService->authorized($origin);
// TODO - check the recipient <-> username
// $actor = $this->actorService->getActor($username);
$actor = $this->cacheActorService->getFromLocalAccount($username);
$activity = $this->importService->importFromJson($body);
if (!$this->signatureService->checkObject($activity)) {

Wyświetl plik

@ -34,7 +34,6 @@ namespace OCA\Social\Model;
use daita\MySmallPhpTools\Traits\TArrayTools;
use JsonSerializable;
use OCA\Social\Exceptions\LinkedDataSignatureMissingException;
use OCA\Social\Model\ActivityPub\ACore;
use OCA\Social\Service\SignatureService;

Wyświetl plik

@ -316,7 +316,7 @@ class SignatureService {
return true;
} catch (LinkedDataSignatureMissingException $e) {
$this->miscService->log(
'LinkedDataSignatureMissingException while checkObject : ' . $e->getMessage()
'Notice: LinkedDataSignatureMissingException while checkObject : ' . $e->getMessage()
. ' --- ' . json_encode($object), 1
);
}

Wyświetl plik

@ -35,7 +35,7 @@
"he": "^1.2.0",
"linkifyjs": "^2.1.8",
"tributejs": "^3.7.3",
"twemoji": "13.0.1",
"twemoji": "12.0.1",
"uuid": "^3.3.3",
"v-tooltip": "^3.0.0-alpha.11",
"vue": "^2.6.10",

Wyświetl plik

@ -805,10 +805,10 @@ export default {
}
// Abort if the post is a direct message and no valid mentions were found
if (this.type === 'direct' && postData.to.length === 0) {
OC.Notification.showTemporary(t('social', 'Error while trying to post your message: Could not find any valid recipients.'), { type: 'error' })
return
}
// if (this.type === 'direct' && postData.to.length === 0) {
// OC.Notification.showTemporary(t('social', 'Error while trying to post your message: Could not find any valid recipients.'), { type: 'error' })
// return
// }
// Post message
this.loading = true