Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-08-10 20:27:01 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-08-11 20:53:49 +0300
commit6dc179ee12fe86a6e70ff53630d60da3e5aecc60 (patch)
tree0b4798694b228188afca150f773cb5cbcca65a3b /tests
parent11cf253f52ec9a133d8d22802c9070aabf7cfa4c (diff)
Fix login flow form actions
So fun fact. Chrome considers a redirect after submitting a form part of the form actions. Since we redirect to a new protocol (nc://login/). Causing the form submission to work but the redirect failing hard. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/ClientFlowLoginControllerTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php
index 73b8118a876..f35b616a68e 100644
--- a/tests/Core/Controller/ClientFlowLoginControllerTest.php
+++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php
@@ -186,6 +186,9 @@ class ClientFlowLoginControllerTest extends TestCase {
],
'guest'
);
+ $csp = new Http\ContentSecurityPolicy();
+ $csp->addAllowedFormActionDomain('nc://*');
+ $expected->setContentSecurityPolicy($csp);
$this->assertEquals($expected, $this->clientFlowLoginController->showAuthPickerPage());
}
@@ -245,6 +248,9 @@ class ClientFlowLoginControllerTest extends TestCase {
],
'guest'
);
+ $csp = new Http\ContentSecurityPolicy();
+ $csp->addAllowedFormActionDomain('nc://*');
+ $expected->setContentSecurityPolicy($csp);
$this->assertEquals($expected, $this->clientFlowLoginController->showAuthPickerPage('MyClientIdentifier'));
}