mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- fixed security hole in {math} plugin
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2010-04-17 Uwe Tews
|
||||
|
||||
* Fixed security hole in {math} plugin
|
||||
|
||||
2007-09-27 TAKAGI Masahiro <matakagi@gmail.com>
|
||||
|
||||
* docs/ja/designers/language-custom-functions/language-function-html-checkboxes.xml:
|
||||
|
@@ -37,7 +37,7 @@ function smarty_function_math($params, &$smarty)
|
||||
}
|
||||
|
||||
// match all vars in equation, make sure all are passed
|
||||
preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]+)!",$equation, $match);
|
||||
preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]*)!",$equation, $match);
|
||||
$allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10',
|
||||
'max','min','pi','pow','rand','round','sin','sqrt','srand','tan');
|
||||
|
||||
@@ -82,4 +82,4 @@ function smarty_function_math($params, &$smarty)
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
||||
?>
|
||||
?>
|
Reference in New Issue
Block a user