No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
7087037
... +6 ...
53c625c
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
22 | 22 | use Shieldon\Log\ActionLogParsedCache; |
|
23 | 23 | use Shieldon\Shieldon; |
|
24 | 24 | use Shieldon\FirewallTrait; |
|
25 | - | use Messenger as MessengerModule; |
|
25 | + | use Shieldon\Messenger as MessengerModule; |
|
26 | 26 | ||
27 | 27 | use function Shieldon\Helper\__; |
|
28 | 28 |
102 | 102 | protected $messages = []; |
|
103 | 103 | ||
104 | 104 | /** |
|
105 | - | * self: Shieldon | managed: Firewall |
|
105 | + | * self: Shieldon | managed: Firewall | demo: Demo |
|
106 | 106 | * |
|
107 | 107 | * @var string |
|
108 | 108 | */ |
132 | 132 | */ |
|
133 | 133 | protected $demoUser = [ |
|
134 | 134 | 'user' => 'demo', |
|
135 | - | 'pass' => '$2y$10$MTi1ROPnHEukp5RwGNdxuOSAyhGdpc4sfQpwNCv9yHoVvgl9tz8Xy', |
|
135 | + | 'pass' => 'demo', |
|
136 | 136 | ]; |
|
137 | 137 | ||
138 | 138 | /** |
447 | 447 | password_verify($_POST['s_pass'], $admin['pass']) |
|
448 | 448 | ) { |
|
449 | 449 | $login = true; |
|
450 | + | ||
451 | + | } elseif ( |
|
452 | + | $this->mode === 'demo' && |
|
453 | + | $this->demoUser['user'] === $_POST['s_user'] && |
|
454 | + | $this->demoUser['pass'] === $_POST['s_pass'] |
|
455 | + | ) { |
|
456 | + | $login = true; |
|
450 | 457 | ||
451 | 458 | } else { |
|
452 | 459 | $data['error'] = __('panel', 'login_message_invalid_user_or_pass', 'Invalid username or password.'); |
1794 | 1801 | */ |
|
1795 | 1802 | protected function exportSettings() |
|
1796 | 1803 | { |
|
1804 | + | if ($this->mode !== 'managed') { |
|
1805 | + | die('Not allowed to view this page.'); |
|
1806 | + | } |
|
1807 | + | ||
1797 | 1808 | header('Content-type: text/plain'); |
|
1798 | 1809 | header('Content-Disposition: attachment; filename=shieldon-' . date('YmdHis') . '.json'); |
|
1799 | 1810 | header('Expires: 0'); |
1809 | 1820 | */ |
|
1810 | 1821 | protected function importSettings() |
|
1811 | 1822 | { |
|
1823 | + | if ($this->mode !== 'managed') { |
|
1824 | + | die('Not allowed to view this page.'); |
|
1825 | + | } |
|
1826 | + | ||
1812 | 1827 | if (! empty($_FILES['json_file']['tmp_name'])) { |
|
1813 | 1828 | $importedFileContent = file_get_contents($_FILES['json_file']['tmp_name']); |
|
1814 | 1829 | } |
2145 | 2160 | */ |
|
2146 | 2161 | private function httpAuth(): void |
|
2147 | 2162 | { |
|
2148 | - | if ('demo' === $this->mode || 'self' === $this->mode) { |
|
2149 | - | $admin = $this->demoUser; |
|
2150 | - | } |
|
2151 | - | ||
2152 | 2163 | if (! isset($_SESSION['SHIELDON_USER_LOGIN'])) { |
|
2153 | 2164 | $this->login(); |
|
2154 | 2165 | } |
36 | 36 | use Shieldon\Container; |
|
37 | 37 | use Shieldon\Driver\DriverProvider; |
|
38 | 38 | use Shieldon\Log\ActionLogger; |
|
39 | - | use Messenger\Messenger\MessengerInterface; |
|
39 | + | use Shieldon\Messenger\Messenger\MessengerInterface; |
|
40 | 40 | use function Shieldon\Helper\get_cpu_usage; |
|
41 | 41 | use function Shieldon\Helper\get_memory_usage; |
|
42 | 42 | use function Shieldon\Helper\__; |
Learn more Showing 118 files with coverage changes found.
src/Shieldon/Captcha/Recaptcha.php
src/Shieldon/Security/Xss.php
src/Shieldon/Captcha/Foundation.php
src/Shieldon/Captcha/Csrf.php
src/Shieldon/Component/TrustedBot.php
src/Shieldon/IpTrait.php
src/Shieldon/Component/Ip.php
src/Shieldon/Log/ActionLogParser.php
src/Shieldon/Security/Csrf.php
src/Shieldon/Container.php
src/Shieldon/Mock/Messenger.php
src/Shieldon/FirewallPanel.php
src/Shieldon/Driver/FileDriver.php
src/Shieldon/Shieldon.php
src/Shieldon/Log/ActionLogger.php
src/Shieldon/Driver/SqlDriverProvider.php
src/Shieldon/Component/ComponentProvider.php
src/Shieldon/Component/UserAgent.php
src/Shieldon/Component/Header.php
src/Shieldon/Driver/RedisDriver.php
src/Shieldon/Driver/MysqlDriver.php
src/Shieldon/Security/httpAuthentication.php
src/Shieldon/FirewallTrait.php
src/Shieldon/Log/ActionLogParsedCache.php
src/Shieldon/Driver/AbstractDriver.php
src/Shieldon/Driver/DriverProvider.php
src/Shieldon/Captcha/ImageCaptcha.php
src/Shieldon/Component/Rdns.php
src/Shieldon/Driver/SqliteDriver.php
src/Shieldon/Firewall.php
Files | Complexity | Coverage |
---|---|---|
Project Totals (30 files) | 855 | 99.30% |
53c625c
bc5d7ea
bc14159
590318c
00e5aa8
fb62f0c
b949606
7087037