mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-28 18:02:07 +02:00
convert writeFile() to object method to remove a vulnerability
This commit is contained in:
@@ -106,7 +106,8 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
|
||||
*/
|
||||
public function writeCachedContent(Smarty_Internal_Template $_template, $content)
|
||||
{
|
||||
if (Smarty_Internal_Write_File::writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {
|
||||
$obj = new Smarty_Internal_Write_File();
|
||||
if ($obj->writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {
|
||||
$_template->cached->timestamp = @filemtime($_template->cached->filepath);
|
||||
$_template->cached->exists = !!$_template->cached->timestamp;
|
||||
if ($_template->cached->exists) {
|
||||
|
||||
Reference in New Issue
Block a user