From 1a35e2271d3b9383e882371d37d5fef16abd745d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 21 Mar 2015 18:20:36 +0100 Subject: SimplePie option to restaure syslog of HTTP requests https://github.com/FreshRSS/FreshRSS/issues/711 --- data/config.default.php | 1 + 1 file changed, 1 insertion(+) (limited to 'data/config.default.php') diff --git a/data/config.default.php b/data/config.default.php index 97df3a299..839bd1687 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -12,6 +12,7 @@ return array( 'auth_type' => 'none', 'api_enabled' => false, 'unsafe_autologin_enabled' => false, + 'simplepie_syslog_enabled' => true, 'limits' => array( 'cache_duration' => 800, 'timeout' => 10, -- cgit v1.2.3 From fedf062b4942a1e30608b662f713f06a83a0565c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 10 May 2015 11:50:08 +0200 Subject: Comments in config file Documentation https://github.com/FreshRSS/FreshRSS/issues/123 --- README.fr.md | 1 + README.md | 1 + data/config.default.php | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) (limited to 'data/config.default.php') diff --git a/README.fr.md b/README.fr.md index ea5b07a9b..6c77ccf51 100644 --- a/README.fr.md +++ b/README.fr.md @@ -46,6 +46,7 @@ Privilégiez pour cela des demandes sur GitHub 3. Le serveur Web doit avoir les droits d’écriture dans le répertoire `./data/` 4. Accédez à FreshRSS à travers votre navigateur Web et suivez les instructions d’installation 5. Tout devrait fonctionner :) En cas de problème, n’hésitez pas à me contacter. +6. Des paramètres de configuration avancée peuvent être accédés depuis [config.php](./data/config.default.php). # Contrôle d’accès Il est requis pour le mode multi-utilisateur, et recommandé dans tous les cas, de limiter l’accès à votre FreshRSS. Au choix : diff --git a/README.md b/README.md index 92072b07d..089bbd780 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ The best way is to open issues on GitHub 3. Add write access on `./data/` folder to the webserver user 4. Access FreshRSS with your browser and follow the installation process 5. Every thing should be working :) If you encounter any problem, feel free to contact me. +6. Advanced configuration settings can be seen in [config.php](./data/config.default.php). # Access control It is needed for the multi-user mode to limit access to FreshRSS. You can: diff --git a/data/config.default.php b/data/config.default.php index 839bd1687..8be203d36 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -1,32 +1,104 @@ 'production', + + # Used to make crypto more unique. Generated during install. 'salt' => '', + + # Leave empty for most cases. + # Ability to override the address of the FreshRSS instance, + # used when building absolute URLs. 'base_url' => '', + + # Natural language of the user interface, e.g. `en`, `fr`. 'language' => 'en', + + # Title of this FreshRSS instance in the Web user interface. 'title' => 'FreshRSS', + + # Name of the user that has administration rights. 'default_user' => '_', + + # Allow or not visitors without login to see the articles + # of the default user. 'allow_anonymous' => false, + + # Allow or not anonymous users to start the refresh process. 'allow_anonymous_refresh' => false, + + # Login method: + # `none` is without password and shows only the default user; + # `form` is a conventional Web login form; + # `persona` is the email-based login by Mozilla; + # `http_auth` is an access controled by the HTTP Web server (e.g. `/FreshRSS/p/i/.htaccess` for Apache) + # if you use `http_auth`, remember to protect only `/FreshRSS/p/i/`, + # and in particular not protect `/FreshRSS/p/api/` if you would like to use the API (different login system). 'auth_type' => 'none', + + # Allow or not the use of the API, used for mobile apps. + # End-point is http://example.net/FreshRSS/p/api/greader.php + # You need to set the user's API password. 'api_enabled' => false, + + # Allow or not the use of an unsafe login, + # by providing username and password in the login URL: + # http://example.net/FreshRSS/p/i/?c=auth&a=login&u=alice&p=1234 'unsafe_autologin_enabled' => false, + + # Enable or not the use of syslog to log the activity of + # SimplePie, which is retrieving RSS feeds via HTTP requests. 'simplepie_syslog_enabled' => true, + 'limits' => array( + + # Duration in seconds of the SimplePie cache, + # during which a query to the RSS feed will return the local cached version. + # Especially important for multi-user setups. 'cache_duration' => 800, + + # SimplePie HTTP request timeout in seconds. 'timeout' => 10, + + # If a user has not used FreshRSS for more than x seconds, + # then its feeds are not refreshed anymore. 'max_inactivity' => PHP_INT_MAX, + + # Max number of feeds for a user. 'max_feeds' => 16384, + + # Max number of categories for a user. 'max_categories' => 16384, + ), + 'db' => array( + + # Type of database: `sqlite` or `mysql`. 'type' => 'sqlite', + + # MySQL host. 'host' => '', + + # MySQL user. 'user' => '', + + # MySQL password. 'password' => '', + + # MySQL database. 'base' => '', + + # MySQL table prefix. 'prefix' => '', + ), + + # List of enabled FreshRSS extensions. 'extensions_enabled' => array(), ); -- cgit v1.2.3 From 5f545dfda2b6700579b856c815e1914a2dd62553 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 10 May 2015 12:14:38 +0200 Subject: Global option to mark updated articles as unread https://github.com/FreshRSS/FreshRSS/issues/798 --- app/Controllers/feedController.php | 3 ++- data/config.default.php | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'data/config.default.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 5657d4a88..03f438888 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -342,7 +342,8 @@ class FreshRSS_feed_Controller extends Minz_ActionController { } else { //This entry already exists but has been updated Minz_Log::debug('Entry with GUID `' . $entry->guid() . '` updated in feed ' . $feed->id() . ', old hash ' . $existingHash . ', new hash ' . $entry->hash()); - $entry->_isRead(null); //Change is_read according to policy. //TODO: Implement option + //TODO: Make an updated/is_read policy by feed, in addition to the global one. + $entry->_isRead(FreshRSS_Context::$system_conf->mark_updated_article_unread ? false : null); //Change is_read according to policy. if (!$entryDAO->hasTransaction()) { $entryDAO->beginTransaction(); } diff --git a/data/config.default.php b/data/config.default.php index 8be203d36..dc947f154 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -55,6 +55,10 @@ return array( # SimplePie, which is retrieving RSS feeds via HTTP requests. 'simplepie_syslog_enabled' => true, + # In the case an article has changed (e.g. updated content): + # Set to `true` to mark it unread, or `false` to leave it as-is. + 'mark_updated_article_unread' => false, + 'limits' => array( # Duration in seconds of the SimplePie cache, -- cgit v1.2.3 From 0d0c6b7493161d350ca2eb1d4c45c0c70cfcbb92 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 10 May 2015 14:04:12 +0200 Subject: Moved updated/unread option from global to user https://github.com/FreshRSS/FreshRSS/issues/798 --- app/Controllers/configureController.php | 1 + app/Controllers/feedController.php | 2 +- app/Models/ConfigurationSetter.php | 4 ++++ app/i18n/de/conf.php | 1 + app/i18n/en/conf.php | 1 + app/i18n/fr/conf.php | 1 + app/views/configure/reading.phtml | 9 +++++++++ data/config.default.php | 4 ---- data/users/_/config.default.php | 5 +++++ 9 files changed, 23 insertions(+), 5 deletions(-) (limited to 'data/config.default.php') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index fc92aa0c2..248a3edcc 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -112,6 +112,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { FreshRSS_Context::$user_conf->sticky_post = Minz_Request::param('sticky_post', false); FreshRSS_Context::$user_conf->reading_confirm = Minz_Request::param('reading_confirm', false); FreshRSS_Context::$user_conf->auto_remove_article = Minz_Request::param('auto_remove_article', false); + FreshRSS_Context::$user_conf->mark_updated_article_unread = Minz_Request::param('mark_updated_article_unread', false); FreshRSS_Context::$user_conf->sort_order = Minz_Request::param('sort_order', 'DESC'); FreshRSS_Context::$user_conf->mark_when = array( 'article' => Minz_Request::param('mark_open_article', false), diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 03f438888..a36a38ce2 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -343,7 +343,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { Minz_Log::debug('Entry with GUID `' . $entry->guid() . '` updated in feed ' . $feed->id() . ', old hash ' . $existingHash . ', new hash ' . $entry->hash()); //TODO: Make an updated/is_read policy by feed, in addition to the global one. - $entry->_isRead(FreshRSS_Context::$system_conf->mark_updated_article_unread ? false : null); //Change is_read according to policy. + $entry->_isRead(FreshRSS_Context::$user_conf->mark_updated_article_unread ? false : null); //Change is_read according to policy. if (!$entryDAO->hasTransaction()) { $entryDAO->beginTransaction(); } diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php index 7f433239c..4bd29ecb0 100644 --- a/app/Models/ConfigurationSetter.php +++ b/app/Models/ConfigurationSetter.php @@ -189,6 +189,10 @@ class FreshRSS_ConfigurationSetter { $data['auto_remove_article'] = $this->handleBool($value); } + private function _mark_updated_article_unread(&$data, $value) { + $data['mark_updated_article_unread'] = $this->handleBool($value); + } + private function _display_categories(&$data, $value) { $data['display_categories'] = $this->handleBool($value); } diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php index 64c2c0945..df2c07d49 100644 --- a/app/i18n/de/conf.php +++ b/app/i18n/de/conf.php @@ -84,6 +84,7 @@ return array( 'articles_per_page' => 'Anzahl der Artikel pro Seite', 'auto_load_more' => 'Die nächsten Artikel am Seitenende laden', 'auto_remove_article' => 'Artikel nach dem Lesen verstecken', + 'mark_updated_article_unread' => 'Markieren Sie aktualisierte Artikel als ungelesen', 'confirm_enabled' => 'Bei der Aktion „Alle als gelesen markieren“ einen Bestätigungsdialog anzeigen', 'display_articles_unfolded' => 'Artikel standardmäßig ausgeklappt zeigen', 'display_categories_unfolded' => 'Kategorien standardmäßig eingeklappt zeigen', diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php index 308c45d2c..683781696 100644 --- a/app/i18n/en/conf.php +++ b/app/i18n/en/conf.php @@ -84,6 +84,7 @@ return array( 'articles_per_page' => 'Number of articles per page', 'auto_load_more' => 'Load next articles at the page bottom', 'auto_remove_article' => 'Hide articles after reading', + 'mark_updated_article_unread' => 'Mark updated articles as unread', 'confirm_enabled' => 'Display a confirmation dialog on “mark all as read” actions', 'display_articles_unfolded' => 'Show articles unfolded by default', 'display_categories_unfolded' => 'Show categories folded by default', diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php index d38445b99..87f9be290 100644 --- a/app/i18n/fr/conf.php +++ b/app/i18n/fr/conf.php @@ -84,6 +84,7 @@ return array( 'articles_per_page' => 'Nombre d’articles par page', 'auto_load_more' => 'Charger les articles suivants en bas de page', 'auto_remove_article' => 'Cacher les articles après lecture', + 'mark_updated_article_unread' => 'Marquer les articles mis à jour comme non-lus', 'confirm_enabled' => 'Afficher une confirmation lors des actions “marquer tout comme lu”', 'display_articles_unfolded' => 'Afficher les articles dépliés par défaut', 'display_categories_unfolded' => 'Afficher les catégories pliées par défaut', diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml index 8b123afa8..1b7a101df 100644 --- a/app/views/configure/reading.phtml +++ b/app/views/configure/reading.phtml @@ -125,6 +125,15 @@ +
+
+ +
+
+
diff --git a/data/config.default.php b/data/config.default.php index dc947f154..8be203d36 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -55,10 +55,6 @@ return array( # SimplePie, which is retrieving RSS feeds via HTTP requests. 'simplepie_syslog_enabled' => true, - # In the case an article has changed (e.g. updated content): - # Set to `true` to mark it unread, or `false` to leave it as-is. - 'mark_updated_article_unread' => false, - 'limits' => array( # Duration in seconds of the SimplePie cache, diff --git a/data/users/_/config.default.php b/data/users/_/config.default.php index 6d3f73a13..bf74ca1de 100644 --- a/data/users/_/config.default.php +++ b/data/users/_/config.default.php @@ -22,6 +22,11 @@ return array ( 'sticky_post' => true, 'reading_confirm' => false, 'auto_remove_article' => false, + + # In the case an article has changed (e.g. updated content): + # Set to `true` to mark it unread, or `false` to leave it as-is. + 'mark_updated_article_unread' => false, + 'sort_order' => 'DESC', 'anon_access' => false, 'mark_when' => array ( -- cgit v1.2.3 From 256c8613a4046931dcd28ab22b6aebe8752a98c2 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 15 May 2015 03:21:36 +0200 Subject: First draft of PubSubHubbub https://github.com/FreshRSS/FreshRSS/issues/312 Requires setting base_url in config.php. Currently using the filesystem (no change to the database) --- app/Controllers/feedController.php | 55 +++++++++++------ app/Models/Feed.php | 69 ++++++++++++++++++++- constants.php | 1 + data/PubSubHubbub/feeds/.gitignore | 1 + data/PubSubHubbub/feeds/README.md | 12 ++++ data/PubSubHubbub/secrets/.gitignore | 1 + data/PubSubHubbub/secrets/README.md | 4 ++ data/config.default.php | 8 ++- lib/lib_rss.php | 9 +++ p/api/pshb.php | 116 +++++++++++++++++++++++++++++++++++ 10 files changed, 252 insertions(+), 24 deletions(-) create mode 100644 data/PubSubHubbub/feeds/.gitignore create mode 100644 data/PubSubHubbub/feeds/README.md create mode 100644 data/PubSubHubbub/secrets/.gitignore create mode 100644 data/PubSubHubbub/secrets/README.md create mode 100644 p/api/pshb.php (limited to 'data/config.default.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 0443b4159..9117da639 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -168,6 +168,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { // Ok, feed has been added in database. Now we have to refresh entries. $feed->_id($id); $feed->faviconPrepare(); + $feed->pubSubHubbubPrepare(); $is_read = FreshRSS_Context::$user_conf->mark_when['reception'] ? 1 : 0; @@ -261,12 +262,13 @@ class FreshRSS_feed_Controller extends Minz_ActionController { * This action actualizes entries from one or several feeds. * * Parameters are: - * - id (default: false) + * - id (default: false): Feed ID + * - url (default: false): Feed URL * - force (default: false) - * If id is not specified, all the feeds are actualized. But if force is + * If id and url are not specified, all the feeds are actualized. But if force is * false, process stops at 10 feeds to avoid time execution problem. */ - public function actualizeAction() { + public function actualizeAction($simplePie = null) { @set_time_limit(300); $feedDAO = FreshRSS_Factory::createFeedDao(); @@ -274,14 +276,15 @@ class FreshRSS_feed_Controller extends Minz_ActionController { Minz_Session::_param('actualize_feeds', false); $id = Minz_Request::param('id'); + $url = Minz_Request::param('url'); $force = Minz_Request::param('force'); // Create a list of feeds to actualize. // If id is set and valid, corresponding feed is added to the list but // alone in order to automatize further process. $feeds = array(); - if ($id) { - $feed = $feedDAO->searchById($id); + if ($id || $url) { + $feed = $id ? $feedDAO->searchById($id) : $feedDAO->searchByUrl($url); if ($feed) { $feeds[] = $feed; } @@ -302,8 +305,11 @@ class FreshRSS_feed_Controller extends Minz_ActionController { } try { - // Load entries - $feed->load(false); + if ($simplePie) { + $feed->loadEntries($simplePie); //Used by PubSubHubbub + } else { + $feed->load(false); + } } catch (FreshRSS_Feed_Exception $e) { Minz_Log::notice($e->getMessage()); $feedDAO->updateLastUpdate($feed->id(), true); @@ -404,7 +410,16 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $feedDAO->updateFeed($feed->id(), array('url' => $feed->url())); } - $feed->faviconPrepare(); + if ($simplePie === null) { + $feed->faviconPrepare(); + if ($feed->url() === 'http://push-pub.appspot.com/feed') { + $secret = $feed->pubSubHubbubPrepare(); + if ($secret != '') { + Minz_Log::debug('PubSubHubbub subscribe ' . $feed->url()); + $feed->pubSubHubbubSubscribe(true, $secret); + } + } + } $feed->unlock(); $updated_feeds++; unset($feed); @@ -427,20 +442,20 @@ class FreshRSS_feed_Controller extends Minz_ActionController { Minz_Session::_param('notification', $notif); // No layout in ajax request. $this->view->_useLayout(false); - return; - } - - // Redirect to the main page with correct notification. - if ($updated_feeds === 1) { - $feed = reset($feeds); - Minz_Request::good(_t('feedback.sub.feed.actualized', $feed->name()), array( - 'params' => array('get' => 'f_' . $feed->id()) - )); - } elseif ($updated_feeds > 1) { - Minz_Request::good(_t('feedback.sub.feed.n_actualized', $updated_feeds), array()); } else { - Minz_Request::good(_t('feedback.sub.feed.no_refresh'), array()); + // Redirect to the main page with correct notification. + if ($updated_feeds === 1) { + $feed = reset($feeds); + Minz_Request::good(_t('feedback.sub.feed.actualized', $feed->name()), array( + 'params' => array('get' => 'f_' . $feed->id()) + )); + } elseif ($updated_feeds > 1) { + Minz_Request::good(_t('feedback.sub.feed.n_actualized', $updated_feeds), array()); + } else { + Minz_Request::good(_t('feedback.sub.feed.no_refresh'), array()); + } } + return $updated_feeds; } /** diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 85fb173ec..dcf083ea8 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -19,6 +19,8 @@ class FreshRSS_Feed extends Minz_Model { private $ttl = -2; private $hash = null; private $lockPath = ''; + private $hubUrl = ''; + private $selfUrl = ''; public function __construct($url, $validate=true) { if ($validate) { @@ -226,6 +228,11 @@ class FreshRSS_Feed extends Minz_Model { throw new FreshRSS_Feed_Exception(($errorMessage == '' ? 'Feed error' : $errorMessage) . ' [' . $url . ']'); } + $links = $feed->get_links('self'); + $this->selfUrl = isset($links[0]) ? $links[0] : null; + $links = $feed->get_links('hub'); + $this->hubUrl = isset($links[0]) ? $links[0] : null; + if ($loadDetails) { // si on a utilisé l'auto-discover, notre url va avoir changé $subscribe_url = $feed->subscribe_url(false); @@ -259,7 +266,7 @@ class FreshRSS_Feed extends Minz_Model { } } - private function loadEntries($feed) { + public function loadEntries($feed) { $entries = array(); foreach ($feed->get_items() as $item) { @@ -333,4 +340,64 @@ class FreshRSS_Feed extends Minz_Model { function unlock() { @unlink($this->lockPath); } + + // + + function pubSubHubbubPrepare() { + $secret = ''; + if (FreshRSS_Context::$system_conf->base_url && $this->hubUrl && $this->selfUrl) { + $path = PSHB_PATH . '/feeds/' . base64url_encode($this->selfUrl); + if (!file_exists($path . '/hub.txt')) { + @mkdir($path, 0777, true); + file_put_contents($path . '/hub.txt', $this->hubUrl); + $secret = sha1(FreshRSS_Context::$system_conf->salt . uniqid(mt_rand(), true)); + file_put_contents($path . '/secret.txt', $secret); + @mkdir(PSHB_PATH . '/secrets/'); + file_put_contents(PSHB_PATH . '/secrets/' . $secret . '.txt', base64url_encode($this->selfUrl)); + Minz_Log::notice('PubSubHubbub prepared for ' . $this->url); + file_put_contents(USERS_PATH . '/_/log_pshb.txt', date('c') . "\t" . + 'PubSubHubbub prepared for ' . $this->url . "\n", FILE_APPEND); + } + $path .= '/' . base64url_encode($this->url); + $currentUser = Minz_Session::param('currentUser'); + if (ctype_alnum($currentUser) && !file_exists($path . '/' . $currentUser . '.txt')) { + @mkdir($path, 0777, true); + touch($path . '/' . $currentUser . '.txt'); + } + } + return $secret; + } + + //Parameter true to subscribe, false to unsubscribe. + function pubSubHubbubSubscribe($state, $secret = '') { + if (FreshRSS_Context::$system_conf->base_url && $this->hubUrl && $this->selfUrl) { + $callbackUrl = checkUrl(FreshRSS_Context::$system_conf->base_url . 'api/pshb.php?s=' . $secret); + if ($callbackUrl == '') { + return false; + } + + $ch = curl_init(); + curl_setopt_array($ch, array( + CURLOPT_URL => $this->hubUrl, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_USERAGENT => _t('gen.freshrss') . '/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ')', + CURLOPT_POSTFIELDS => 'hub.verify=sync' + . '&hub.mode=' . ($state ? 'subscribe' : 'unsubscribe') + . '&hub.topic=' . urlencode($this->selfUrl) + . '&hub.callback=' . urlencode($callbackUrl) + ) + ); + $response = curl_exec($ch); + $info = curl_getinfo($ch); + + file_put_contents(USERS_PATH . '/_/log_pshb.txt', date('c') . "\t" . + 'PubSubHubbub ' . ($state ? 'subscribe' : 'unsubscribe') . ' to ' . $this->selfUrl . + ' with callback ' . $callbackUrl . ': ' . $info['http_code'] . ' ' . $response . "\n", FILE_APPEND); + return substr($info['http_code'], 0, 1) == '2'; + } + return false; + } + + // } diff --git a/constants.php b/constants.php index b20bf0710..5bb410e29 100644 --- a/constants.php +++ b/constants.php @@ -18,6 +18,7 @@ define('FRESHRSS_PATH', dirname(__FILE__)); define('UPDATE_FILENAME', DATA_PATH . '/update.php'); define('USERS_PATH', DATA_PATH . '/users'); define('CACHE_PATH', DATA_PATH . '/cache'); + define('PSHB_PATH', DATA_PATH . '/PubSubHubbub'); define('LIB_PATH', FRESHRSS_PATH . '/lib'); define('APP_PATH', FRESHRSS_PATH . '/app'); diff --git a/data/PubSubHubbub/feeds/.gitignore b/data/PubSubHubbub/feeds/.gitignore new file mode 100644 index 000000000..150f68c80 --- /dev/null +++ b/data/PubSubHubbub/feeds/.gitignore @@ -0,0 +1 @@ +*/* diff --git a/data/PubSubHubbub/feeds/README.md b/data/PubSubHubbub/feeds/README.md new file mode 100644 index 000000000..15fa8e521 --- /dev/null +++ b/data/PubSubHubbub/feeds/README.md @@ -0,0 +1,12 @@ +List of canonical URLS of the various feeds users have subscribed to. +Several feeds can share the same canonical URL (rel="self"). +Several users can have subscribed to the same feed. + +* ./base64url(canonicalUrl)/ + * ./secret.txt + * ./base64url(feedUrl1)/ + * ./user1.txt + * ./user2.txt + * ./base64url(feedUrl2)/ + * ./user3.txt + * ./user4.txt diff --git a/data/PubSubHubbub/secrets/.gitignore b/data/PubSubHubbub/secrets/.gitignore new file mode 100644 index 000000000..2211df63d --- /dev/null +++ b/data/PubSubHubbub/secrets/.gitignore @@ -0,0 +1 @@ +*.txt diff --git a/data/PubSubHubbub/secrets/README.md b/data/PubSubHubbub/secrets/README.md new file mode 100644 index 000000000..ad8158839 --- /dev/null +++ b/data/PubSubHubbub/secrets/README.md @@ -0,0 +1,4 @@ +List of secrets given to PubSubHubbub hubs + +* ./sha1(random + salt).txt + * base64url(canonicalUrl) diff --git a/data/config.default.php b/data/config.default.php index 8be203d36..80d331df7 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -11,9 +11,11 @@ return array( # Used to make crypto more unique. Generated during install. 'salt' => '', - # Leave empty for most cases. - # Ability to override the address of the FreshRSS instance, - # used when building absolute URLs. + # Specify address of the FreshRSS instance, + # used when building absolute URLs, e.g. for PubSubHubbub. + # Examples: + # https://example.net/FreshRSS/p/ + # https://freshrss.example.net/ 'base_url' => '', # Natural language of the user interface, e.g. `en`, `fr`. diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 6342011c8..191a58f35 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -446,3 +446,12 @@ function array_push_unique(&$array, $value) { function array_remove(&$array, $value) { $array = array_diff($array, array($value)); } + +//RFC 4648 +function base64url_encode($data) { + return strtr(rtrim(base64_encode($data), '='), '+/', '-_'); +} +//RFC 4648 +function base64url_decode($data) { + return base64_decode(strtr($data, '-_', '+/')); +} diff --git a/p/api/pshb.php b/p/api/pshb.php new file mode 100644 index 000000000..bcb8341b1 --- /dev/null +++ b/p/api/pshb.php @@ -0,0 +1,116 @@ + $_GET, '_POST' => $_POST, 'INPUT' => $ORIGINAL_INPUT), true)); + +$secret = isset($_GET['s']) ? substr($_GET['s'], 0, 128) : ''; +if (!ctype_xdigit($secret)) { + header('HTTP/1.1 422 Unprocessable Entity'); + die('Invalid feed secret format!'); +} +chdir(PSHB_PATH); +$canonical64 = @file_get_contents('secrets/' . $secret . '.txt'); +if ($canonical64 === false) { + header('HTTP/1.1 404 Not Found'); + logMe('Feed secret not found!: ' . $secret); + die('Feed secret not found!'); +} +$canonical64 = trim($canonical64); +if (!preg_match('/^[A-Za-z0-9_-]+$/D', $canonical64)) { + header('HTTP/1.1 500 Internal Server Error'); + logMe('Invalid secret reference!: ' . $canonical64); + die('Invalid secret reference!'); +} +$secret2 = @file_get_contents('feeds/' . $canonical64 . '/secret.txt'); +if ($secret2 === false) { + header('HTTP/1.1 404 Not Found'); + //@unlink('secrets/' . $secret . '.txt'); + logMe('Feed reverse secret not found!: ' . $canonical64); + die('Feed reverse secret not found!'); +} +if ($secret !== $secret2) { + header('HTTP/1.1 500 Internal Server Error'); + logMe('Invalid secret cross-check!: ' . $secret); + die('Invalid secret cross-check!'); +} +chdir('feeds/' . $canonical64); +$users = glob('*/*.txt', GLOB_NOSORT); +if (empty($users)) { + header('HTTP/1.1 410 Gone'); + logMe('Nobody is subscribed to this feed anymore!: ' . $canonical64); + die('Nobody is subscribed to this feed anymore!'); +} + +if (!empty($_REQUEST['hub_mode']) && $_REQUEST['hub_mode'] === 'subscribe') { + //TODO: hub_lease_seconds + exit(isset($_REQUEST['hub_challenge']) ? $_REQUEST['hub_challenge'] : ''); +} + +Minz_Configuration::register('system', DATA_PATH . '/config.php', DATA_PATH . '/config.default.php'); +$system_conf = Minz_Configuration::get('system'); +$system_conf->auth_type = 'none'; // avoid necessity to be logged in (not saved!) +Minz_Translate::init('en'); +Minz_Request::_param('ajax', true); +$feedController = new FreshRSS_feed_Controller(); + +$simplePie = customSimplePie(); +$simplePie->set_raw_data($ORIGINAL_INPUT); +$simplePie->init(); +unset($ORIGINAL_INPUT); + +$links = $simplePie->get_links('self'); +$self = isset($links[0]) ? $links[0] : null; + +if ($self !== base64url_decode($canonical64)) { + header('HTTP/1.1 422 Unprocessable Entity'); + logMe('Self URL does not match registered canonical URL!: ' . $self); + die('Self URL does not match registered canonical URL!'); +} +Minz_Request::_param('url', $self); + +$nb = 0; +foreach ($users as $userLine) { + $userLine = strtr($userLine, '\\', '/'); + $userInfos = explode('/', $userLine); + $feedUrl = isset($userInfos[0]) ? base64url_decode($userInfos[0]) : ''; + $username = isset($userInfos[1]) ? basename($userInfos[1], '.txt') : ''; + if (!file_exists(USERS_PATH . '/' . $username . '/config.php')) { + break; + } + + try { + Minz_Session::_param('currentUser', $username); + Minz_Configuration::register('user', + join_path(USERS_PATH, $username, 'config.php'), + join_path(USERS_PATH, '_', 'config.default.php')); + FreshRSS_Context::init(); + if ($feedController->actualizeAction($simplePie) > 0) { + $nb++; + } + } catch (Exception $e) { + logMe($e->getMessage()); + } +} + +$simplePie->__destruct(); +unset($simplePie); + +if ($nb === 0) { + header('HTTP/1.1 410 Gone'); + logMe('Nobody is subscribed to this feed anymore after all!: ' . $self); + die('Nobody is subscribed to this feed anymore after all!'); +} + +logMe($self . ' done: ' . $nb); +exit('Done: ' . $nb . "\n"); -- cgit v1.2.3 From 568ab2313d5a922e06d7f0c33b3e39dd152d43db Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 3 Jun 2015 22:07:25 +0200 Subject: PDO options for e.g. SSL https://github.com/FreshRSS/FreshRSS/issues/868 --- data/config.default.php | 3 +++ lib/Minz/ModelPdo.php | 10 ++++------ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'data/config.default.php') diff --git a/data/config.default.php b/data/config.default.php index 80d331df7..7c179c8a0 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -99,6 +99,9 @@ return array( # MySQL table prefix. 'prefix' => '', + 'pdo_options' => array( + ), + ), # List of enabled FreshRSS extensions. diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index 3e8ec1f43..e82c1f30a 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -53,21 +53,19 @@ class Minz_ModelPdo { $this->current_user = $currentUser; self::$sharedCurrentUser = $currentUser; + $driver_options = is_array($conf->db['pdo_options']) ? $conf->db['pdo_options'] : array(); + try { $type = $db['type']; if ($type === 'mysql') { $string = 'mysql:host=' . $db['host'] . ';dbname=' . $db['base'] . ';charset=utf8'; - $driver_options = array( - PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', - ); + $driver_options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES utf8'; $this->prefix = $db['prefix'] . $currentUser . '_'; } elseif ($type === 'sqlite') { $string = 'sqlite:' . join_path(DATA_PATH, 'users', $currentUser, 'db.sqlite'); - $driver_options = array( - //PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - ); + //$driver_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION; $this->prefix = ''; } else { throw new Minz_PDOConnectionException( -- cgit v1.2.3 From 92db9202980ce63ad6f437416efd50c07792e7e8 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 5 Jun 2015 20:44:45 +0200 Subject: PDO option example --- app/install.php | 3 ++- data/config.default.php | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'data/config.default.php') diff --git a/app/install.php b/app/install.php index 3cdd59d11..313081c14 100644 --- a/app/install.php +++ b/app/install.php @@ -165,7 +165,7 @@ function saveStep3() { $_SESSION['bd_user'] = $_POST['user']; $_SESSION['bd_password'] = $_POST['pass']; $_SESSION['bd_prefix'] = substr($_POST['prefix'], 0, 16); - $_SESSION['bd_prefix_user'] = $_SESSION['bd_prefix'] .(empty($_SESSION['default_user']) ? '' :($_SESSION['default_user'] . '_')); + $_SESSION['bd_prefix_user'] = $_SESSION['bd_prefix'] . (empty($_SESSION['default_user']) ? '' : ($_SESSION['default_user'] . '_')); } //TODO: load `config.default.php` as default @@ -183,6 +183,7 @@ function saveStep3() { 'password' => $_SESSION['bd_password'], 'base' => $_SESSION['bd_base'], 'prefix' => $_SESSION['bd_prefix'], + 'pdo_options' => array(), ), ); diff --git a/data/config.default.php b/data/config.default.php index 7c179c8a0..97085df29 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -100,6 +100,9 @@ return array( 'prefix' => '', 'pdo_options' => array( + //PDO::MYSQL_ATTR_SSL_KEY => '/path/to/client-key.pem', + //PDO::MYSQL_ATTR_SSL_CERT => '/path/to/client-cert.pem', + //PDO::MYSQL_ATTR_SSL_CA => '/path/to/ca-cert.pem', ), ), -- cgit v1.2.3 From fa432755cc9d0cc71be54d463bdfb7558d62c5f1 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 12 Jul 2015 12:16:56 +0200 Subject: Implement cURL options https://github.com/FreshRSS/FreshRSS/issues/897 Requires that https://github.com/FreshRSS/FreshRSS/pull/898 is merged first. --- CHANGELOG.md | 2 ++ data/config.default.php | 19 +++++++++++++++++-- lib/SimplePie/SimplePie/File.php | 1 - lib/lib_rss.php | 1 + 4 files changed, 20 insertions(+), 3 deletions(-) (limited to 'data/config.default.php') diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ebfd50ac..23feda577 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,9 @@ * Features * Support for PubSubHubbub for instant notifications from compatible Web sites. [#312](https://github.com/FreshRSS/FreshRSS/issues/312) + * cURL options to use a proxy for retrieving feeds. [#897](https://github.com/FreshRSS/FreshRSS/issues/897) [#675](https://github.com/FreshRSS/FreshRSS/issues/675) * Security + * cURL options to verify or not SSL/TLS certificates (now enabled by default). [#897](https://github.com/FreshRSS/FreshRSS/issues/897) [#502](https://github.com/FreshRSS/FreshRSS/issues/502) * Support for SSL connection to MySQL. [#868](https://github.com/FreshRSS/FreshRSS/issues/868) * Workaround for browsers that have disabled support for `
`. [#880](https://github.com/FreshRSS/FreshRSS/issues/880) * UI diff --git a/data/config.default.php b/data/config.default.php index 97085df29..6a8300872 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -1,7 +1,7 @@ array( + # Options to disable SSL/TLS certificate check (e.g. for self-signed HTTPS) + //CURLOPT_SSL_VERIFYHOST => 0, + //CURLOPT_SSL_VERIFYPEER => false, + + # Options to use a proxy for retrieving feeds. + //CURLOPT_PROXYTYPE = CURLPROXY_HTTP, + //CURLOPT_PROXYAUTH = CURLAUTH_BASIC, + //CURLOPT_PROXY => '127.0.0.1', + //CURLOPT_PROXYPORT => 8080, + //CURLOPT_PROXYUSERPWD => 'user:password', + ), + 'db' => array( # Type of database: `sqlite` or `mysql`. diff --git a/lib/SimplePie/SimplePie/File.php b/lib/SimplePie/SimplePie/File.php index 1f9e3d502..90dac790a 100644 --- a/lib/SimplePie/SimplePie/File.php +++ b/lib/SimplePie/SimplePie/File.php @@ -113,7 +113,6 @@ class SimplePie_File curl_setopt($fp, CURLOPT_REFERER, $url); curl_setopt($fp, CURLOPT_USERAGENT, $useragent); curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2); - curl_setopt($fp, CURLOPT_SSL_VERIFYPEER, false); //FreshRSS if (!ini_get('open_basedir') && !ini_get('safe_mode') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>=')) { curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1); diff --git a/lib/lib_rss.php b/lib/lib_rss.php index c51b4e6de..0118e0f46 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -143,6 +143,7 @@ function customSimplePie() { $simplePie->set_cache_location(CACHE_PATH); $simplePie->set_cache_duration($limits['cache_duration']); $simplePie->set_timeout($limits['timeout']); + $simplePie->set_curl_options($system_conf->curl_options); $simplePie->strip_htmltags(array( 'base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', -- cgit v1.2.3 From 26ed0e5c9571dfdaac22f147bda793cc25c9e661 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 12 Jul 2015 12:52:18 +0200 Subject: Syntax error for curl optiona array https://github.com/FreshRSS/FreshRSS/issues/897 --- data/config.default.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/config.default.php') diff --git a/data/config.default.php b/data/config.default.php index 6a8300872..9a3ec87d7 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -87,10 +87,10 @@ return array( //CURLOPT_SSL_VERIFYPEER => false, # Options to use a proxy for retrieving feeds. - //CURLOPT_PROXYTYPE = CURLPROXY_HTTP, - //CURLOPT_PROXYAUTH = CURLAUTH_BASIC, + //CURLOPT_PROXYTYPE => CURLPROXY_HTTP, //CURLOPT_PROXY => '127.0.0.1', //CURLOPT_PROXYPORT => 8080, + //CURLOPT_PROXYAUTH => CURLAUTH_BASIC, //CURLOPT_PROXYUSERPWD => 'user:password', ), -- cgit v1.2.3 From d3a20cac129e63d57da27c16d5a11cc5db2a4db8 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Fri, 17 Jul 2015 18:16:00 +0200 Subject: Change default value for db['host'] and ['prefix'] See https://github.com/FreshRSS/FreshRSS/issues/890 --- data/config.default.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/config.default.php') diff --git a/data/config.default.php b/data/config.default.php index 9a3ec87d7..6013b13b8 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -100,7 +100,7 @@ return array( 'type' => 'sqlite', # MySQL host. - 'host' => '', + 'host' => 'localhost', # MySQL user. 'user' => '', @@ -112,7 +112,7 @@ return array( 'base' => '', # MySQL table prefix. - 'prefix' => '', + 'prefix' => 'freshrss_', 'pdo_options' => array( //PDO::MYSQL_ATTR_SSL_KEY => '/path/to/client-key.pem', -- cgit v1.2.3 From ac8bd3d2512dd1bfca43d71ea10202ba9e6a82a6 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Tue, 21 Jul 2015 15:31:23 +0200 Subject: Add a max_registrations limit - Allow user to create accounts (not implemented) - Admin only can set this limit See https://github.com/FreshRSS/FreshRSS/issues/679 --- app/Controllers/userController.php | 24 ++++++++++++++++++++++++ app/Models/ConfigurationSetter.php | 3 +++ app/views/user/manage.phtml | 19 +++++++++++++++++++ data/config.default.php | 4 ++++ 4 files changed, 50 insertions(+) (limited to 'data/config.default.php') diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index ed01b83c5..1c7745753 100644 --- a/app/Controllers/userController.php +++ b/app/Controllers/userController.php @@ -211,4 +211,28 @@ class FreshRSS_user_Controller extends Minz_ActionController { Minz_Request::forward(array('c' => 'user', 'a' => 'manage'), true); } + + /** + * This action updates the max number of registrations. + * + * Request parameter is: + * - max-registrations (int >= 0) + */ + public function setRegistrationAction() { + if (Minz_Request::isPost() && FreshRSS_Auth::hasAccess('admin')) { + $limits = FreshRSS_Context::$system_conf->limits; + $limits['max_registrations'] = Minz_Request::param('max-registrations', 1); + FreshRSS_Context::$system_conf->limits = $limits; + FreshRSS_Context::$system_conf->save(); + + invalidateHttpCache(); + + Minz_Session::_param('notification', array( + 'type' => 'good', + 'content' => _t('feedback.user.set_registration') + )); + } + + Minz_Request::forward(array('c' => 'user', 'a' => 'manage'), true); + } } diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php index 4bd29ecb0..236bf5b0b 100644 --- a/app/Models/ConfigurationSetter.php +++ b/app/Models/ConfigurationSetter.php @@ -352,6 +352,9 @@ class FreshRSS_ConfigurationSetter { 'min' => 0, 'max' => $max_small_int, ), + 'max_registrations' => array( + 'min' => 0, + ), ); foreach ($values as $key => $value) { diff --git a/app/views/user/manage.phtml b/app/views/user/manage.phtml index fe1b6618b..a7cbf0795 100644 --- a/app/views/user/manage.phtml +++ b/app/views/user/manage.phtml @@ -3,6 +3,25 @@
+ + + +
+ +
+ + +
+
+ +
+
+ + +
+
+ +
diff --git a/data/config.default.php b/data/config.default.php index 6013b13b8..5db933ff8 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -77,6 +77,10 @@ return array( # Max number of categories for a user. 'max_categories' => 16384, + # Max number of accounts that anonymous users can create + # 0 for an unlimited number of accounts + # 1 is to not allow user registrations (1 is corresponding to the admin account) + 'max_registrations' => 1, ), # Options used by cURL when making HTTP requests, e.g. when the SimplePie library retrieves feeds. -- cgit v1.2.3 From baa36f158b59c9229e3f1a5a0edb6f1bb3a54198 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 23 Jul 2015 13:54:34 +0200 Subject: Add pubsubhubbub_enabled to default configuration Rename enable_pubsubhubbub into pubsubhubbub_enabled See https://github.com/FreshRSS/FreshRSS/issues/865 --- app/install.php | 2 +- data/config.default.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'data/config.default.php') diff --git a/app/install.php b/app/install.php index 65138a683..5a774d7c1 100644 --- a/app/install.php +++ b/app/install.php @@ -229,7 +229,7 @@ function saveStep3() { 'prefix' => $_SESSION['bd_prefix'], 'pdo_options' => array(), ), - 'enable_pubsubhubbub' => server_is_public($base_url), + 'pubsubhubbub_enabled' => server_is_public($base_url), ); @unlink(join_path(DATA_PATH, 'config.php')); //To avoid access-rights problems diff --git a/data/config.default.php b/data/config.default.php index 5db933ff8..a7a29b12c 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -57,6 +57,10 @@ return array( # SimplePie, which is retrieving RSS feeds via HTTP requests. 'simplepie_syslog_enabled' => true, + # Enable or not support of PubSubHubbub. + # /!\ It should NOT be enabled if base_url is not reachable by an external server. + 'pubsubhubbub_enabled' => false, + 'limits' => array( # Duration in seconds of the SimplePie cache, -- cgit v1.2.3 From 02a3cb4652d4c87ec3202d39f6cd8a240a1a7373 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 24 Oct 2015 23:47:13 +0200 Subject: Config allow robots https://github.com/FreshRSS/FreshRSS/issues/938 --- app/Models/Context.php | 13 +++++++++++-- app/layout/layout.phtml | 4 ++++ data/config.default.php | 3 +++ index.html | 2 +- p/index.html | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) (limited to 'data/config.default.php') diff --git a/app/Models/Context.php b/app/Models/Context.php index dbdbfaa69..d8dd81e88 100644 --- a/app/Models/Context.php +++ b/app/Models/Context.php @@ -10,6 +10,7 @@ class FreshRSS_Context { public static $categories = array(); public static $name = ''; + public static $description = ''; public static $total_unread = 0; public static $total_starred = array( @@ -93,6 +94,13 @@ class FreshRSS_Context { } } + /** + * Return true iif the current requests target a feed and not a category or all articles. + */ + public static function isFeed() { + return self::$current_get['feed'] != false; + } + /** * Return true if $get parameter correspond to the $current_get attribute. */ @@ -146,8 +154,8 @@ class FreshRSS_Context { self::$state = self::$state | FreshRSS_Entry::STATE_FAVORITE; break; case 'f': - // We try to find the corresponding feed. - $feed = FreshRSS_CategoryDAO::findFeed(self::$categories, $id); + // We try to find the corresponding feed. When allowing robots, always retrieve the full feed including description + $feed = FreshRSS_Context::$system_conf->allow_robots ? null : FreshRSS_CategoryDAO::findFeed(self::$categories, $id); if ($feed === null) { $feedDAO = FreshRSS_Factory::createFeedDao(); $feed = $feedDAO->searchById($id); @@ -160,6 +168,7 @@ class FreshRSS_Context { self::$current_get['feed'] = $id; self::$current_get['category'] = $feed->category(); self::$name = $feed->name(); + self::$description = $feed->description(); self::$get_unread = $feed->nbNotRead(); break; case 'c': diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index 083ffd4b3..d7e9d115b 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -36,7 +36,11 @@ +allow_robots) { ?> + + + partial('header'); ?> diff --git a/data/config.default.php b/data/config.default.php index a7a29b12c..8eccee8a5 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -61,6 +61,9 @@ return array( # /!\ It should NOT be enabled if base_url is not reachable by an external server. 'pubsubhubbub_enabled' => false, + # Allow or not Web robots (e.g. search engines) in HTML headers. + 'allow_robots' => false, + 'limits' => array( # Duration in seconds of the SimplePie cache, diff --git a/index.html b/index.html index 6ac025960..5414211a1 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Redirection - + diff --git a/p/index.html b/p/index.html index 260f437bd..ef5cb87ce 100644 --- a/p/index.html +++ b/p/index.html @@ -8,7 +8,7 @@ - +