Skip to content

Commit bcf6a92

Browse files
committed
Fix upgrade: Set sizeof and count as allowed functions
1 parent b124754 commit bcf6a92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/serendipity_smarty_class.inc.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
class Serendipity_Smarty_Security_Policy extends Smarty_Security
1313
{
1414
// these are the allowed functions only. - default as is
15-
public $php_functions = array('isset', 'empty', 'in_array', 'is_array', 'time', 'nl2br', 'class_exists');
15+
public $php_functions = array('isset', 'empty', 'sizeof', 'count', 'in_array', 'is_array', 'time', 'nl2br', 'class_exists');
1616
// to disable all PHP functions
1717
#public $php_functions = null;
1818

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

2222
public $allow_constants = true;
2323

0 commit comments

Comments
 (0)