diff options
author | Cesar G <prototech91@gmail.com> | 2013-12-12 14:40:03 -0800 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2013-12-12 14:40:03 -0800 |
commit | c42bd28d172a9ae7439cc3868ebfda87e93f3490 (patch) | |
tree | 40fee8bfa4ed9c2ee2ba2ab9b69d22f22f921cea /phpBB/includes/acp/acp_extensions.php | |
parent | 2735982c551d6537bd49fda265c82fdd3471fa36 (diff) | |
download | forums-c42bd28d172a9ae7439cc3868ebfda87e93f3490.tar forums-c42bd28d172a9ae7439cc3868ebfda87e93f3490.tar.gz forums-c42bd28d172a9ae7439cc3868ebfda87e93f3490.tar.bz2 forums-c42bd28d172a9ae7439cc3868ebfda87e93f3490.tar.xz forums-c42bd28d172a9ae7439cc3868ebfda87e93f3490.zip |
[ticket/12009] Prevent user from enabling invalid extension through direct URL
PHPBB3-12009
Diffstat (limited to 'phpBB/includes/acp/acp_extensions.php')
-rw-r--r-- | phpBB/includes/acp/acp_extensions.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index c21c9f4e9d..2ff479d824 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -88,6 +88,11 @@ class acp_extensions break; case 'enable_pre': + if (!$md_manager->validate_dir()) + { + trigger_error($user->lang['EXTENSION_DIR_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); + } + if (!$md_manager->validate_enable()) { trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING); @@ -108,6 +113,11 @@ class acp_extensions break; case 'enable': + if (!$md_manager->validate_dir()) + { + trigger_error($user->lang['EXTENSION_DIR_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); + } + if (!$md_manager->validate_enable()) { trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING); |