| @@ 69-75 (lines=7) @@ | ||
| 66 | private function requestRequired(){ |
|
| 67 | foreach (['Post', 'Ajax', 'Get'] as $method) { |
|
| 68 | $key = 'require' . $method; |
|
| 69 | if (!empty($this->config[$key])) { |
|
| 70 | if (in_array($this->request->param('action'), $this->config[$key], true) || $this->config[$key] === ['*']) { |
|
| 71 | if (!$this->request->{"is" . $method}()) { |
|
| 72 | return false; |
|
| 73 | } |
|
| 74 | } |
|
| 75 | } |
|
| 76 | } |
|
| 77 | return true; |
|
| 78 | } |
|
| @@ 87-93 (lines=7) @@ | ||
| 84 | */ |
|
| 85 | private function secureRequired(){ |
|
| 86 | $key = "requireSecure"; |
|
| 87 | if(!empty($this->config[$key])){ |
|
| 88 | if (in_array($this->request->param('action'), $this->config[$key], true) || $this->config[$key] === ['*']) { |
|
| 89 | if (!$this->request->isSSL()) { |
|
| 90 | return false; |
|
| 91 | } |
|
| 92 | } |
|
| 93 | } |
|
| 94 | return true; |
|
| 95 | } |
|
| 96 | ||