Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/Command/CirclesCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,12 @@ private function setupLoopback(InputInterface $input, OutputInterface $output, s
* @throws UnknownRemoteException
*/
private function testLoopback(InputInterface $input, OutputInterface $output): bool {
$this->appConfig->setValueInt(Application::APP_ID, 'test_dummy_token', time() + 10);

if (!$this->testRequest($output, 'GET', 'core.CSRFToken.index')) {
return false;
}

$this->appConfig->setValueInt(Application::APP_ID, 'test_dummy_token', time() + 10);
if (!$this->testRequest(
$output, 'POST', 'circles.EventWrapper.asyncBroadcast',
['token' => 'test-dummy-token']
Expand Down
4 changes: 3 additions & 1 deletion lib/Service/FederatedEventService.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ private function configureEvent(FederatedEvent $event, IFederatedItem $item) {
public function initBroadcast(FederatedEvent $event): bool {
$instances = $this->getInstances($event);
// if empty instance and ran from CLI, any action as already been managed
if (empty($instances) && (!$event->isAsync() || OC::$CLI)) {
// except for loopback tests which need async verification even from CLI
$isLoopbackTest = is_a($event->getClass(), IFederatedItemLoopbackTest::class, true);
if (empty($instances) && (!$event->isAsync() || (OC::$CLI && !$isLoopbackTest))) {
return false;
}

Expand Down
Loading