-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Add QueryException message handling without replacing bindings. #54203
base: 12.x
Are you sure you want to change the base?
Add QueryException message handling without replacing bindings. #54203
Conversation
5000f6c
to
8db7967
Compare
In Eloquent we have toSql or toRawSql! Maybe it would be interesting to change from mask to raw? |
Just from reading this, to me, it's not entirely clear, that |
Yeah - naming is not super clear. |
Thank you for review! How about the following name?
|
There's also I'd say, using "bindings" and "exception" here feels like the most intuitive, but they are all way better than just "mask" 👍🏻 |
8db7967
to
d0164e4
Compare
Thank you for advice! |
As mentioned in the discussion #41920, QueryException message that bind real SQL values is useful for development. But there is security risk, e.g. unintended personal information(email, user name, tel, ...) logging.
This pull request adds support for QueryException message handling with/without replacing bindings.
If we put
mask: true
parameters to database config,?
masking is not replacing with real SQL value.I think this pull request help Laravel application more secure.
Example
config/database.php
mask: true
mask: false