Manuk Minasyan
Handling Eloquent Query Builder Serialization Securely Between Components
@awcodes Thank you very much for the suggestions!
The Locked attribute is definitely helpful for regular properties, but unfortunately doesn't solve the entire issue with query builders since the concern is both exposure of sensitive query details (even if they can't be modified) and serialization of complex queries.
I appreciate you thinking through this with me! Your suggestions about policies and different approaches have given me some good perspectives on tackling this problem.
16 replies
Handling Eloquent Query Builder Serialization Securely Between Components
Beyond security, serializing complex queries is often problematic:
Size concerns: Large queries with many joins/constraints create bloated payloads
Compatibility issues: Custom query macros, custom query packages, closures, or scopes often can't be properly serialized
16 replies
Handling Eloquent Query Builder Serialization Securely Between Components
The issue with synthesizers is they would serialize query information to the client, including:
1. Query constraints like
user_id = 1
visible in browser dev tools
2. Database structure and business logic exposure
I'm uncomfortable exposing this data client-side.
While policies would still protect data access, I prefer not revealing our filtering logic at all.16 replies
How to pass a section_id parameter to a action when creating a record?
How to do this? I couldn't find anything in the documentation. When I use action without form, this is simple to pass arguement and get it, but with forms this is difficult. in ->action method how to get form data and arguments that I passed from the view?
12 replies