From 8370111cf425340445a63bce46a0443dd6e28c2d Mon Sep 17 00:00:00 2001 From: rakekniven Date: Sat, 30 Jun 2018 08:49:44 +0200 Subject: [PATCH 1/2] Update SettingsController.php Grammar fix. Uppercase URL See https://www.transifex.com/nextcloud/nextcloud/translate/#de/$/146983238?q=issue%3Aopen --- apps/oauth2/lib/Controller/SettingsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/oauth2/lib/Controller/SettingsController.php b/apps/oauth2/lib/Controller/SettingsController.php index 67d36b69c9..499969b93b 100644 --- a/apps/oauth2/lib/Controller/SettingsController.php +++ b/apps/oauth2/lib/Controller/SettingsController.php @@ -75,7 +75,7 @@ class SettingsController extends Controller { string $redirectUri): JSONResponse { if (filter_var($redirectUri, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED|FILTER_FLAG_HOST_REQUIRED) === false) { - return new JSONResponse(['message' => $this->l->t('Your redirect url needs to be a full url for example: https://yourdomain.com/path')], Http::STATUS_BAD_REQUEST); + return new JSONResponse(['message' => $this->l->t('Your redirect URL needs to be a full URL for example: https://yourdomain.com/path')], Http::STATUS_BAD_REQUEST); } $client = new Client(); From b24b5bd297c98f6a8d9c5d55749034e9507978a5 Mon Sep 17 00:00:00 2001 From: rakekniven Date: Sat, 30 Jun 2018 08:51:58 +0200 Subject: [PATCH 2/2] Update SettingsControllerTest.php adapted test for grammar change of URL --- apps/oauth2/tests/Controller/SettingsControllerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php index 942aa5c481..4e4a69c940 100644 --- a/apps/oauth2/tests/Controller/SettingsControllerTest.php +++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php @@ -189,6 +189,6 @@ class SettingsControllerTest extends TestCase { $result = $this->settingsController->addClient('test', 'invalidurl'); $this->assertEquals(Http::STATUS_BAD_REQUEST, $result->getStatus()); - $this->assertSame(['message' => 'Your redirect url needs to be a full url for example: https://yourdomain.com/path'], $result->getData()); + $this->assertSame(['message' => 'Your redirect URL needs to be a full URL for example: https://yourdomain.com/path'], $result->getData()); } }