Changing album group permissions doesn't work properly #1861

Open
opened 2026-10-05 00:58:57 +02:00 by adam · 8 comments
Owner

If I change album permissions for a user group, e.g. make a sub-album private, I can do that via the admin panel -> Users -> Groups -> Manage permissions. The issue is that the album doesn't actually become private. It is still visible to users from that group. However, it will be private to newly registered users that by default belong to that group. So you end up with users belonging to the same user group seeing different things, maybe even albums that you want to be private. This is a bit of a serious security issue.

The workaround is moving the whole album to the 'Forbidden' section and then moving the ones that you want to make public back to the 'Authorized' section. This is not clear at all that this is how it works and now I wonder how many albums in my gallery are public to certain user groups when they should be private....

If I change album permissions for a user group, e.g. make a sub-album private, I can do that via the admin panel -> Users -> Groups -> Manage permissions. The issue is that the album doesn't actually become private. It is still visible to users from that group. However, it will be private to newly registered users that by default belong to that group. So you end up with users belonging to the same user group seeing different things, maybe even albums that you want to be private. This is a bit of a serious security issue. The workaround is moving the whole album to the 'Forbidden' section and then moving the ones that you want to make public back to the 'Authorized' section. This is not clear at all that this is how it works and now I wonder how many albums in my gallery are public to certain user groups when they should be private.... <!-- github-sync-id:2223215499 -->
Author
Owner

Hello
That's concerning.
could you provide a step by step procedure to reproduce with urls of the pages. That's the best way to be sure there is no misunderstanding. Thank you

Hello That's concerning. could you provide a step by step procedure to reproduce with urls of the pages. That's the best way to be sure there is no misunderstanding. Thank you <!-- github-comment-id:2034980579 -->
Author
Owner

Hello,

I cannot provide URLs because my gallery is private. But if that is indeed an issue with Piwigo and not with my installation then you should be able to reproduce it via the following:

  1. Create an album with sub-albums.
  2. Create a user group that is the default group users get assigned to when they register.
  3. Add a user to that group.
  4. Make one of the subalbums not accessible to that group via Users -> Groups -> Manage Permissions.
  5. That user will still be able to see and access the album.
  6. Create a new user and that user will not be able to see it.
Hello, I cannot provide URLs because my gallery is private. But if that is indeed an issue with Piwigo and not with my installation then you should be able to reproduce it via the following: 1) Create an album with sub-albums. 2) Create a user group that is the default group users get assigned to when they register. 4) Add a user to that group. 3) Make one of the subalbums not accessible to that group via Users -> Groups -> Manage Permissions. 4) That user will still be able to see and access the album. 5) Create a new user and that user will not be able to see it. <!-- github-comment-id:2167456523 -->
Author
Owner

Any updates on this?

Any updates on this? <!-- github-comment-id:2461719185 -->
Author
Owner

2 questions :

  1. is the user an admin?
  2. do you have configured a custom $conf['inheritance_by_default'] ?
2 questions : 1. is the user an admin? 2. do you have configured a custom `$conf['inheritance_by_default']` ? <!-- github-comment-id:2461834629 -->
Author
Owner
  1. No the user is not an admin
  2. No I don't.

Are you able to reproduce the issue on your end?

1. No the user is not an admin 2. No I don't. Are you able to reproduce the issue on your end? <!-- github-comment-id:2550631891 -->
Author
Owner

I replicated the bug using those steps on a fresh install of 15.4.0. The sub-album is in the Forbidden list but the user account can still view it.

Next I looked at the sub-album in Albums -> Manage -> Edit -> Permissions - my "default group" group is not listed there. Clicking Save (without changing anything) sets the expected permissions, the user account can no longer see the sub-album.

I have $conf['newcat_default_status'] = 'private'; in my config file, that's the only change to it.

I replicated the bug using those steps on a fresh install of 15.4.0. The sub-album is in the ```Forbidden``` list but the user account can still view it. Next I looked at the sub-album in ```Albums -> Manage -> Edit -> Permissions``` - my "default group" group is not listed there. Clicking Save (without changing anything) sets the expected permissions, the user account can no longer see the sub-album. I have ```$conf['newcat_default_status'] = 'private';``` in my config file, that's the only change to it. <!-- github-comment-id:2699568235 -->
Author
Owner

I can't reproduce the bugs described here. @HWFord can you?

I can't reproduce the bugs described here. @HWFord can you? <!-- github-comment-id:2701144264 -->
Author
Owner
Noting that I am using https://github.com/linuxserver/docker-piwigo <!-- github-comment-id:2711482603 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1861