Skip to content

fix(settings): posix_getpwuid can return false which should not be accessed like an array#43334

Merged
susnux merged 1 commit intomasterfrom
fix/array-access-on-boolean
Mar 13, 2024
Merged

fix(settings): posix_getpwuid can return false which should not be accessed like an array#43334
susnux merged 1 commit intomasterfrom
fix/array-access-on-boolean

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Feb 4, 2024

Summary

When fileowner is false or the user can not read /etc/passwd (SELinux etc) then posix_getpwuid will fail and return false which of cause should not be accessed like false['user'].

This is one of the errors reported in the log of nextcloud/notifications#2267

Checklist

@susnux susnux added bug 3. to review Waiting for reviews php Pull requests that update Php code labels Feb 4, 2024
@susnux susnux added this to the Nextcloud 29 milestone Feb 4, 2024
@susnux susnux requested review from a team, Altahrim, ArtificialOwl, icewind1991 and nfebe and removed request for a team February 4, 2024 17:30
@susnux
Copy link
Contributor Author

susnux commented Feb 4, 2024

/backport to stable28

@susnux
Copy link
Contributor Author

susnux commented Feb 4, 2024

/backport to stable27

@susnux
Copy link
Contributor Author

susnux commented Feb 4, 2024

/backport to stable26

@Altahrim Altahrim mentioned this pull request Mar 12, 2024
@Altahrim Altahrim added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Mar 13, 2024
…e accessed using array operation

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants