Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Fixed wrong module permission check for some admin controllers, vulnerability reported by @Mitchell45

givanz8d59962b5d97
diff --git a/system/traits/permission.php b/system/traits/permission.php
index 9f38e37..2284148 100644
--- a/system/traits/permission.php
+++ b/system/traits/permission.php
@@ -31,8 +31,8 @@ trait Permission {
* Permission check for each module/action
*/
protected function permission($permission = null) {
- $module = $this->module ?? strtolower(FrontController::getModuleName());
- $action = $this->action ?? strtolower(FrontController::getActionName());
+ $module = strtolower(FrontController::getModuleName());
+ $action = strtolower(FrontController::getActionName());
$action = ($action && $action != 'index') ? '/' . $action : '';
$permission = $permission ?? ($module . $action);
@@ -50,7 +50,7 @@ trait Permission {
$this->notFound($data, 403);
- die(0);
+ die();
}
}