From 9e698108febebba511638d9cad5a228cb8936e3a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 4 Mar 2017 11:21:57 +0100 Subject: Do not mark as read in anonymous mode And avoid HTTP 403 https://github.com/FreshRSS/FreshRSS/issues/1431 --- app/views/helpers/javascript_vars.phtml | 1 + p/scripts/main.js | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 745baa195..059224305 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -3,6 +3,7 @@ $mark = FreshRSS_Context::$user_conf->mark_when; $s = FreshRSS_Context::$user_conf->shortcuts; echo htmlspecialchars(json_encode(array( 'context' => array( + 'anonymous' => !FreshRSS_Auth::hasAccess(), 'auto_remove_article' => !!FreshRSS_Context::isAutoRemoveAvailable(), 'hide_posts' => !(FreshRSS_Context::$user_conf->display_posts || Minz_Request::actionName() === 'reader'), 'display_order' => Minz_Request::param('order', FreshRSS_Context::$user_conf->sort_order), diff --git a/p/scripts/main.js b/p/scripts/main.js index d464b0863..5dbb95c91 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -117,6 +117,7 @@ function incUnreadsFeed(article, feed_id, nb) { var pending_entries = {}; function mark_read(active, only_not_read) { if ((active.length === 0) || (!active.attr('id')) || + context.anonymous || (only_not_read && !active.hasClass("not_read"))) { return false; } -- cgit v1.2.3 From 2de29865e39f201b438ae31e16c86d480f7cc59d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 4 Mar 2017 11:25:49 +0100 Subject: Changelog 1431 https://github.com/FreshRSS/FreshRSS/issues/1431 https://github.com/FreshRSS/FreshRSS/pull/1451 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b451b05e..44c6d333f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ * Bug fixing * Fix PostgreSQL bugs with API and feed modifications [#1417](https://github.com/FreshRSS/FreshRSS/pull/1417) * Allow empty strings in CLI do-install [#1435](https://github.com/FreshRSS/FreshRSS/pull/1435) + * Do not mark as read in anonymous mode [#1431](https://github.com/FreshRSS/FreshRSS/issues/1431) * Security * Sanitize feed Web site URL [#1434](https://github.com/FreshRSS/FreshRSS/issues/1434) * No version number for anonymous users [#1404](https://github.com/FreshRSS/FreshRSS/issues/1404) -- cgit v1.2.3