diff --git a/apps/federation/lib/Controller/OCSAuthAPIController.php b/apps/federation/lib/Controller/OCSAuthAPIController.php index be4466919f6..5a2bca4c875 100644 --- a/apps/federation/lib/Controller/OCSAuthAPIController.php +++ b/apps/federation/lib/Controller/OCSAuthAPIController.php @@ -126,7 +126,7 @@ class OCSAuthAPIController extends OCSController { 'remote server (' . $url . ') presented lower token. We will initiate the exchange of the shared secret.', ['app' => 'federation'] ); - throw new OCSForbiddenException(); + return new DataResponse(); } $this->jobList->add( diff --git a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php index 8c9b9b62566..4cfda194944 100644 --- a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php +++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php @@ -125,9 +125,9 @@ class OCSAuthAPIControllerTest extends TestCase { try { $this->ocsAuthApi->requestSharedSecret($url, $token); - $this->assertTrue($ok); + $this->assertTrue($isTrustedServer); } catch (OCSForbiddenException $e) { - $this->assertFalse($ok); + $this->assertFalse($isTrustedServer); } } @@ -183,7 +183,6 @@ class OCSAuthAPIControllerTest extends TestCase { try { $result = $ocsAuthApi->getSharedSecret($url, $token); - $this->assertTrue($ok); $data = $result->getData(); $this->assertSame('secret', $data['sharedSecret']); } catch (OCSForbiddenException $e) {