Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function respectFileMounts in Classes/Security/FilePermissionsAspect.php incorrect #213

Open
abvdveen opened this issue May 29, 2021 · 1 comment

Comments

@abvdveen
Copy link

Hi,

Just spent 6 hours debugging the fact that BE users other than admin would not see any files when listing a folder in the Media module. It turns out this line screws up the permissions check:

$fileMountUids = implode(',', array_filter($fileMounts));

This triggers choosing the wrong expression in function addDemandConstraints in vidi/Classes/Service/DataService.php:

uid = '54,4,49,43,55,36,37,39,41,56,51'

which should be:

uid IN (54, 4, 49, 43, 55, 36, 37, 39, 41, 56, 51)

Changing the implode to:

$fileMountUids = array_filter($fileMounts);

fixes it.

@hannesbochmann
Copy link

@abvdveen Thanks for the effort. You saved me those hours of debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants