-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Sensitive data exposed in logs and debugging toolbar #3619
Comments
Can you provide specific examples of where you’re seeing sensitive data in the logs / Debug toolbar? |
I just noticed this too but I'm not on 3.1 yet. In phperrors.log my 'SECURITY_KEY', 'S3_API_KEY, 'S3_SECRET' and 'DB_PASSWORD' are exposed in plain text. In web.log these same values are replaced with ••••'s. |
@jwb009 exactly. I was testing on 3.0 as well, not sure this behavior changed in 3.1. |
Thanks. I was able to override the Request panel to redact any sensitive info within it. We don’t have any control over what gets logged to // Don't send PHP error logs to storage/logs/phperrors.log
define('CRAFT_LOG_PHP_ERRORS', false); |
Hey @brandonkelly checking some client logs, I noticed that for the following log:
Under I was trying to find docs related to naming env files as secrets but I haven't had luck. Is this an expected behavior? What is the recommended naming to store secrets on the env file and prevent plain text on the logs? |
Craft will automatically redact environment variables that look sensitive based on the variable name, via this list of sensitive-sounding keywords: Lines 118 to 126 in 43ee7a7
I just added Worth noting that it’s not a perfect solution: there are still ways that sensitive environment variables could be logged out that Craft doesn’t have any control over, as well as |
Craft 3.9.2 and 4.5.4 are out with |
One of the main intentions of 3.1 is to move sensitive data from database into environmental variables referenced from project config.
The side effect here is that the values of environmental variables (including keys and passwords) are exposed at least in
They are masked in PHP info though.
Is it an expected beahviour and are there any plans to mask sensitive data all across the Craft?
The text was updated successfully, but these errors were encountered: