Repository navigation
v1.2.7 — the default settings permit no file_get_contents and no ereg_replace
Fixed
- The default settings permit no
file_get_contentsand noereg_replaceas template operators (#8).file_get_contentslet every template read any file the web server can read;ereg_replaceno longer exists since PHP 7. DebugOutputis disabled by default; it wrote the arguments and result of every operator call to the debug output.- The settings file closes its PHP comment with
*/ ?>.
Added
- A test that the default settings permit only harmless functions that exist, with debug output off (
tests/owSimpleOperatorDefaultSettingsTest.php, no kernel or database needed).
Upgrading
A site whose templates use file_get_contents or ereg_replace as an operator has to list it again in its own owsimpleoperator.ini.append.php ([PHPFunctions] PermittedFunctionList[]). Prefer a dedicated operator over file_get_contents, and preg_replace over ereg_replace.