-
Notifications
You must be signed in to change notification settings - Fork 173
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
Lot of 404 errors / CrowdSec ban me #3021
Comments
Hello, I can't open "Contacts" without being banned by CrowdSec because of 404 and 403 errors. Server : Desktop :
|
Also related to #3078 |
I can confirm this. It seems this is the way how the contact app works: it will try to load the image for each contact and for those contacts where there is no image stored there will be an 404 error instead of a generated (and probably cached) placeholder. |
Attention, I just realized a few things, I had the impression that some contacts had disappeared from my Nextcloud, and indeed ... When I'm on the page of a contact and this problem occurs, then I unban from Crowdsec, when I come back on Nextcloud, the contact that I consulted during the banishment by Crowdsec is no longer present in my contact list! |
Same issue, lots of unnecessary 404's triggering security app monitoring logs. Expected behavior: if contact doesn't have picture don't make http request for it. Second best: if contact doesn't have picture use default picture. E.g. transparent, so initials are seen? 4xx responses should not be used as normal way of working like everything is OK. |
As mentioned in #3078 @summersab created a "patch app" which can be installed to fix this problem until it is solved in the contacts app itself: https://github.com/nunimbus/contacts_avatar_patch Download the files and put them to |
Hmm... I didn't realize that the app was supposed to grab custom avatars for those contacts who are stored in the address book. That makes sense, though. I'll give that a look this week to hopefully update my patch and find the root cause in the NC code. |
Edit linked PR below, the whitelist is now in the hub |
Same issue with fail2ban! |
This is now resolved for Crowdsec |
This happens with Contacts 5.1.0 when I scroll down the contact list: The reason for these many 404 errors are still the contact images. For every contact there is a request like this:
However the respective contacts don't have any image. It seems the contact app just tries to load images regardless if there is an image or not. The best solution would be not to try load an image if there is none - and since the contact app should know exactly if there is an image or not, this should be possible. |
Thanks @LaurenceJJones for the Whitelist for Crowdsec. |
Hello, are there any news on this? I'm on a fresh installation of Nextcloud 28 and I get banned by fail2ban every time I open the contacts page. For now I had to disable fail2ban to be able to use nextcloud - but that's not a good solution... |
No, still as usual with Nextcloud 28.0.3: Unfortunately I don't have the time to get involved with the code. But technically it should not be too hard to solve:
|
That's a problem. I had fail2ban set up to look for 4xx errors in the npm logs. In order to be able to use nextcloud I had to disable that line of defense. |
Still have this problem in Nextcloud 29.0.10, It's a 2 years bug... And the 404 grows with contacts creations, so even fixing the limit higher is not a solution, we need to disable this scenario which is counter productive :'( |
Fixed. nextcloud/server#49839 |
Additional Fix #4249 |
Thank you @SebastianKrupinski ! |
You're welcome! I do what i can 😄 |
Thank you, @SebastianKrupinski! |
Thx @SebastianKrupinski ! |
Describe the bug
I also have a lot of 404 errors. I think it's related to the lost avatar of my contact
CrowdSec banned me because of this
Steps to reproduce
Expected behavior
Do not have a 404 error when viewing my contacts
Actual behavior
404 error
Contact version
4.2.2
Operating system
OMV - Debian 11
PHP engine version
PHP 8.0
Web server
Nginx
Database
MariaDB
Additional info
Server :
Docker Linuxserver php8
Nextcloud : 24.0.6
Contacts : 4.2.2
Desktop :
OS: Windows 10
Browser : Firefox 105
My reverse Proxy :
Console , Firefox 105 :
The text was updated successfully, but these errors were encountered: