Commit c217de55 authored by Colin Vidal's avatar Colin Vidal

rpc: addfeed: gets login and pass only if need_auth is checked.

Because of browser form auto-completion, the hidden field login and
password can be automatically filled when adding a feed. It would
enable feed authentication even if the user doesn't click on need_auth
button.
parent c30f5e18
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment