Skip to content

fix(files_sharing): Fix error messages from password policy - #49361

Merged
skjnldsv merged 1 commit into
masterfrom
fix/fix-share-creation-error-messages
Nov 19, 2024
Merged

fix(files_sharing): Fix error messages from password policy#49361
skjnldsv merged 1 commit into
masterfrom
fix/fix-share-creation-error-messages

Conversation

@come-nc

@come-nccome-nc commented Nov 19, 2024

Copy link
Copy Markdown
Contributor

Follow-up of #48918

Summary

Exceptions thrown from password_policy may bubble up in share creation or update when a password is used. Their message is meant to be shown to the user. This always the case for HintException so we catch that instead of the subclass GenericShareException.

Checklist

Exceptions thrown from password_policy may bubble up in share creation
or update when a password is used. Their message is meant to be shown
to the user. This always the case for HintException so we catch that
instead of the subclass GenericShareException.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nccome-nc added the 3. to review Waiting for reviews label Nov 19, 2024
@come-nccome-nc self-assigned this Nov 19, 2024
@come-nccome-nc added the bug label Nov 19, 2024
@come-nccome-nc added this to the Nextcloud 31 milestone Nov 19, 2024
@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable30

@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable29

@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable28

@skjnldsv
skjnldsv merged commit 6559c20 into masterNov 19, 2024
@skjnldsv
skjnldsv deleted the fix/fix-share-creation-error-messages branch November 19, 2024 10:17
@tobiasKaminsky

Copy link
Copy Markdown
Member

I tested it with my Android test case and it still fails with generic error message.
I am doing an update to /ocs/v2.php/apps/files_sharing/api/v1/shares

@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable30

@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable29

@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable28

@come-nc

Copy link
Copy Markdown
ContributorAuthor

Requiring backports again now that #49366 is approved, both PR will need to be backported.

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

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@come-nc@tobiasKaminsky@skjnldsv@provokateurin