diff --git a/CHANGELOG.md b/CHANGELOG.md index 382e8b098..52659a5dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # FreshRSS changelog +## 2019-11-22 FreshRSS 1.15.3 + +* Bug fixing (regressions from 1.15.x) + * Fix adding categories in MySQL 5.5 [#2670](https://github.com/FreshRSS/FreshRSS/issues/2670) + * Fix saving sharing integrations [#2669](https://github.com/FreshRSS/FreshRSS/pull/2669) +* Compatibility + * Add fallback for systems with old ICU < 4.6 (*International Components for Unicode*) [#2680](https://github.com/FreshRSS/FreshRSS/pull/2680) +* API + * Do not obey `rel=self` feed redirections when WebSub is disabled [#2659](https://github.com/FreshRSS/FreshRSS/pull/2659) +* UI + * Start adding support for RTL (*right-to-left*) languages [#2656](https://github.com/FreshRSS/FreshRSS/pull/2656) +* Deployment + * Docker: Ubuntu image updated to PHP 7.3.11 +* Misc. + * Add more log when errors occur when saving a profile [#2663](https://github.com/FreshRSS/FreshRSS/issues/2663) + * Improve Makefile with port override [#2660](https://github.com/FreshRSS/FreshRSS/pull/2660) + * Update a few external links to HTTPS [#2662](https://github.com/FreshRSS/FreshRSS/pull/2662) + + ## 2019-11-12 FreshRSS 1.15.2 * Bug fixing (regressions from 1.15.x) diff --git a/Makefile b/Makefile index 7239775f6..2d11116b7 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ ifndef TAG TAG=dev-alpine endif +PORT ?= 8080 + ifeq ($(findstring alpine,$(TAG)),alpine) DOCKERFILE=Dockerfile-Alpine else ifeq ($(findstring arm,$(TAG)),arm) @@ -24,7 +26,7 @@ start: ## Start the development environment (use Docker) docker run \ --rm \ -v $(shell pwd):/var/www/FreshRSS:z \ - -p 8080:80 \ + -p $(PORT):80 \ -e FRESHRSS_ENV=development \ --name freshrss-dev \ freshrss/freshrss:$(TAG) diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index aabeb80ff..3eb2316b8 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -415,8 +415,8 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $entryDAO->commit(); } - if ($feed->hubUrl() && $feed->selfUrl()) { //selfUrl has priority for WebSub - if ($feed->selfUrl() !== $url) { //https://code.google.com/p/pubsubhubbub/wiki/MovingFeedsOrChangingHubs + if ($pubSubHubbubEnabled && $feed->hubUrl() && $feed->selfUrl()) { //selfUrl has priority for WebSub + if ($feed->selfUrl() !== $url) { // https://github.com/pubsubhubbub/PubSubHubbub/wiki/Moving-Feeds-or-changing-Hubs $selfUrl = checkUrl($feed->selfUrl()); if ($selfUrl) { Minz_Log::debug('WebSub unsubscribe ' . $feed->url(false)); diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index 7ce6b298a..5209edc84 100644 --- a/app/Controllers/userController.php +++ b/app/Controllers/userController.php @@ -59,14 +59,22 @@ class FreshRSS_user_Controller extends Minz_ActionController { $apiPasswordHash = self::hashPassword($apiPasswordPlain); $userConfig->apiPasswordHash = $apiPasswordHash; - @mkdir(DATA_PATH . '/fever/', 0770, true); - self::deleteFeverKey($user); - $userConfig->feverKey = strtolower(md5($user . ':' . $apiPasswordPlain)); - $ok = file_put_contents(DATA_PATH . '/fever/.key-' . sha1(FreshRSS_Context::$system_conf->salt) . '-' . $userConfig->feverKey . '.txt', $user) !== false; + $feverPath = DATA_PATH . '/fever/'; - if (!$ok) { - Minz_Log::warning('Could not save API credentials for fever API', ADMIN_LOG); - return $ok; + if (!file_exists($feverPath)) { + @mkdir($feverPath, 0770, true); + } + + if (!is_writable($feverPath)) { + Minz_Log::error("Could not save Fever API credentials. The directory does not have write access."); + } else { + self::deleteFeverKey($user); + $userConfig->feverKey = strtolower(md5("{$user}:{$apiPasswordPlain}")); + $ok = file_put_contents($feverPath . '.key-' . sha1(FreshRSS_Context::$system_conf->salt) . '-' . $userConfig->feverKey . '.txt', $user) !== false; + + if (!$ok) { + Minz_Log::warning('Could not save Fever API credentials. Unknown error.', ADMIN_LOG); + } } } diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index 08dc4eef0..4bba23d9c 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -81,7 +81,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable public function addCategory($valuesTmp) { $sql = 'INSERT INTO `_category`(name, attributes) ' - . 'SELECT * FROM (SELECT TRIM(?), ?) c2 ' //TRIM() to provide a type hint as text for PostgreSQL + . 'SELECT * FROM (SELECT TRIM(?) AS name, TRIM(?) AS attributes) c2 ' //TRIM() to provide a type hint as text . 'WHERE NOT EXISTS (SELECT 1 FROM `_tag` WHERE name = TRIM(?))'; //No tag of the same name $stm = $this->pdo->prepare($sql); diff --git a/app/Models/TagDAO.php b/app/Models/TagDAO.php index 5882eee76..09397c6a1 100644 --- a/app/Models/TagDAO.php +++ b/app/Models/TagDAO.php @@ -106,9 +106,9 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function updateTagAttribute($tag, $key, $value) { if ($tag instanceof FreshRSS_Tag) { $tag->_attributes($key, $value); - return $this->updateFeed( + return $this->updateTag( $tag->id(), - array('attributes' => $feed->attributes()) + [ 'attributes' => $tag->attributes() ] ); } return false; diff --git a/app/views/configure/integration.phtml b/app/views/configure/integration.phtml index 32ef11716..9c83a5dc7 100644 --- a/app/views/configure/integration.phtml +++ b/app/views/configure/integration.phtml @@ -3,7 +3,7 @@
' diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml index e39f45a86..9cfe024fc 100644 --- a/app/views/feed/add.phtml +++ b/app/views/feed/add.phtml @@ -42,7 +42,7 @@ = _i('link') ?> - = _t('sub.feed.validator') ?> + = _t('sub.feed.validator') ?>