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

feat(core): Expose the confirm password endpoint #43000

Closed

Conversation

provokateurin
Copy link
Member

Summary

This allows non-web clients to confirm the password in order to use endpoints that require it.

Checklist

@provokateurin provokateurin force-pushed the feat/core/expose-confirm-password-endpoint branch from fa8f01d to a84c71d Compare January 21, 2024 21:11
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

Sending auth data should pass the password check:

$this->session->set('last-password-confirm', $this->timeFactory->getTime());

The problem is you are sending auth + cookies, so we use the cookies only and the line above is never ran. We should fix the PasswordConfirmMiddleware to check if auth data was provided with the request.

@provokateurin provokateurin marked this pull request as draft January 22, 2024 09:44
@provokateurin
Copy link
Member Author

My testing confirms:

  • Basic auth without cookies works
  • Bearer auth never works (regardless of cookies)

@ChristophWurst ChristophWurst deleted the feat/core/expose-confirm-password-endpoint branch January 22, 2024 16:44
@provokateurin provokateurin restored the feat/core/expose-confirm-password-endpoint branch February 20, 2024 07:03
@provokateurin
Copy link
Member Author

After the discussions in #43034 we came to the conclusion that this PR makes more sense and is less susceptible to any additional security holes the other PR could open up.

@provokateurin
Copy link
Member Author

Bleh should have re-opened before pushing, will create a new PR

@skjnldsv skjnldsv removed this from the Nextcloud 29 milestone Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants