diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-10-10 03:30:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-10 03:30:19 +0300 |
commit | 7744786b7ddfceac2002be4c9865f878a11fc39f (patch) | |
tree | 2645b59c62e183d0bff8c01680a5eb27cd7b3e5f /plugins/CorePluginsAdmin | |
parent | 8db61ddd5a746a30a5bf43e19248ef92dbd987fe (diff) |
Fix license information may not be shown correctly (#13569)
* Fix license information may not be shown correctly
* Update Controller.php
Diffstat (limited to 'plugins/CorePluginsAdmin')
-rw-r--r-- | plugins/CorePluginsAdmin/Controller.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/CorePluginsAdmin/Controller.php b/plugins/CorePluginsAdmin/Controller.php index df1be62318..e9b8c59669 100644 --- a/plugins/CorePluginsAdmin/Controller.php +++ b/plugins/CorePluginsAdmin/Controller.php @@ -449,8 +449,14 @@ class Controller extends Plugin\ControllerAdmin public function showLicense() { + Piwik::checkUserHasSomeViewAccess(); + $pluginName = Common::getRequestVar('pluginName', null, 'string'); + if (!Plugin\Manager::getInstance()->isPluginInFilesystem($pluginName)) { + throw new Exception('Invalid plugin'); + } + $metadata = new Plugin\MetadataLoader($pluginName); $license_file = $metadata->getPathToLicenseFile(); |