Skip to content

Commit

Permalink
Fix upgrade: Set sizeof and count as allowed functions
Browse files Browse the repository at this point in the history
  • Loading branch information
onli committed Sep 28, 2023
1 parent b124754 commit bcf6a92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/serendipity_smarty_class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
class Serendipity_Smarty_Security_Policy extends Smarty_Security
{
// these are the allowed functions only. - default as is
public $php_functions = array('isset', 'empty', 'in_array', 'is_array', 'time', 'nl2br', 'class_exists');
public $php_functions = array('isset', 'empty', 'sizeof', 'count', 'in_array', 'is_array', 'time', 'nl2br', 'class_exists');
// to disable all PHP functions
#public $php_functions = null;

// set allowed modifiers only. (default = array( 'escape', 'count' );)
public $php_modifiers = array('escape', 'sizeof', 'count', 'rand', 'str_repeat', 'nl2br');
public $php_modifiers = array('escape', 'rand', 'str_repeat', 'nl2br');

public $allow_constants = true;

Expand Down

0 comments on commit bcf6a92

Please sign in to comment.