Skip to content

v1.2.7 — the default settings permit no file_get_contents and no ereg_replace

Choose a tag to compare

@se7enxweb se7enxweb released this 17 Oct 10:58
· 9 commits to master since this release

Fixed

  • The default settings permit no file_get_contents and no ereg_replace as template operators (#8). file_get_contents let every template read any file the web server can read; ereg_replace no longer exists since PHP 7.
  • DebugOutput is 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.