PluginProbe
WPIDE – File Manager & Code Editor / 3.5.9
WPIDE – File Manager & Code Editor v3.5.9
3.5.9 3.5.8 3.5.7 2.0.14 2.0.15 2.0.16 2.0.2 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.2 2.3 2.3.1 2.3.2 2.4.0 2.5 2.6 3.0 3.1 3.2 3.3 All 55 releases
← All changes | App/Services/Security/Security.php +12 -1 3.23.5.9 View file →
@@ -5,8 +5,9 @@
5 5 use WPIDE\App\Kernel\Request;
6 6 use WPIDE\App\Kernel\Response;
7 7 use WPIDE\App\Services\Service;
8 8 use WPIDE\App\Services\Logger\LoggerInterface;
9 +use const WPIDE\Constants\SLUG;
9 10
10 11 /**
11 12 * @codeCoverageIgnore
12 13 */
@@ -26,9 +27,9 @@
26 27 }
27 28
28 29 public function init(array $config = [])
29 30 {
30 - if(!wp_doing_ajax() || wp_doing_cron() || defined('WPIDE_DOING_TASK')) {
31 + if(wp_doing_cron() || defined('WPIDE_DOING_TASK') || ! $this->isProtectedRequest()) {
31 32 return;
32 33 }
33 34
34 35 $nonce = wp_create_nonce();
@@ -84,6 +85,16 @@
84 85 die;
85 86 }
86 87 }
87 88
89 + }
90 +
91 + protected function isProtectedRequest(): bool
92 + {
93 + if(wp_doing_ajax()) {
94 + return true;
95 + }
96 +
97 + return $this->request->query->get('page') === SLUG
98 + && $this->request->query->has('req');
88 99 }
89 100 }