X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=classes%2Frpc.php;h=bd4337fbe64ae8bf58729441c5ea3e026cf7b12c;hb=07fd4f8d9d4f301f5ad88ff9e80f042fc3eb0c36;hp=cb71412ae09012f049164b869b63cad6efe7c05c;hpb=e6532439d68234d86176e4d967609d68dd564c1d;p=tt-rss.git diff --git a/classes/rpc.php b/classes/rpc.php index cb71412a..bd4337fb 100755 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -97,8 +97,9 @@ class RPC extends Handler_Protected { function addfeed() { $feed = clean($_REQUEST['feed']); $cat = clean($_REQUEST['cat']); - $login = clean($_REQUEST['login']); - $pass = trim(clean($_REQUEST['pass'])); + $need_auth = isset($_REQUEST['need_auth']); + $login = $need_auth ? clean($_REQUEST['login']) : ''; + $pass = $need_auth ? trim(clean($_REQUEST['pass'])) : ''; $rc = Feeds::subscribe_to_feed($feed, $cat, $login, $pass); @@ -116,7 +117,7 @@ class RPC extends Handler_Protected { function setpref() { // set_pref escapes input, so no need to double escape it here $key = clean($_REQUEST['key']); - $value = nl2br($_REQUEST['value']); + $value = $_REQUEST['value']; set_pref($key, $value, false, $key != 'USER_STYLESHEET');