-
-
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
Irrelevant failed authentication request logged in php_error.log + becoming GDPR-relevant #5028
Comments
We added the As workaround you can use zend.exception_ignore_args ini setting to exclude arguments (for all, not just sensitive ones) from stack traces: ini_set('zend.exception_ignore_args', 1) |
Hi @afbora! Thank you for the information. I wasn't aware of this and I hope my previous comment doesn't sound too rude (it's more linked to missing language skills on my side...)! I will check that out. Thank you. |
None of us are lawyers, so we can only give you our personal opinion. If you need a definite answer, please seek legal advice. But my personal opinion is that error logs are covered as "legitimate interest", especially if the logs are used to ensure security of the site. There are tools like fail2ban and sshguard that read error logs to detect and block malicious actors. Kirby uses a similar method internally, so it's not needed to use these tools on top of Kirby. However they can still be useful if you want to null-route or block packets at a lower network level. This is primarily the reason why we don't filter error output by default. Every exception that occurs could be useful for one use case or another and we can't know that ahead of time. What we could do in the future is to allow the |
Thanks for your reply @lukasbestle. I see the reason when logs are helpful and I agree that logs in general are not irrelevant or become a GDPR-issue in general. Just in this case it lacks relevant information to be used:
Do I miss something here? |
The stacktrace itself when printed to the error log is indeed not useful for the use case I mentioned, but with the
The email address is always unique, there cannot be two users with the same email address in a Kirby installation.
No, exceptions are always logged. They are just not displayed to the user in their original form when the debug mode is not active. |
That's a tiny misunderstand here: I wanted to say that email addresses like firstname.lastname@whatever could be easily related/identify real persons even when the last part of the email address might become cut off. I didn't mean 2 accounts with same email address. |
Picking this thread up: @lukasbestle and @bastianallgeier, in general I think over time we might want to catch more exceptions in the right places. Failed login attempts, search requests with 0 results and similar shouldn't end up in the PHP log, I'd think. |
Hm, I'd say it depends. In those two examples, it could make sense to log such errors for automated processing. E.g. with the failed login for tools like fail2ban, with search errors for content analysis (optimizing the content for what users search) etc. We cannot know that deep in the system. |
I can see that argument too. We need a decision here: either work on something or close the issue. |
An idea for a possible solution:
|
@lukasbestle sounds good to me |
Description
php_error.log is spammed with irrelevant messages, e. g. wrong password authentications. Furthermore it even contains sensitive information, e. g. the email address used for authentication thus this becomes GDPR-relevant.
Expected behavior
In general I think that Kirby 3 throws too many exceptions at some points and with wrong status code. The input should be validated first and then an exception thrown in case required fields are missing or there are obvious logic fails in the input. For this case it doesn't work and in most cases I ignored this but now I just noticed that even a regular invalid authentication due to wrong password typed in is being logged to the PHP logs. This is filling them quite fast with non-helpful messages and thus makes debugging harder. I think there is no benefit in this specific log to know that a single log-in failed.
To reproduce
Have a local WAMP setup and try to log-in to the panel with invalid credentials. Debug config option is enabled.
Your setup
v3.9.1-rc1
Your system (please complete the following information)
Firefox, WAMP setup
Additional context
This is the log entry in
php_error.log
:The text was updated successfully, but these errors were encountered: