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

[BUG] Accessing Shared Albums triggers 401 Unauthorized Requests #3358

Closed
2 of 3 tasks
mjasny opened this issue Jul 21, 2023 · 1 comment · Fixed by #3791
Closed
2 of 3 tasks

[BUG] Accessing Shared Albums triggers 401 Unauthorized Requests #3358

mjasny opened this issue Jul 21, 2023 · 1 comment · Fixed by #3791
Labels
bug Something isn't working 🗄️server 🖥️web

Comments

@mjasny
Copy link

mjasny commented Jul 21, 2023

The bug

Hi,

I run a public instance of immich behind a swag nginx reverse proxy that also contains fail2ban. I noticed that the nginx-unauthorized rule of fail2ban is hit frequently when a user that is not logged in accesses a shared album. The fail2ban daemon is scanning the nginx logs and bans the IP for 10 minutes after 5 401 Unauthorized requests.

These 401 requests are also triggered when I access the immich instance directly without swag.
For me this is problematic because each of my users IP is directly banned after viewing 2-4 images and I don't think the webapp should request the following URLs when nobody is logged in.

http://immich-host/api/user/me -> 401 Unauthorized
http://immich-host/api/album?assetId=3effbaa-4fb5-40aa-84f8-ef3b546546428 -> 401 Unauthorized
http://immich-host/api/asset/assetById/626fff34-5a41-4cb4-8875-1ec68745948a5 -> 401 Unauthorized

Thank you :)

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.68.0

Version of Immich Mobile App

v1.68.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

unaltered from default setup

Your .env content

unaltered from default setup

Reproduction steps

1. Create a shared album
2. Open its link in an incognito browser window
3. Go to developer tools and inspect network requests, for Firefox you can use this filter: `status-code:401`
4. see 401 Unauthorized requests popping up, that ultimately lead fail2ban to ban the requesting IP

Additional information

No response

@mjasny mjasny added bug Something isn't working needs triage Bug that needs triage from maintainer labels Jul 21, 2023
@LasseThostrup
Copy link

I experience the same behavior for shared albums and fail2ban.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🗄️server 🖥️web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants