From 74eef4fca843321ac6a611140c536e3c5fd97a6f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 13 Feb 2012 15:09:39 +0400 Subject: [PATCH] fix rpc setpref (key unassigned) --- classes/rpc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/rpc.php b/classes/rpc.php index d5e7b937..a5e32d47 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -210,9 +210,9 @@ class RPC extends Protected_Handler { } function setpref() { - $value = str_replace("\n", "
", $_REQUEST['value']); - // set_pref escapes input, so no need to double escape it here + $key = $_REQUEST['key']; + $value = str_replace("\n", "
", $_REQUEST['value']); set_pref($this->link, $key, $value, $_SESSION['uid'], $key != 'USER_STYLESHEET'); -- 2.39.5