diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-08-10 20:27:01 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-08-11 20:53:49 +0300 |
commit | 6dc179ee12fe86a6e70ff53630d60da3e5aecc60 (patch) | |
tree | 0b4798694b228188afca150f773cb5cbcca65a3b /tests/Core | |
parent | 11cf253f52ec9a133d8d22802c9070aabf7cfa4c (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/Core')
-rw-r--r-- | tests/Core/Controller/ClientFlowLoginControllerTest.php | 6 |
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')); } |