Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Allow 'action' parameter override from POST parameter for easier form submissions
givanz456973bbf5fa
diff --git a/system/core/frontcontroller.php b/system/core/frontcontroller.phpindex 3f5eaf6..3cf4103 100755--- a/system/core/frontcontroller.php+++ b/system/core/frontcontroller.php@@ -303,13 +303,8 @@ class FrontController {}static public function dispatch() {- $module = $_GET['module'] ?? $_POST['module'] ?? null;- $action = $_GET['action'] ?? $_POST['action'] ?? null;-- if (empty($action)) {- $action = 'index';- }-+ $module = $_GET['module'] ?? $_POST['module'] ?? null;+ $action = $_GET['action'] ?? $_POST['action'] ?? null;$_REQUEST = array_merge($_GET, $_REQUEST);//subdirectory support@@ -337,12 +332,15 @@ class FrontController {if (isset($_GET['route'])) {if (preg_match('@(^.+?)/(\w+$)@', $_GET['route'], $routeMatch)) {$module = $routeMatch[1];- $action = $routeMatch[2];+ $action = $action ?? $routeMatch[2];} else {$module = trim($_GET['route'], '/');}}+ if (empty($action)) {+ $action = 'index';+ }//santize inputsif (($module && ! preg_match('@^[a-zA-Z_/0-9\-]{4,70}$@', $module)) ||($action && ! preg_match('@^[a-zA-Z_/0-9\-]{3,70}$@', $action))) {