Replies: 1 comment 2 replies
-
i feel like there are 3 separate ideas here without any real link between them
while i get why that may be wanted, it is virtually impossible to implement in practice without a complete redesign of how templates work which would break all existing ones and have significantly less capability overall than blade currently has just disabling the you can put arbritrary php in almost any blade tag, not just the @php ones. getting RCE via developers making mistakes with templating engines is its own class of vulnerability (SSTI), and this is just developers making mistakes, accepting code from a malicious 3rd party you have basically no chance to actually have a template engine which is safe from that perspective, it needs to handle the data fetching itself rather than just being a wrapper around whatever underlying language is being used eg i write something like imo there is a place for a templating engine like that, for CMS' / user provided templates. but i dont think trying to turn blade into that is something that would go well or should even be attempted tbh (imo such a template engine needs to be built from the ground up to work like that, not starting with 1 that allows full language support and trying to convert it)
tbh this has similar issues, maybe that would prevent mistakes by inexperienced developers, but it would have no effect on the safety of accepting code from a malicious developer,
i do like the idea of those, but one of the big features in php 8.5 is the pipe operator which is basically that, so other than making sure the framework is compatible with php 8.5 in general, i dont think that is a specific feature that needs adding to blade, i think we will just be able to use the pipe operator |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
we need an optional PHP-less mode for Blade templates (sandbox-like, similar to Twig) and provide a small set of core filters for common transformations.
Beta Was this translation helpful? Give feedback.
All reactions