Browse Source

Merge branch 'master' of cvidal/tt-rss into master

fox 1 year ago
parent
commit
a421eb655d
1 changed files with 3 additions and 2 deletions
  1. 3 2
      classes/rpc.php

+ 3 - 2
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);