Skip to content

fix: Don't crash if disabled user is missing in the database - #48207

Merged
artonge merged 1 commit into
masterfrom
artonge/fix/prevent_missing_users_from_crashing_disabled_users_search
Sep 23, 2024
Merged

fix: Don't crash if disabled user is missing in the database#48207
artonge merged 1 commit into
masterfrom
artonge/fix/prevent_missing_users_from_crashing_disabled_users_search

Conversation

@artonge

@artongeartonge commented Sep 19, 2024

Copy link
Copy Markdown
Collaborator

If the user is missing in the DB, then getEMailAddress will throw as user will be null.

@artongeartonge self-assigned this Sep 19, 2024
@artongeartonge added bug 3. to review Waiting for reviews feature: users and groups php Pull requests that update Php code labels Sep 19, 2024
@artongeartonge added this to the Nextcloud 31 milestone Sep 19, 2024
@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable30

@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable29

@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable28

@come-nccome-nc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, please throw a NoUserException and catch that, using try/catch for a typeerror is a bad idea.

@artonge
artongeforce-pushed the artonge/fix/prevent_missing_users_from_crashing_disabled_users_search branch from eaaad6a to 5a951faCompareSeptember 19, 2024 13:55
@artonge
artongeforce-pushed the artonge/fix/prevent_missing_users_from_crashing_disabled_users_search branch 2 times, most recently from 88a9483 to 1fa3842CompareSeptember 20, 2024 09:11
@artonge
artongeforce-pushed the artonge/fix/prevent_missing_users_from_crashing_disabled_users_search branch from cfb20c0 to e0ed466CompareSeptember 20, 2024 09:26
@artonge
artongeforce-pushed the artonge/fix/prevent_missing_users_from_crashing_disabled_users_search branch 7 times, most recently from c99c43a to 78bfecbCompareSeptember 20, 2024 14:48
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge
artongeforce-pushed the artonge/fix/prevent_missing_users_from_crashing_disabled_users_search branch from 78bfecb to 22d5d29CompareSeptember 23, 2024 08:40
@artonge
artonge merged commit 0dc2363 into masterSep 23, 2024
@artonge
artonge deleted the artonge/fix/prevent_missing_users_from_crashing_disabled_users_search branch September 23, 2024 10:03
@skjnldsvskjnldsv mentioned this pull request Jan 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugfeature: users and groupsphpPull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@artonge@Altahrim@come-nc