| @@ 63-69 (lines=7) @@ | ||
| 60 | private function requestRequired(){ |
|
| 61 | foreach (['Post', 'Ajax', 'Get'] as $method) { |
|
| 62 | $key = 'require' . $method; |
|
| 63 | if (!empty($this->config[$key])) { |
|
| 64 | if (in_array($this->request->param('action'), $this->config[$key], true) || $this->config[$key] === ['*']) { |
|
| 65 | if (!$this->request->{"is" . $method}()) { |
|
| 66 | $this->invalidRequest(); |
|
| 67 | } |
|
| 68 | } |
|
| 69 | } |
|
| 70 | } |
|
| 71 | } |
|
| 72 | ||
| @@ 81-87 (lines=7) @@ | ||
| 78 | */ |
|
| 79 | private function secureRequired(){ |
|
| 80 | $key = "requireSecure"; |
|
| 81 | if(!empty($this->config[$key])){ |
|
| 82 | if (in_array($this->request->param('action'), $this->config[$key], true) || $this->config[$key] === ['*']) { |
|
| 83 | if (!$this->request->isSSL()) { |
|
| 84 | $this->controller->forceSSL(); |
|
| 85 | } |
|
| 86 | } |
|
| 87 | } |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|