PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.0
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
← All changes | back/Controllers/DynamicsController.php +6 -2 10.1.4 → 11.1.0 View file →
@@ -9,11 +9,13 @@
9 9 class DynamicsController extends AcymController
10 10 {
11 11 public function replaceDummy(): void
12 12 {
13 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
14 +
13 15 $mailId = acym_getVar('int', 'mailId', 0);
14 16 $code = acym_getVar('string', 'code', '', '', ACYM_ALLOWRAW);
15 - $previewBody = acym_getVar('string', 'previewBody', '', '', ACYM_ALLOWRAW);
17 + $previewBody = base64_decode(acym_getVar('string', 'previewBody', '', '', ACYM_ALLOWRAW));
16 18
17 19 $pluginHelper = new PluginHelper();
18 20 $email = $pluginHelper->createDummyEmailObject($mailId, $code, $previewBody);
19 21
@@ -47,8 +49,10 @@
47 49 }
48 50
49 51 public function trigger(): void
50 52 {
53 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
54 +
51 55 $plugin = acym_getVar('cmd', 'plugin', '');
52 56 $trigger = acym_getVar('cmd', 'trigger', '');
53 57 if (empty($plugin) || empty($trigger)) exit;
54 58
@@ -76,9 +80,9 @@
76 80 if ($trigger === 'insertionOptions') {
77 81 $rawDefaultValues = $this->config->get('dcontent_default_'.$plugin);
78 82
79 83 if (!empty($rawDefaultValues)) {
80 - $defaultValues = json_decode($rawDefaultValues, true);
84 + $defaultValues = is_string($rawDefaultValues) ? json_decode($rawDefaultValues, true) : $rawDefaultValues;
81 85 unset($defaultValues['id']);
82 86 unset($defaultValues['from']);
83 87 unset($defaultValues['to']);
84 88 $defaultValues = (object)$defaultValues;