fix: add check for validatePromise for passwordless environments#1209
Merged
juliusknorr merged 2 commits intonextcloud-libraries:mainfrom Nov 6, 2025
Merged
Conversation
Signed-off-by: Benjamin Frueh <[email protected]>
artonge
approved these changes
Nov 4, 2025
6985c61 to
306e1eb
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1209 +/- ##
=======================================
Coverage ? 14.82%
=======================================
Files ? 8
Lines ? 263
Branches ? 12
=======================================
Hits ? 39
Misses ? 221
Partials ? 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bea80ed to
2d4705a
Compare
Signed-off-by: Benjamin Frueh <[email protected]>
2d4705a to
dc293ed
Compare
Merged
susnux
reviewed
Nov 6, 2025
Collaborator
|
/backport to stable5 |
|
The backport to # Switch to the target branch and update it
git checkout stable5
git pull origin stable5
# Create the new backport branch
git checkout -b backport/1209/stable5
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick b1be655b dc293ed7
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1209/stable5Error: Failed to check for changes with origin/stable5: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes an error in the password confirmation interceptor when used with
Strictmode in passwordless environments, e. g. SSOProblem
In passwordless environments, the request interceptor exits early because of
!isPasswordConfirmationRequired()without creating avalidatePromise. The response interceptor then tries to resolve this undefined promise for Strict mode requests, causing a error.This error prevents proper success feedback. For example, in
nextcloud/files_externalwith SSO it caused multiple POST requests and multiple saved configurations because it could not get the database id from the response.Solution
Add a check for
validatePromisebefore resolving it. IfvalidatePromiseis undefined at this point, it has to be from!isPasswordConfirmationRequired().