Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix login flow form actions #16711

Merged
merged 1 commit into from
Aug 12, 2019
Merged

Fix login flow form actions #16711

merged 1 commit into from
Aug 12, 2019

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Aug 10, 2019

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.

Basically otherwise master is broken with the desktop client (uses chromium) and probably 90% of android (also chrome).

Easiest way to test is probably to try to authenticate your desktop client via the login flow

@rullzer rullzer added bug 3. to review Waiting for reviews labels Aug 10, 2019
@rullzer rullzer added this to the Nextcloud 17 milestone Aug 10, 2019
@rullzer rullzer added the high label Aug 11, 2019
Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, but failing tests:

There were 2 failures:
131 |  
132 | 1) Tests\Core\Controller\ClientFlowLoginControllerTest::testShowAuthPickerPageWithOcsHeader
133 | Failed asserting that two objects are equal.
134 | --- Expected
135 | +++ Actual
136 | @@ @@
137 | + 1 => 'nc://*'
138 |  
139 | /drone/src/tests/Core/Controller/ClientFlowLoginControllerTest.php:189
140 |  
141 | 2) Tests\Core\Controller\ClientFlowLoginControllerTest::testShowAuthPickerPageWithOauth
142 | Failed asserting that two objects are equal.
143 | --- Expected
144 | +++ Actual
145 | @@ @@
146 | + 1 => 'nc://*'
147 |  
148 | /drone/src/tests/Core/Controller/ClientFlowLoginControllerTest.php:248
149

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>
@rullzer rullzer force-pushed the fix/csp/form_actions/loginflow branch from 0da7307 to 6dc179e Compare August 11, 2019 17:54
@rullzer
Copy link
Member Author

rullzer commented Aug 11, 2019

Right done :)

@georgehrke georgehrke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Aug 12, 2019
@georgehrke
Copy link
Member

@rullzer Backport?

@rullzer
Copy link
Member Author

rullzer commented Aug 12, 2019

@rullzer Backport?

Nope, form-action was added in 17

@rullzer rullzer merged commit fced73a into master Aug 12, 2019
@rullzer rullzer deleted the fix/csp/form_actions/loginflow branch August 12, 2019 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants