Skip to content

fix(sharing): Prevent empty password when checkbox is enabled#58226

Merged
nfebe merged 3 commits intomasterfrom
fix/password-state-management
Mar 19, 2026
Merged

fix(sharing): Prevent empty password when checkbox is enabled#58226
nfebe merged 3 commits intomasterfrom
fix/password-state-management

Conversation

@nfebe
Copy link
Contributor

@nfebe nfebe commented Feb 10, 2026

Set passwordProtectedState explicitly when initializing shares with default passwords. This ensures the checkbox state is tracked independently of the password value, preventing it from unchecking when the password field is cleared.

Also block saving new shares when password protection is enabled but no password is entered, regardless of enforcement settings.

Added passWithNoTests to vitest configs to handle Vue 2/3 dual frontend test runs gracefully.

@nfebe nfebe requested review from a team as code owners February 10, 2026 16:02
@nfebe nfebe requested review from Altahrim, ArtificialOwl, leftybournes, sorbaugh, susnux and szaimen and removed request for a team February 10, 2026 16:02
@susnux susnux added bug 3. to review Waiting for reviews labels Feb 10, 2026
@susnux susnux added this to the Nextcloud 34 milestone Feb 10, 2026
@nfebe nfebe force-pushed the fix/password-state-management branch from 4bf7be8 to d31b7eb Compare March 19, 2026 09:31
@nfebe nfebe requested a review from susnux March 19, 2026 12:22
Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

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

🐘

nfebe added 2 commits March 19, 2026 15:39
Set passwordProtectedState explicitly when initializing shares with
default passwords. This ensures the checkbox state is tracked
independently of the password value, preventing it from unchecking
when the password field is cleared.

Also block saving new shares when password protection is enabled but
no password is entered, regardless of enforcement settings.

Added passWithNoTests to vitest configs to handle Vue 2/3 dual
frontend test runs gracefully.

Fixes: #57732, #57011
Signed-off-by: nfebe <fenn25.fn@gmail.com>
@nfebe nfebe force-pushed the fix/password-state-management branch from 36d23db to e7f8950 Compare March 19, 2026 14:39
@nfebe
Copy link
Contributor Author

nfebe commented Mar 19, 2026

/compile /

@nfebe
Copy link
Contributor Author

nfebe commented Mar 19, 2026

/backport to stable33

@nfebe
Copy link
Contributor Author

nfebe commented Mar 19, 2026

/backport to stable32

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nfebe nfebe enabled auto-merge March 19, 2026 15:47
@nfebe nfebe merged commit 5e93c58 into master Mar 19, 2026
144 of 152 checks passed
@nfebe nfebe deleted the fix/password-state-management branch March 19, 2026 19:23
@backportbot
Copy link

backportbot bot commented Mar 19, 2026

The backport to stable32 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable32
git pull origin stable32

# Create the new backport branch
git checkout -b backport/58226/stable32

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 0cb96fb7 e7f8950d c5e9a159

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/58226/stable32

Error: Failed to check for changes with origin/stable32: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Password checkbox unchecks after error message [Bug]: Adding a password to a share is not effective unless saved twice

4 participants