thephpleague / plates

Native PHP template system
https://platesphp.com
MIT License
1.47k stars 180 forks source link

why Data sharing across templates , is security vulnerability. ?!! #224

Closed kadevland closed 6 years ago

kadevland commented 6 years ago

I think that sharing the data between template is a security vulnerability. i think add like new feature or not default feature. exemple : $v->insert('...')->withContextData() / withData() / withParentData ...

ragboyjr commented 6 years ago

@kadevland in v4-alpha, you can turn off data sharing by setting the config value merge_parent_data to false.

kadevland commented 6 years ago

ok. may be add the posibilite for insert take parent data when config merge_parent_data is false

ragboyjr commented 6 years ago

You could do that by simply passing in the data like:

$v->insert('template', $v->data());