-
Notifications
You must be signed in to change notification settings - Fork 166
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
Prevent {{ config() }} from exposing DB_PASSWORD #378
Comments
Yeah you can just not echo that? |
Hi, I'm coming along the lines that a template system is supposed to limit itself to only "safe" code so that it is end user editable (think shopify's liquid). While I could disable config() entirely, APIs such as recaptcha still needs to expose their public key in templates. I was wondering if you would consider adding something similiar to Laravel's debug_blacklist for config? Thank you. |
In that case you can use the sandbox, but by default Twig has access to al lot of functions and the global app variable. |
@barryvdh Can't we just disable / blacklist config() and then if I need some config info I'll create a custom function for that specific data and make it available for twig ? I think config(), app() and other sensitive data must not be available for the front end developer .. any idea ? Thanks. |
Cool, I was able to disable config() from twigbridge.php conifg file, totally missed that! |
Hi,
Is there a way to make
{{ config("database.connections.mysql.password") }}
not expose.env
'sDB_PASSWORD
and other sensitive infomation? Thank you.The text was updated successfully, but these errors were encountered: