related albums shows forbidden albums #1184

Closed
opened 2026-10-05 00:34:49 +02:00 by adam · 17 comments
Owner

when on an album or a photo that appears in several albums including private albums to which the current user does not have access, the name of these albums is displayed and active in the "related albums" menu .

The related album menu should not show album names to which the current user have no access.

This poses a double problem for me:

  • security / confidentiality : a user or an anonymous visitor does not have to know the existence or the name of private albums to which he does not have access
  • ergonomics and use since, obviously, if I click on the name of this inaccessible album, I have nothing in my search, since I cross with an album which I do not do not have access to and I am afraid this will be very confusing for an unsuspecting user.

piwigo 11.3.0

when on an album or a photo that appears in several albums including private albums to which the current user does not have access, the name of these albums is displayed and active in the "related albums" menu . The related album menu should not show album names to which the current user have no access. This poses a double problem for me: - security / confidentiality : a user or an anonymous visitor does not have to know the existence or the name of private albums to which he does not have access - ergonomics and use since, obviously, if I click on the name of this inaccessible album, I have nothing in my search, since I cross with an album which I do not do not have access to and I am afraid this will be very confusing for an unsuspecting user. piwigo 11.3.0 <!-- github-sync-id:824313325 -->
adam closed this issue 2026-10-05 00:34:50 +02:00
Author
Owner

Hello
it shouldn't and I cannot reproduce

Could you try to reproduce with a simple test setup :
*new users "user A" "user B"
*new private albums: "test A" accessible by "user A" only and "test B" accessible by "user B" only
*upload a picture to "test A" then associate that picture to "test B" also
who see what?

if you're able to reproduce it, please post more details about your extensions and server envrionnement
if you can't, please post more details about your permissions

Hello it shouldn't and I cannot reproduce Could you try to reproduce with a simple test setup : *new users "user A" "user B" *new private albums: "test A" accessible by "user A" only and "test B" accessible by "user B" only *upload a picture to "test A" then associate that picture to "test B" also who see what? if you're able to reproduce it, please post more details about your extensions and server envrionnement if you can't, please post more details about your permissions <!-- github-comment-id:792601701 -->
Author
Owner

you can see a example here, on our test deployment :

https://phototheque-test.univ-paris1.fr/index.php?/category/181

you arrive as guest on a public album (album/reportage/blabla), in the "related album" menu, you can see "Dircom/source" and "Dircom/making off" which are private albums you can't access but that shares common images with album/reportage/blabla

you can see a example here, on our test deployment : https://phototheque-test.univ-paris1.fr/index.php?/category/181 you arrive as guest on a public album (album/reportage/blabla), in the "related album" menu, you can see "Dircom/source" and "Dircom/making off" which are private albums you can't access but that shares common images with album/reportage/blabla <!-- github-comment-id:792610791 -->
Author
Owner

Bonjour
I don't see "Dircom/source" and "Dircom/making off" as related albums
could you point out a specific picture?

Bonjour I don't see "Dircom/source" and "Dircom/making off" as related albums could you point out a specific picture? <!-- github-comment-id:792612594 -->
Author
Owner
wait finally got one https://phototheque-test.univ-paris1.fr/picture.php?/10610/category/181 <!-- github-comment-id:792613107 -->
Author
Owner
but that's a tag https://phototheque-test.univ-paris1.fr/index.php?/tags/1057-dircom <!-- github-comment-id:792613437 -->
Author
Owner

No it's not.
A made the test again with new photos and new albums on my local piwigo 11.3.0 install, without any tag around and the result is the same :

  • create a new public album "testpublic"
  • create a new private album "testprivate"
  • upload new photos on "testprivate" and associate one of theses with "testpublic"
  • as guest, go to "testpublic" then have a look to the related album menu and "testprivate" will appear.
No it's not. A made the test again with new photos and new albums on my local piwigo 11.3.0 install, without any tag around and the result is the same : - create a new public album "testpublic" - create a new private album "testprivate" - upload new photos on "testprivate" and associate one of theses with "testpublic" - as guest, go to "testpublic" then have a look to the related album menu and "testprivate" will appear. - <!-- github-comment-id:792626261 -->
Author
Owner

Bonjour
I don't see "Dircom/source" and "Dircom/making off" as related albums
could you point out a specific picture?

again give me a direct link to a problematic picture please
thank you

> > > Bonjour > I don't see "Dircom/source" and "Dircom/making off" as related albums > could you point out a specific picture? again give me a direct link to a problematic picture please thank you <!-- github-comment-id:792627873 -->
Author
Owner

what is really strange is that I can see the problem on any picture in the album
https://phototheque-test.univ-paris1.fr/index.php?/category/181

and even at the album level.

Capture d’écran 2021-03-08 à 10 28 15

