From f3e9b4d9b52618e88e848decb6ec26dda0722301 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Sun, 1 Feb 2015 22:54:57 +0100 Subject: [PATCH] improve image-proxy - use passthrough mode for image proxy (fixes #295) - add image proxy when rendering an article (fixes #314) - add referrer cloaking option to feed options (fixes #319) --- controllers/common.php | 10 +-- controllers/feed.php | 4 +- controllers/item.php | 19 +++++- locales/cs_CZ/translations.php | 1 + locales/de_DE/translations.php | 1 + locales/es_ES/translations.php | 1 + locales/fr_FR/translations.php | 1 + locales/it_IT/translations.php | 1 + locales/pt_BR/translations.php | 1 + locales/zh_CN/translations.php | 1 + models/config.php | 4 -- models/feed.php | 4 +- models/proxy.php | 67 ++++++++++++++----- models/schema.php | 7 +- templates/add.php | 1 + templates/edit_feed.php | 2 + templates/show_item.php | 6 +- .../datasets/expected_BookmarkReadArticle.xml | 2 + .../expected_BookmarkUnreadArticle.xml | 2 + .../datasets/expected_FirstFeedAllRemoved.xml | 2 + .../datasets/expected_MarkFeedRead.xml | 2 + .../expected_MarkReadBookmarkedArticle.xml | 2 + .../expected_MarkReadNotBookmarkedArticle.xml | 2 + .../expected_MarkUnreadBookmarkedArticle.xml | 2 + ...xpected_MarkUnreadNotBookmarkedArticle.xml | 2 + .../expected_NoBookmarkedArticles.xml | 2 + .../datasets/expected_NoReadArticles.xml | 2 + .../expected_NoReadNotBookmarkedArticles.xml | 2 + .../expected_RemoveReadBookmarkedArticle.xml | 2 + ...xpected_RemoveReadNotBookmarkedArticle.xml | 2 + ...expected_RemoveUnreadBookmarkedArticle.xml | 2 + ...ected_RemoveUnreadNotBookmarkedArticle.xml | 2 + .../expected_UnbookmarkReadArticle.xml | 2 + .../expected_UnbookmarkUnreadArticle.xml | 2 + .../datasets/fixture_OneUnreadArticle.xml | 2 + .../datasets/fixture_OnlyReadArticles.xml | 2 + tests/integration/datasets/fixture_feed1.xml | 2 + .../datasets/fixture_feed1_parsing_error.xml | 2 + tests/integration/datasets/fixture_feed2.xml | 2 + .../fixture_feed_error_disabled_normal.xml | 2 + 40 files changed, 138 insertions(+), 39 deletions(-) diff --git a/controllers/common.php b/controllers/common.php index 58c1fd9..66b7a88 100644 --- a/controllers/common.php +++ b/controllers/common.php @@ -74,12 +74,6 @@ Router\get_action('more', function() { // Image proxy (avoid SSL mixed content warnings) Router\get_action('proxy', function() { - list($content, $type) = Model\Proxy\download(rawurldecode(Request\param('url'))); - - if (empty($content)) { - Response\text('Not Found', 404); - } - - Response\content_type($type); - Response\raw($content); + Model\Proxy\download(rawurldecode(Request\param('url'))); + exit; }); diff --git a/controllers/feed.php b/controllers/feed.php index 3521013..6b5745c 100644 --- a/controllers/feed.php +++ b/controllers/feed.php @@ -158,9 +158,9 @@ Router\action('subscribe', function() { } } - $values += array('download_content' => 0, 'rtl' => 0); + $values += array('download_content' => 0, 'rtl' => 0, 'cloak_referrer' => 0); $url = trim($url); - $feed_id = Model\Feed\create($url, $values['download_content'], $values['rtl']); + $feed_id = Model\Feed\create($url, $values['download_content'], $values['rtl'], $values['cloak_referrer']); if ($feed_id) { Session\flash(t('Subscription added successfully.')); diff --git a/controllers/item.php b/controllers/item.php index d77e07b..942cbdb 100644 --- a/controllers/item.php +++ b/controllers/item.php @@ -66,6 +66,15 @@ Router\get_action('show', function() { break; } + $image_proxy = Model\Config\get('image_proxy'); + + // add the image proxy if requested and required + $item['content'] = Model\Proxy\addProxyToTags($item['content'], $item['url'], $image_proxy, $feed['cloak_referrer']); + + if ($image_proxy && strpos($item['enclosure_type'], 'image') === 0) { + $item['enclosure'] = Model\Proxy\addProxyToLink($item['enclosure']); + } + Response\html(Template\layout('show_item', array( 'nb_unread_items' => $nb_unread_items = Model\Item\count_by_status('unread'), 'item' => $item, @@ -73,7 +82,6 @@ Router\get_action('show', function() { 'item_nav' => isset($nav) ? $nav : null, 'menu' => $menu, 'title' => $item['title'], - 'image_proxy_enabled' => (bool) Model\Config\get('image_proxy'), ))); }); @@ -107,8 +115,15 @@ Router\get_action('feed-items', function() { // Ajax call to download an item (fetch the full content from the original website) Router\post_action('download-item', function() { + $id = Request\param('id'); - Response\json(Model\Item\download_content_id(Request\param('id'))); + $item = Model\Item\get($id); + $feed = Model\Feed\get($item['feed_id']); + + $download = Model\Item\download_content_id($id); + $download['content'] = Model\Proxy\addProxyToTags($download['content'], $item['url'], Model\Config\get('image_proxy'), $feed['cloak_referrer']); + + Response\json($download); }); // Ajax call change item status diff --git a/locales/cs_CZ/translations.php b/locales/cs_CZ/translations.php index eb7e743..7ef0db0 100644 --- a/locales/cs_CZ/translations.php +++ b/locales/cs_CZ/translations.php @@ -235,4 +235,5 @@ return array( // 'Nothing to show. Enable the debug mode to see log messages.' => '', // 'Enable debug mode' => '', // 'Original link marks article as read' => '', + // 'Cloak the image referrer' => '', ); diff --git a/locales/de_DE/translations.php b/locales/de_DE/translations.php index 870b7fd..f1c5571 100644 --- a/locales/de_DE/translations.php +++ b/locales/de_DE/translations.php @@ -235,4 +235,5 @@ return array( // 'Nothing to show. Enable the debug mode to see log messages.' => '', // 'Enable debug mode' => '', // 'Original link marks article as read' => '', + // 'Cloak the image referrer' => '', ); diff --git a/locales/es_ES/translations.php b/locales/es_ES/translations.php index 5551e71..1ffa690 100644 --- a/locales/es_ES/translations.php +++ b/locales/es_ES/translations.php @@ -235,4 +235,5 @@ return array( // 'Nothing to show. Enable the debug mode to see log messages.' => '', // 'Enable debug mode' => '', // 'Original link marks article as read' => '', + // 'Cloak the image referrer' => '', ); diff --git a/locales/fr_FR/translations.php b/locales/fr_FR/translations.php index cf85347..8347e4a 100644 --- a/locales/fr_FR/translations.php +++ b/locales/fr_FR/translations.php @@ -235,4 +235,5 @@ return array( 'Nothing to show. Enable the debug mode to see log messages.' => 'Rien à montrer. Activez le mode debug pour voir les messages de log.', 'Enable debug mode' => 'Activer le mode debug', 'Original link marks article as read' => 'Marquer les articles comme lu lors d\'un clic sur le lien original', + 'Cloak the image referrer' => 'Cloak the image referrer', ); diff --git a/locales/it_IT/translations.php b/locales/it_IT/translations.php index 690c59a..396c874 100644 --- a/locales/it_IT/translations.php +++ b/locales/it_IT/translations.php @@ -235,4 +235,5 @@ return array( // 'Nothing to show. Enable the debug mode to see log messages.' => '', // 'Enable debug mode' => '', // 'Original link marks article as read' => '', + // 'Cloak the image referrer' => '', ); diff --git a/locales/pt_BR/translations.php b/locales/pt_BR/translations.php index 229ec57..04e310b 100644 --- a/locales/pt_BR/translations.php +++ b/locales/pt_BR/translations.php @@ -235,4 +235,5 @@ return array( // 'Nothing to show. Enable the debug mode to see log messages.' => '', // 'Enable debug mode' => '', // 'Original link marks article as read' => '', + // 'Cloak the image referrer' => '', ); diff --git a/locales/zh_CN/translations.php b/locales/zh_CN/translations.php index c6c004d..3aed60c 100644 --- a/locales/zh_CN/translations.php +++ b/locales/zh_CN/translations.php @@ -235,4 +235,5 @@ return array( // 'Nothing to show. Enable the debug mode to see log messages.' => '', // 'Enable debug mode' => '', // 'Original link marks article as read' => '', + // 'Cloak the image referrer' => '', ); diff --git a/models/config.php b/models/config.php index 002c4d6..77f3a9d 100644 --- a/models/config.php +++ b/models/config.php @@ -32,10 +32,6 @@ function get_reader_config() // Filter $config->setFilterIframeWhitelist(get_iframe_whitelist()); - if ((bool) get('image_proxy')) { - $config->setFilterImageProxyUrl('?action=proxy&url=%s'); - } - if ((bool) get('debug_mode')) { Logger::enable(); } diff --git a/models/feed.php b/models/feed.php index 9142b7c..4606d9a 100644 --- a/models/feed.php +++ b/models/feed.php @@ -102,6 +102,7 @@ function update(array $values) 'enabled' => empty($values['enabled']) ? 0 : $values['enabled'], 'rtl' => empty($values['rtl']) ? 0 : $values['rtl'], 'download_content' => empty($values['download_content']) ? 0 : $values['download_content'], + 'cloak_referrer' => empty($values['cloak_referrer']) ? 0 : $values['cloak_referrer'], )); } @@ -148,7 +149,7 @@ function import_opml($content) } // Add a new feed from an URL -function create($url, $enable_grabber = false, $force_rtl = false) +function create($url, $enable_grabber = false, $force_rtl = false, $cloak_referrer = false) { try { $db = Database::get('db'); @@ -185,6 +186,7 @@ function create($url, $enable_grabber = false, $force_rtl = false) 'last_modified' => $resource->getLastModified(), 'last_checked' => time(), 'etag' => $resource->getEtag(), + 'cloak_referrer' => $cloak_referrer ? 1 : 0, )); if ($result) { diff --git a/models/proxy.php b/models/proxy.php index 8222101..d5459d6 100644 --- a/models/proxy.php +++ b/models/proxy.php @@ -3,26 +3,61 @@ namespace Model\Proxy; use Model\Config; +use PicoFeed\Config\Config as PicoFeedConfig; +use PicoFeed\Filter\Filter; use PicoFeed\Client\Client; -use PicoFeed\Client\ClientException; + +function isSecureConnection() +{ + return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'); +} + +function addProxyToLink($link) { + + if (isSecureConnection() && strpos($link, 'http:') === 0) { + $link = '?action=proxy&url='.urlencode($link); + } + + return $link; +} + +function addProxyToTags($html, $website, $proxy_images, $cloak_referrer) +{ + if ($html === '' // no content, no proxy + || (! $cloak_referrer && ! $proxy_images) // neither cloaking nor proxing enabled + || (! $cloak_referrer && $proxy_images && ! isSecureConnection())) { // only proxy enabled, but not connected via HTTPS + + return $html; + } + + $config = new PicoFeedConfig(); + $config->setFilterImageProxyUrl('?action=proxy&url=%s'); + + if (! $cloak_referrer && $proxy_images) { + // image proxy mode only: https links do not need to be proxied, since + // they do not trigger mixed content warnings. + $config->setFilterImageProxyProtocol('http'); + } + elseif (! $proxy_images && $cloak_referrer && isSecureConnection() ) { + // cloaking mode only: if a request from a HTTPS connection to a HTTP + // connection is made, the referrer will be omitted by the browser. + // Only the referrer for HTTPS to HTTPs requests needs to be cloaked. + $config->setFilterImageProxyProtocol('https'); + } + + $filter = Filter::html($html, $website); + $filter->setConfig($config); + + return $filter->execute(); +} function download($url) { - try { - $client = Client::getInstance(); - $client->setUserAgent(Config\HTTP_USER_AGENT); - $client->execute($url); - - $content = array( - $client->getContent(), - $client->getContentType(), - ); - } - catch (ClientException $e) { - $content = array(false, false); - } + $client = Client::getInstance(); + $client->setUserAgent(Config\HTTP_USER_AGENT); + $client->enablePassthroughMode(); + $client->execute($url); + // does not work Config\write_debug(); - - return $content; } diff --git a/models/schema.php b/models/schema.php index fd0e731..bd0957b 100644 --- a/models/schema.php +++ b/models/schema.php @@ -5,7 +5,12 @@ namespace Schema; use PDO; use Model\Config; -const VERSION = 38; +const VERSION = 39; + +function version_39($pdo) +{ + $pdo->exec('ALTER TABLE feeds ADD COLUMN cloak_referrer INTEGER DEFAULT 0'); +} function version_38($pdo) { diff --git a/templates/add.php b/templates/add.php index efeebb1..f76f4e4 100644 --- a/templates/add.php +++ b/templates/add.php @@ -19,6 +19,7 @@

+

diff --git a/templates/edit_feed.php b/templates/edit_feed.php index 4ec4bb8..4467427 100644 --- a/templates/edit_feed.php +++ b/templates/edit_feed.php @@ -25,6 +25,8 @@
+
+
diff --git a/templates/show_item.php b/templates/show_item.php index b55cc30..baf8f61 100644 --- a/templates/show_item.php +++ b/templates/show_item.php @@ -81,11 +81,7 @@
- - enclosure - - enclosure - + enclosure
diff --git a/tests/integration/datasets/expected_BookmarkReadArticle.xml b/tests/integration/datasets/expected_BookmarkReadArticle.xml index fd77c68..ad1a4d6 100644 --- a/tests/integration/datasets/expected_BookmarkReadArticle.xml +++ b/tests/integration/datasets/expected_BookmarkReadArticle.xml @@ -12,6 +12,7 @@ download_content parsing_error rtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0 diff --git a/tests/integration/datasets/expected_BookmarkUnreadArticle.xml b/tests/integration/datasets/expected_BookmarkUnreadArticle.xml index bd62c3d..b3735c6 100644 --- a/tests/integration/datasets/expected_BookmarkUnreadArticle.xml +++ b/tests/integration/datasets/expected_BookmarkUnreadArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_FirstFeedAllRemoved.xml b/tests/integration/datasets/expected_FirstFeedAllRemoved.xml index 6aa8d0d..fb6b8d0 100644 --- a/tests/integration/datasets/expected_FirstFeedAllRemoved.xml +++ b/tests/integration/datasets/expected_FirstFeedAllRemoved.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_MarkFeedRead.xml b/tests/integration/datasets/expected_MarkFeedRead.xml index 0c6c325..9b16edb 100644 --- a/tests/integration/datasets/expected_MarkFeedRead.xml +++ b/tests/integration/datasets/expected_MarkFeedRead.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_MarkReadBookmarkedArticle.xml b/tests/integration/datasets/expected_MarkReadBookmarkedArticle.xml index 1c0a9e2..bf4b43e 100644 --- a/tests/integration/datasets/expected_MarkReadBookmarkedArticle.xml +++ b/tests/integration/datasets/expected_MarkReadBookmarkedArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_MarkReadNotBookmarkedArticle.xml b/tests/integration/datasets/expected_MarkReadNotBookmarkedArticle.xml index 1fec888..06f6dfc 100644 --- a/tests/integration/datasets/expected_MarkReadNotBookmarkedArticle.xml +++ b/tests/integration/datasets/expected_MarkReadNotBookmarkedArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_MarkUnreadBookmarkedArticle.xml b/tests/integration/datasets/expected_MarkUnreadBookmarkedArticle.xml index 9de6383..a93c906 100644 --- a/tests/integration/datasets/expected_MarkUnreadBookmarkedArticle.xml +++ b/tests/integration/datasets/expected_MarkUnreadBookmarkedArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_MarkUnreadNotBookmarkedArticle.xml b/tests/integration/datasets/expected_MarkUnreadNotBookmarkedArticle.xml index a4bc051..f5e0554 100644 --- a/tests/integration/datasets/expected_MarkUnreadNotBookmarkedArticle.xml +++ b/tests/integration/datasets/expected_MarkUnreadNotBookmarkedArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_NoBookmarkedArticles.xml b/tests/integration/datasets/expected_NoBookmarkedArticles.xml index 523a3d5..ac8f3c9 100644 --- a/tests/integration/datasets/expected_NoBookmarkedArticles.xml +++ b/tests/integration/datasets/expected_NoBookmarkedArticles.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0 2 diff --git a/tests/integration/datasets/expected_NoReadArticles.xml b/tests/integration/datasets/expected_NoReadArticles.xml index 31d549e..bba6fd9 100644 --- a/tests/integration/datasets/expected_NoReadArticles.xml +++ b/tests/integration/datasets/expected_NoReadArticles.xml @@ -12,6 +12,7 @@ download_content parsing_error rtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0 2 diff --git a/tests/integration/datasets/expected_NoReadNotBookmarkedArticles.xml b/tests/integration/datasets/expected_NoReadNotBookmarkedArticles.xml index db38898..7fef17a 100644 --- a/tests/integration/datasets/expected_NoReadNotBookmarkedArticles.xml +++ b/tests/integration/datasets/expected_NoReadNotBookmarkedArticles.xml @@ -12,6 +12,7 @@ download_content parsing_error rtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0 2 diff --git a/tests/integration/datasets/expected_RemoveReadBookmarkedArticle.xml b/tests/integration/datasets/expected_RemoveReadBookmarkedArticle.xml index d5c94bb..d68b773 100644 --- a/tests/integration/datasets/expected_RemoveReadBookmarkedArticle.xml +++ b/tests/integration/datasets/expected_RemoveReadBookmarkedArticle.xml @@ -12,6 +12,7 @@ download_content parsing_error rtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_RemoveReadNotBookmarkedArticle.xml b/tests/integration/datasets/expected_RemoveReadNotBookmarkedArticle.xml index 1088ca3..110d56d 100644 --- a/tests/integration/datasets/expected_RemoveReadNotBookmarkedArticle.xml +++ b/tests/integration/datasets/expected_RemoveReadNotBookmarkedArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_RemoveUnreadBookmarkedArticle.xml b/tests/integration/datasets/expected_RemoveUnreadBookmarkedArticle.xml index aa562d7..9509250 100644 --- a/tests/integration/datasets/expected_RemoveUnreadBookmarkedArticle.xml +++ b/tests/integration/datasets/expected_RemoveUnreadBookmarkedArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_RemoveUnreadNotBookmarkedArticle.xml b/tests/integration/datasets/expected_RemoveUnreadNotBookmarkedArticle.xml index bb672d0..3c78653 100644 --- a/tests/integration/datasets/expected_RemoveUnreadNotBookmarkedArticle.xml +++ b/tests/integration/datasets/expected_RemoveUnreadNotBookmarkedArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_UnbookmarkReadArticle.xml b/tests/integration/datasets/expected_UnbookmarkReadArticle.xml index dd70f15..be84bba 100644 --- a/tests/integration/datasets/expected_UnbookmarkReadArticle.xml +++ b/tests/integration/datasets/expected_UnbookmarkReadArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/expected_UnbookmarkUnreadArticle.xml b/tests/integration/datasets/expected_UnbookmarkUnreadArticle.xml index fea57d3..bd6b964 100644 --- a/tests/integration/datasets/expected_UnbookmarkUnreadArticle.xml +++ b/tests/integration/datasets/expected_UnbookmarkUnreadArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/fixture_OneUnreadArticle.xml b/tests/integration/datasets/fixture_OneUnreadArticle.xml index cb53284..97b1f3e 100644 --- a/tests/integration/datasets/fixture_OneUnreadArticle.xml +++ b/tests/integration/datasets/fixture_OneUnreadArticle.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0 2 diff --git a/tests/integration/datasets/fixture_OnlyReadArticles.xml b/tests/integration/datasets/fixture_OnlyReadArticles.xml index 3e66047..151e3da 100644 --- a/tests/integration/datasets/fixture_OnlyReadArticles.xml +++ b/tests/integration/datasets/fixture_OnlyReadArticles.xml @@ -12,6 +12,7 @@ download_content parsing_error rtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0 2 diff --git a/tests/integration/datasets/fixture_feed1.xml b/tests/integration/datasets/fixture_feed1.xml index dbe457e..f6174a2 100644 --- a/tests/integration/datasets/fixture_feed1.xml +++ b/tests/integration/datasets/fixture_feed1.xml @@ -12,6 +12,7 @@ download_content parsing_error rtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/fixture_feed1_parsing_error.xml b/tests/integration/datasets/fixture_feed1_parsing_error.xml index 55e8ed7..3a3caaa 100644 --- a/tests/integration/datasets/fixture_feed1_parsing_error.xml +++ b/tests/integration/datasets/fixture_feed1_parsing_error.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://miniflux.net/ @@ -24,6 +25,7 @@ 0 1 0 + 0
diff --git a/tests/integration/datasets/fixture_feed2.xml b/tests/integration/datasets/fixture_feed2.xml index 5ce758e..d72127d 100644 --- a/tests/integration/datasets/fixture_feed2.xml +++ b/tests/integration/datasets/fixture_feed2.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 2 https://github.com/fguillot/miniflux/commits/master @@ -24,6 +25,7 @@ 0 0 0 + 0
diff --git a/tests/integration/datasets/fixture_feed_error_disabled_normal.xml b/tests/integration/datasets/fixture_feed_error_disabled_normal.xml index 3361a6e..bc87364 100644 --- a/tests/integration/datasets/fixture_feed_error_disabled_normal.xml +++ b/tests/integration/datasets/fixture_feed_error_disabled_normal.xml @@ -12,6 +12,7 @@ download_contentparsing_errorrtl + cloak_referrer 1 http://www.01net.com/actus/ @@ -24,6 +25,7 @@ 0 0 0 + 0 2