Browse Source

Hide feed credentials when adding a new feed (#3099)

Avoid showing HTTP Basic Auth credentials in feed error log and in feed
title (when there is no title provided)
Alexandre Alapetite 5 năm trước cách đây
mục cha
commit
3f9518b377
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      app/Models/Feed.php

+ 2 - 2
app/Models/Feed.php

@@ -287,7 +287,7 @@ class FreshRSS_Feed extends Minz_Model {
 				if ((!$mtime) || $simplePie->error()) {
 				if ((!$mtime) || $simplePie->error()) {
 					$errorMessage = $simplePie->error();
 					$errorMessage = $simplePie->error();
 					throw new FreshRSS_Feed_Exception(
 					throw new FreshRSS_Feed_Exception(
-						($errorMessage == '' ? 'Unknown error for feed' : $errorMessage) . ' [' . $url . ']'
+						($errorMessage == '' ? 'Unknown error for feed' : $errorMessage) . ' [' . $this->url . ']'
 					);
 					);
 				}
 				}
 
 
@@ -302,7 +302,7 @@ class FreshRSS_Feed extends Minz_Model {
 
 
 					//HTML to HTML-PRE	//ENT_COMPAT except '&'
 					//HTML to HTML-PRE	//ENT_COMPAT except '&'
 					$title = strtr(html_only_entity_decode($simplePie->get_title()), array('<' => '&lt;', '>' => '&gt;', '"' => '&quot;'));
 					$title = strtr(html_only_entity_decode($simplePie->get_title()), array('<' => '&lt;', '>' => '&gt;', '"' => '&quot;'));
-					$this->_name($title == '' ? $url : $title);
+					$this->_name($title == '' ? $this->url : $title);
 
 
 					$this->_website(html_only_entity_decode($simplePie->get_link()));
 					$this->_website(html_only_entity_decode($simplePie->get_link()));
 					$this->_description(html_only_entity_decode($simplePie->get_description()));
 					$this->_description(html_only_entity_decode($simplePie->get_description()));