From 0c62394bf4974b6796f9b244aabfbc215553dc5d Mon Sep 17 00:00:00 2001 From: Kevin Cristiano <kcristiano@tadpole.cc> Date: Sun, 28 Feb 2016 21:30:51 -0500 Subject: [PATCH] PRE_RELEASE:CRM-18040 - Remove WP magic quotes during rest requests from colemanw --- civicrm/CRM/Utils/System/WordPress.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/civicrm/CRM/Utils/System/WordPress.php b/civicrm/CRM/Utils/System/WordPress.php index 4f8c32b305..446668e10f 100644 --- a/civicrm/CRM/Utils/System/WordPress.php +++ b/civicrm/CRM/Utils/System/WordPress.php @@ -420,6 +420,11 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { } require_once $cmsRootPath . DIRECTORY_SEPARATOR . 'wp-includes/pluggable.php'; $uid = CRM_Utils_Array::value('uid', $name); + + // Disable magic quotes + $wp = new CiviCRM_For_WordPress(); + $wp->remove_wp_magic_quotes(); + if (!$uid) { $name = $name ? $name : trim(CRM_Utils_Array::value('name', $_REQUEST)); $pass = $pass ? $pass : trim(CRM_Utils_Array::value('pass', $_REQUEST)); -- GitLab