| @@ -7,8 +7,10 @@ | ||
| 7 | 7 | trait MassAction |
| 8 | 8 | { |
| 9 | 9 | public function setFilterMassAction(): void |
| 10 | 10 | { |
| 11 | + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token'); | |
| 12 | + | |
| 11 | 13 | $this->setSaveFilters(true); |
| 12 | 14 | $this->summary(); |
| 13 | 15 | } |
| 14 | 16 | |
| @@ -13,8 +15,10 @@ | ||
| 13 | 15 | } |
| 14 | 16 | |
| 15 | 17 | public function setActionMassAction(): void |
| 16 | 18 | { |
| 19 | + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token'); | |
| 20 | + | |
| 17 | 21 | $this->getSaveActions(true); |
| 18 | 22 | $this->filter(); |
| 19 | 23 | } |
| 20 | 24 | |
| @@ -19,11 +23,12 @@ | ||
| 19 | 23 | } |
| 20 | 24 | |
| 21 | 25 | public function processMassAction(): void |
| 22 | 26 | { |
| 23 | - acym_session(); | |
| 27 | + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token'); | |
| 28 | + | |
| 24 | 29 | $automationClass = new AutomationClass(); |
| 25 | - $massAction = empty($_SESSION['massAction']) ? '' : $_SESSION['massAction']; | |
| 30 | + $massAction = acym_getVar('array', 'massAction', [], 'SESSION'); | |
| 26 | 31 | if (!empty($massAction)) { |
| 27 | 32 | $automation = new \stdClass(); |
| 28 | 33 | $automation->filters = json_encode($massAction['filters']); |
| 29 | 34 | $automation->actions = json_encode($massAction['actions']); |