-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
Hidden album is shown in album listing, if password matches with parent album #1155
Comments
Yeah... It's a security issue, but a fairly narrow one as it only affects hidden albums that have a password and that are already unlocked... I'm not sure if it's worth fixing on master or should we just make sure that it's not an issue on #1055? |
To clarify, this actually affects all hidden, password-protected albums. The album does not need to be inside another password-protected album; it can be in a regular public album or even at the top level. The issue is that once a password-protected album is unlocked, it's included in the response to |
I guess "hidden" means "requires direct link"? I am not 100% sure, but I am fairly convinced that this doesn't happen with PR #1055. I will test it this evening when I am home. |
Yep, direct link. I'm guessing it's because the Lychee/app/Actions/Albums/Extensions/PublicIds.php Lines 51 to 53 in 5cf7a06
It should probably be here instead:
But since we are not planning any more releases out of this codebase, I'm not inclined to investigate any further... |
Good news. The PR #1055 is not affected by this bug. I tried the following setup:
Results:
Yeah! My refactoring pays off! 😎 |
Erm, if I understood your steps correctly, this all works the same way on master as well. The part that fails on master is when you list the album tree (by clicking on the down arrow next to the album name in the header -- see the screenshot in the top post). That's where the unlocked but hidden albums are incorrectly listed on master (and locked but visible are not -- which is also wrong). I still think there's a good chance you may have fixed it (that code is so twisted on master that I know I would've wanted to rewrite it 😉) but I want to make sure that we test the right thing... |
Sorry, you are right. I also tested that, but did not mention it explicitly: The album tree (by clicking on the down arrow next to the album name in the header) is also correctly shown from every album. Yes, you are right. As my code base actually uses the same SQL "filters" everywhere, it has been fixed, too. |
By the way: Although I added 4,600 LOC (well mostly comments) the test coverage of the whole project increases from ~61% to ~63.5%. 😄 |
Detailed description of the problem [REQUIRED]
When you open the album listing after opening a password protected album, a hidden subalbum of it is listed in it if it's protected with same password. This happens with Lychee 4.3.0.
Steps to reproduce the issue
Steps to reproduce the behavior:
Screenshots
![image](https://user-images.githubusercontent.com/7679721/144056624-53afa9bc-aff2-4b58-bb31-2063eff41d19.png)
Output of the diagnostics [REQUIRED]
Is this applicable for this issue?
Browser and system
Happens both with Chrome and Firefox in Windows 10.
The text was updated successfully, but these errors were encountered: