Linux dpw.dpwebtech.com 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
Apache
: 192.232.243.69 | : 18.222.102.71
54 Domain
7.3.33
dpclient
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
dpclient /
public_html /
analytics /
core /
Access /
[ HOME SHELL ]
Name
Size
Permission
Action
Role
[ DIR ]
drwxr-xr-x
CapabilitiesProvider.php
3.85
KB
-rw-r--r--
Capability.php
690
B
-rw-r--r--
Role.php
431
B
-rw-r--r--
RolesProvider.php
1.43
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : CapabilitiesProvider.php
<?php /** * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ namespace Piwik\Access; use Exception; use Piwik\CacheId; use Piwik\Piwik; use Piwik\Cache as PiwikCache; class CapabilitiesProvider { /** * @return Capability[] * @throws Exception */ public function getAllCapabilities(): array { $cacheId = CacheId::siteAware(CacheId::languageAware('Capabilities')); $cache = PiwikCache::getTransientCache(); if (!$cache->contains($cacheId)) { $capabilities = []; /** * Triggered to add new capabilities. * * **Example** * * public function addCapabilities(&$capabilities) * { * $capabilities[] = new MyNewCapability(); * } * * @param Capability[] $reports An array of reports * @internal */ Piwik::postEvent('Access.Capability.addCapabilities', array(&$capabilities)); /** * Triggered to filter / restrict capabilities. * * **Example** * * public function filterCapabilities(&$capabilities) * { * foreach ($capabilities as $index => $capability) { * if ($capability->getId() === 'tagmanager_write') {} * unset($capabilities[$index]); // remove the given capability * } * } * } * * @param Capability[] $reports An array of reports * @internal */ Piwik::postEvent('Access.Capability.filterCapabilities', array(&$capabilities)); $capabilities = \array_values($capabilities); $this->checkCapabilityIds($capabilities); $cache->save($cacheId, $capabilities); return $capabilities; } return $cache->fetch($cacheId); } /** * @param $capabilityId * @return Capability|null * @throws Exception */ public function getCapability(string $capabilityId): ?Capability { foreach ($this->getAllCapabilities() as $capability) { if ($capabilityId === $capability->getId()) { return $capability; } } return null; } /** * @return string[] * @throws Exception */ public function getAllCapabilityIds(): array { $ids = array(); foreach ($this->getAllCapabilities() as $capability) { $ids[] = $capability->getId(); } return $ids; } /** * @param $capabilityId * @return bool * @throws Exception */ public function isValidCapability($capabilityId): bool { $capabilities = $this->getAllCapabilityIds(); return \in_array($capabilityId, $capabilities, true); } /** * @param $capabilityId * @throws Exception */ public function checkValidCapability($capabilityId): void { if (!$this->isValidCapability($capabilityId)) { $capabilities = $this->getAllCapabilityIds(); throw new \Exception(Piwik::translate("UsersManager_ExceptionAccessValues", implode(", ", $capabilities))); } } /** * @param Capability[] $capabilities * @throws Exception */ private function checkCapabilityIds(array $capabilities): void { foreach ($capabilities as $capability) { $id = $capability->getId(); if (preg_match('/[^a-zA-Z0-9_-]/', $id)) { throw new \Exception("Capability with invalid ID found: '$id'. Valid characters are 'a-zA-Z0-9_-'."); } } } }
Close