what is really strange is that I can see the problem on any picture in the album https://phototheque-test.univ-paris1.fr/index.php?/category/181 and even at the album level. ![Capture d’écran 2021-03-08 à 10 28 15](https://user-images.githubusercontent.com/31882428/110304476-f17dbb80-7ffb-11eb-8fa2-57d775c968cb.png) <!-- github-comment-id:792630077 -->
Author
Owner

OH! RIGHT

that's on the menu!! Okay!! My bad ! I was expecting to see that on the "metadata" field at the bottom
How is made that menu? what's that theme? that doesn't sound standard to me. Is that modus?

Because on my installations, I can't reproduce but I'm using standard themes or Stripped based themes

OH! RIGHT that's on the menu!! Okay!! My bad ! I was expecting to see that on the "metadata" field at the bottom How is made that menu? what's that theme? that doesn't sound standard to me. Is that modus? Because on my installations, I can't reproduce but I'm using standard themes or Stripped based themes <!-- github-comment-id:792631603 -->
Author
Owner

my theme is Bootstrap Darkroom but I think that this is a perfectly standard new feature of piwigo 11 :
https://piwigo.org/release-11.0.0

:)

my theme is Bootstrap Darkroom but I think that this is a perfectly standard new feature of piwigo 11 : https://piwigo.org/release-11.0.0 :) <!-- github-comment-id:792636160 -->
Author
Owner

image
sorry for being perfectly useless at this point
i'm gonna check the code of that new feature

![image](https://user-images.githubusercontent.com/736909/110305929-89c87000-7ffd-11eb-8361-2758a612aca9.png) sorry for being perfectly useless at this point i'm gonna check the code of that new feature <!-- github-comment-id:792637860 -->
Author
Owner

I confirm there is a bug. I have to work on it. It's problematic (to say the least)

I confirm there is a bug. I have to work on it. It's problematic (to say the least) <!-- github-comment-id:792638231 -->
Author
Owner

image
sorry for being perfectly useless at this point
i'm gonna check the code of that new feature

:D no problem, thanks for trying :D

> ![image](https://user-images.githubusercontent.com/736909/110305929-89c87000-7ffd-11eb-8361-2758a612aca9.png) > sorry for being perfectly useless at this point > i'm gonna check the code of that new feature :D no problem, thanks for trying :D <!-- github-comment-id:792639268 -->
Author
Owner
@plegall around https://github.com/Piwigo/Piwigo/blob/master/include/functions_category.inc.php#L720 I would exclude $user['forbidden_categories'] and $filter['visible_categories'] as in https://github.com/Piwigo/Piwigo/blob/master/include/functions_user.inc.php#L1375 <!-- github-comment-id:792659592 -->
Author
Owner

@plegall may I suggest to take into account the Filtering features, currently still used to display newest pictures only? (adding 'visible_categories' => 'category_id', ).
for me it sounds weird to display related albums for pictures which are not displayed

@plegall may I suggest to take into account the Filtering features, currently still used to display newest pictures only? (adding 'visible_categories' => 'category_id', ). for me it sounds weird to display related albums for pictures which are not displayed <!-- github-comment-id:793647422 -->
Author
Owner

@plegall may I suggest to take into account the Filtering features

So it means someone still uses this feature?!? I thought it was obsolete.

> @plegall may I suggest to take into account the Filtering features So it means someone still uses this feature?!? I thought it was obsolete. <!-- github-comment-id:801995275 -->
Author
Owner

I won't talk about uses ; I don't know them (but I surely can imagine the use for violent/sexy content), and for me, features can be implemented without an explicit need.

In that case, it's still is an option in admin.php?page=configuration&section=display, so as long as the link exists and the code behind exists, we have to support it.
And I still think that it's a good feature, unfortunately not user-friendly as it is implemented currently. For me, it belongs to an advanced display options, with a slider to change the recent period, and other filtering options such as using tags. We have ways to search among the content (which needs to be unified: combining albums and tags, just as we can combine tags currently from related tags) but no way to "remove"/filter the content.
(i've just tried to enable it on my family gallery but the icon doesn't show up...)

I won't talk about uses ; I don't know them (but I surely can imagine the use for violent/sexy content), and for me, features can be implemented without an explicit need. In that case, it's still is an option in admin.php?page=configuration&section=display, so as long as the link exists and the code behind exists, we have to support it. And I still think that it's a good feature, unfortunately not user-friendly as it is implemented currently. For me, it belongs to an advanced display options, with a slider to change the recent period, and other filtering options such as using tags. We have ways to search among the content (which needs to be unified: combining albums and tags, just as we can combine tags currently from related tags) but no way to "remove"/filter the content. (i've just tried to enable it on my family gallery but the icon doesn't show up...) <!-- github-comment-id:802057278 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1184