Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

About $modx safeEval()

yamamoto edited this page Dec 2, 2016 · 1 revision

https://github.com/modxcms/evolution/blob/v1.2/manager/includes/document.parser.class.inc.php#L4769-L4799

This function may seem complicated, but actually doing is simple. Do not allow execution of dangerous PHP functions. It is a whitelist method. By default, only 3, "date()", "strtotime()" and "strftime()" are allowed. The existence of this function itself is intended to remind the new developers of the danger of eval. Even if it is not vulnerable to itself, it can be abused by other vulnerable snippets.

Please be careful.

Clone this wiki locally