aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-05-26 09:46:12 +0200
committerGravatar GitHub <noreply@github.com> 2017-05-26 09:46:12 +0200
commitb3addb49dca4fc06d13d9c57617273fbcd4460da (patch)
tree8f9c22c6414d362ce9d7fbc8a2677192a6f1bfb1
parent431683eb3d118a1072999e899ab2faf3cf58a5e4 (diff)
parent99c7450343115ad9082cc0e1d12887633d99d935 (diff)
Merge pull request #1544 from Alkarex/update-status
Update status
-rw-r--r--CHANGELOG.md2
-rw-r--r--README.md1
-rw-r--r--app/Controllers/updateController.php30
-rw-r--r--app/i18n/cz/feedback.php2
-rw-r--r--app/i18n/de/feedback.php2
-rw-r--r--app/i18n/en/feedback.php2
-rw-r--r--app/i18n/fr/feedback.php2
-rw-r--r--app/i18n/it/feedback.php2
-rw-r--r--app/i18n/nl/feedback.php2
-rw-r--r--app/i18n/ru/feedback.php134
-rw-r--r--app/i18n/tr/feedback.php2
-rw-r--r--cli/README.md52
12 files changed, 145 insertions, 88 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 211947258..443f72272 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,8 @@
* Download icon đź’ľ for other MIME types (e.g. `application/*`) [#1522](https://github.com/FreshRSS/FreshRSS/pull/1522)
* I18n
* Improve English [#1465](https://github.com/FreshRSS/FreshRSS/pull/1465)
+* Security
+ * Do not require write access to check availability of new versions [#1450](https://github.com/FreshRSS/FreshRSS/issues/1450)
* Misc.
* Moved `./data/force-https.default.txt` to `./force-https.default.txt`,
`./data/config.default.php` to `./config.default.php`,
diff --git a/README.md b/README.md
index 8e0d8bac9..8b87ecb8f 100644
--- a/README.md
+++ b/README.md
@@ -105,6 +105,7 @@ cd /usr/share/FreshRSS
sudo git pull
sudo chown -R :www-data . && sudo chmod -R g+r . && sudo chmod -R g+w ./data/
```
+See more commands and git commands in the [Command-Line Interface documentation](./cli/README.md).
## Access control
It is needed for the multi-user mode to limit access to FreshRSS. You can:
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php
index 35c7d1124..7a8a3d6c0 100644
--- a/app/Controllers/updateController.php
+++ b/app/Controllers/updateController.php
@@ -59,24 +59,26 @@ class FreshRSS_update_Controller extends Minz_ActionController {
public function indexAction() {
Minz_View::prependTitle(_t('admin.update.title') . ' · ');
- if (!is_writable(FRESHRSS_PATH)) {
- $this->view->message = array(
- 'status' => 'bad',
- 'title' => _t('gen.short.damn'),
- 'body' => _t('feedback.update.file_is_nok', FRESHRSS_PATH)
- );
- } elseif (file_exists(UPDATE_FILENAME)) {
+ if (file_exists(UPDATE_FILENAME)) {
// There is an update file to apply!
$version = @file_get_contents(join_path(DATA_PATH, 'last_update.txt'));
- if (empty($version)) {
+ if ($version == '') {
$version = 'unknown';
}
- $this->view->update_to_apply = true;
- $this->view->message = array(
- 'status' => 'good',
- 'title' => _t('gen.short.ok'),
- 'body' => _t('feedback.update.can_apply', $version)
- );
+ if (is_writable(FRESHRSS_PATH)) {
+ $this->view->update_to_apply = true;
+ $this->view->message = array(
+ 'status' => 'good',
+ 'title' => _t('gen.short.ok'),
+ 'body' => _t('feedback.update.can_apply', $version),
+ );
+ } else {
+ $this->view->message = array(
+ 'status' => 'bad',
+ 'title' => _t('gen.short.damn'),
+ 'body' => _t('feedback.update.file_is_nok', $version, FRESHRSS_PATH),
+ );
+ }
}
}
diff --git a/app/i18n/cz/feedback.php b/app/i18n/cz/feedback.php
index f2bd87c77..f7b8d8c73 100644
--- a/app/i18n/cz/feedback.php
+++ b/app/i18n/cz/feedback.php
@@ -87,7 +87,7 @@ return array(
'update' => array(
'can_apply' => 'FreshRSS bude nyní upgradováno na <strong>verzi %s</strong>.',
'error' => 'Během upgrade došlo k chybě: %s',
- 'file_is_nok' => 'Zkontrolujte oprávnění adresáře <em>%s</em>. HTTP server musí mít do tohoto adresáře práva zápisu',
+ 'file_is_nok' => '<strong>Verzi %s</strong>. Zkontrolujte oprávnění adresáře <em>%s</em>. HTTP server musí mít do tohoto adresáře práva zápisu',
'finished' => 'Upgrade hotov!',
'none' => 'Novější verze není k dispozici',
'server_not_found' => 'Nelze nalézt server s instalačním souborem. [%s]',
diff --git a/app/i18n/de/feedback.php b/app/i18n/de/feedback.php
index 195083b36..e2e9a71ba 100644
--- a/app/i18n/de/feedback.php
+++ b/app/i18n/de/feedback.php
@@ -87,7 +87,7 @@ return array(
'update' => array(
'can_apply' => 'FreshRSS wird nun auf die <strong>Version %s</strong> aktualisiert.',
'error' => 'Der Aktualisierungsvorgang stieĂź auf einen Fehler: %s',
- 'file_is_nok' => 'ĂśberprĂĽfen Sie die Berechtigungen des Verzeichnisses <em>%s</em>. Der HTTP-Server muss Schreibrechte besitzen',
+ 'file_is_nok' => '<strong>Version %s</strong>. ĂśberprĂĽfen Sie die Berechtigungen des Verzeichnisses <em>%s</em>. Der HTTP-Server muss Schreibrechte besitzen',
'finished' => 'Aktualisierung abgeschlossen!',
'none' => 'Keine Aktualisierung zum Anwenden',
'server_not_found' => 'Der Aktualisierungs-Server kann nicht gefunden werden. [%s]',
diff --git a/app/i18n/en/feedback.php b/app/i18n/en/feedback.php
index 67c5fe97d..334d9a8f5 100644
--- a/app/i18n/en/feedback.php
+++ b/app/i18n/en/feedback.php
@@ -87,7 +87,7 @@ return array(
'update' => array(
'can_apply' => 'FreshRSS will now be updated to the <strong>version %s</strong>.',
'error' => 'The update process has encountered an error: %s',
- 'file_is_nok' => 'Check permissions on <em>%s</em> directory. HTTP server must have rights to write into',
+ 'file_is_nok' => 'New <strong>version %s</strong> available, but check permissions on <em>%s</em> directory. HTTP server must have rights to write into',
'finished' => 'Update completed!',
'none' => 'No update to apply',
'server_not_found' => 'Update server cannot be found. [%s]',
diff --git a/app/i18n/fr/feedback.php b/app/i18n/fr/feedback.php
index 5966fc3a7..aa19cd02b 100644
--- a/app/i18n/fr/feedback.php
+++ b/app/i18n/fr/feedback.php
@@ -87,7 +87,7 @@ return array(
'update' => array(
'can_apply' => 'FreshRSS va maintenant ĂŞtre mis Ă  jour vers la <strong>version %s</strong>.',
'error' => 'La mise à jour a rencontré un problème : %s',
- 'file_is_nok' => 'Veuillez vérifier les droits sur le répertoire <em>%s</em>. Le serveur HTTP doit être capable d’écrire dedans',
+ 'file_is_nok' => 'Nouvelle <strong>version %s</strong> disponible, mais veuillez vérifier les droits sur le répertoire <em>%s</em>. Le serveur HTTP doit être capable d’écrire dedans',
'finished' => 'La mise à jour est terminée !',
'none' => 'Aucune mise Ă  jour Ă  appliquer',
'server_not_found' => 'Le serveur de mise à jour n’a pas été trouvé. [%s]',
diff --git a/app/i18n/it/feedback.php b/app/i18n/it/feedback.php
index 5851cb2e6..8f3cf3ed6 100644
--- a/app/i18n/it/feedback.php
+++ b/app/i18n/it/feedback.php
@@ -87,7 +87,7 @@ return array(
'update' => array(
'can_apply' => 'FreshRSS verrĂ  aggiornato alla <strong>versione %s</strong>.',
'error' => 'Il processo di aggiornamento ha riscontrato il seguente errore: %s',
- 'file_is_nok' => 'Verifica i permessi della cartella <em>%s</em>. Il server HTTP deve avere i permessi per la scrittura ',
+ 'file_is_nok' => 'Nuova <strong>versione %s</strong>, ma verifica i permessi della cartella <em>%s</em>. Il server HTTP deve avere i permessi per la scrittura ',
'finished' => 'Aggiornamento completato con successo!',
'none' => 'Nessun aggiornamento disponibile',
'server_not_found' => 'Server per aggiornamento non disponibile. [%s]',
diff --git a/app/i18n/nl/feedback.php b/app/i18n/nl/feedback.php
index 386b8d415..3a064eb0a 100644
--- a/app/i18n/nl/feedback.php
+++ b/app/i18n/nl/feedback.php
@@ -87,7 +87,7 @@ return array(
'update' => array(
'can_apply' => 'FreshRSS word nu vernieud naar <strong>versie %s</strong>.',
'error' => 'Het vernieuwingsproces kwam een fout tegen: %s',
- 'file_is_nok' => 'Controleer permissies op <em>%s</em> map. HTTP server moet rechten hebben om er in te schrijven',
+ 'file_is_nok' => '<strong>Versie %s</strong>. Controleer permissies op <em>%s</em> map. HTTP server moet rechten hebben om er in te schrijven',
'finished' => 'Vernieuwing compleet!',
'none' => 'Geen vernieuwing om toe te passen',
'server_not_found' => 'Vernieuwings server kan niet worden gevonden. [%s]',
diff --git a/app/i18n/ru/feedback.php b/app/i18n/ru/feedback.php
index e7f6b9f85..ffebd6dc9 100644
--- a/app/i18n/ru/feedback.php
+++ b/app/i18n/ru/feedback.php
@@ -2,108 +2,108 @@
return array(
'admin' => array(
- 'optimization_complete' => 'Optimisation complete',
+ 'optimization_complete' => 'Optimisation complete', //TODO
),
'access' => array(
- 'denied' => 'You don’t have permission to access this page',
- 'not_found' => 'You are looking for a page which doesn’t exist',
+ 'denied' => 'You don’t have permission to access this page', //TODO
+ 'not_found' => 'You are looking for a page which doesn’t exist', //TODO
),
'auth' => array(
'form' => array(
- 'not_set' => 'A problem occured during authentication system configuration. Please retry later.',
- 'set' => 'Form is now your default authentication system.',
+ 'not_set' => 'A problem occured during authentication system configuration. Please retry later.', //TODO
+ 'set' => 'Form is now your default authentication system.', //TODO
),
'login' => array(
- 'invalid' => 'Login is invalid',
- 'success' => 'You are connected',
+ 'invalid' => 'Login is invalid', //TODO
+ 'success' => 'You are connected', //TODO
),
'logout' => array(
- 'success' => 'You are disconnected',
+ 'success' => 'You are disconnected', //TODO
),
- 'no_password_set' => 'Administrator password hasn’t been set. This feature isn’t available.',
+ 'no_password_set' => 'Administrator password hasn’t been set. This feature isn’t available.', //TODO
),
'conf' => array(
- 'error' => 'An error occurred during configuration saving',
- 'query_created' => 'Query "%s" has been created.',
- 'shortcuts_updated' => 'Shortcuts have been updated',
- 'updated' => 'Configuration has been updated',
+ 'error' => 'An error occurred during configuration saving', //TODO
+ 'query_created' => 'Query "%s" has been created.', //TODO
+ 'shortcuts_updated' => 'Shortcuts have been updated', //TODO
+ 'updated' => 'Configuration has been updated', //TODO
),
'extensions' => array(
- 'already_enabled' => '%s is already enabled',
+ 'already_enabled' => '%s is already enabled', //TODO
'disable' => array(
- 'ko' => '%s cannot be disabled. <a href="%s">Check FressRSS logs</a> for details.',
- 'ok' => '%s is now disabled',
+ 'ko' => '%s cannot be disabled. <a href="%s">Check FressRSS logs</a> for details.', //TODO
+ 'ok' => '%s is now disabled', //TODO
),
'enable' => array(
- 'ko' => '%s cannot be enabled. <a href="%s">Check FressRSS logs</a> for details.',
- 'ok' => '%s is now enabled',
+ 'ko' => '%s cannot be enabled. <a href="%s">Check FressRSS logs</a> for details.', //TODO
+ 'ok' => '%s is now enabled', //TODO
),
- 'no_access' => 'You have no access on %s',
- 'not_enabled' => '%s is not enabled yet',
- 'not_found' => '%s does not exist',
+ 'no_access' => 'You have no access on %s', //TODO
+ 'not_enabled' => '%s is not enabled yet', //TODO
+ 'not_found' => '%s does not exist', //TODO
),
'import_export' => array(
- 'export_no_zip_extension' => 'ZIP extension is not present on your server. Please try to export files one by one.',
- 'feeds_imported' => 'Your feeds have been imported and will now be updated',
- 'feeds_imported_with_errors' => 'Your feeds have been imported but some errors occurred',
- 'file_cannot_be_uploaded' => 'File cannot be uploaded!',
- 'no_zip_extension' => 'ZIP extension is not present on your server.',
- 'zip_error' => 'An error occured during ZIP import.',
+ 'export_no_zip_extension' => 'ZIP extension is not present on your server. Please try to export files one by one.', //TODO
+ 'feeds_imported' => 'Your feeds have been imported and will now be updated', //TODO
+ 'feeds_imported_with_errors' => 'Your feeds have been imported but some errors occurred', //TODO
+ 'file_cannot_be_uploaded' => 'File cannot be uploaded!', //TODO
+ 'no_zip_extension' => 'ZIP extension is not present on your server.', //TODO
+ 'zip_error' => 'An error occured during ZIP import.', //TODO
),
'sub' => array(
- 'actualize' => 'Actualise',
+ 'actualize' => 'Actualise', //TODO
'category' => array(
- 'created' => 'Category %s has been created.',
- 'deleted' => 'Category has been deleted.',
- 'emptied' => 'Category has been emptied',
- 'error' => 'Category cannot be updated',
- 'name_exists' => 'Category name already exists.',
- 'no_id' => 'You must precise the id of the category.',
- 'no_name' => 'Category name cannot be empty.',
- 'not_delete_default' => 'You cannot delete the default category!',
- 'not_exist' => 'The category does not exist!',
- 'over_max' => 'You have reached your limit of categories (%d)',
- 'updated' => 'Category has been updated.',
+ 'created' => 'Category %s has been created.', //TODO
+ 'deleted' => 'Category has been deleted.', //TODO
+ 'emptied' => 'Category has been emptied', //TODO
+ 'error' => 'Category cannot be updated', //TODO
+ 'name_exists' => 'Category name already exists.', //TODO
+ 'no_id' => 'You must precise the id of the category.', //TODO
+ 'no_name' => 'Category name cannot be empty.', //TODO
+ 'not_delete_default' => 'You cannot delete the default category!', //TODO
+ 'not_exist' => 'The category does not exist!', //TODO
+ 'over_max' => 'You have reached your limit of categories (%d)', //TODO
+ 'updated' => 'Category has been updated.', //TODO
),
'feed' => array(
- 'actualized' => '<em>%s</em> has been updated',
- 'actualizeds' => 'RSS feeds have been updated',
- 'added' => 'RSS feed <em>%s</em> has been added',
- 'already_subscribed' => 'You have already subscribed to <em>%s</em>',
- 'deleted' => 'Feed has been deleted',
- 'error' => 'Feed cannot be updated',
- 'internal_problem' => 'The RSS feed could not be added. <a href="%s">Check FressRSS logs</a> for details.',
- 'invalid_url' => 'URL <em>%s</em> is invalid',
- 'marked_read' => 'Feeds have been marked as read',
- 'n_actualized' => '%d feeds have been updated',
- 'n_entries_deleted' => '%d articles have been deleted',
- 'no_refresh' => 'There is no feed to refresh…',
- 'not_added' => '<em>%s</em> could not be added',
- 'over_max' => 'You have reached your limit of feeds (%d)',
- 'updated' => 'Feed has been updated',
+ 'actualized' => '<em>%s</em> has been updated', //TODO
+ 'actualizeds' => 'RSS feeds have been updated', //TODO
+ 'added' => 'RSS feed <em>%s</em> has been added', //TODO
+ 'already_subscribed' => 'You have already subscribed to <em>%s</em>', //TODO
+ 'deleted' => 'Feed has been deleted', //TODO
+ 'error' => 'Feed cannot be updated', //TODO
+ 'internal_problem' => 'The RSS feed could not be added. <a href="%s">Check FressRSS logs</a> for details.', //TODO
+ 'invalid_url' => 'URL <em>%s</em> is invalid', //TODO
+ 'marked_read' => 'Feeds have been marked as read', //TODO
+ 'n_actualized' => '%d feeds have been updated', //TODO
+ 'n_entries_deleted' => '%d articles have been deleted', //TODO
+ 'no_refresh' => 'There is no feed to refresh…', //TODO
+ 'not_added' => '<em>%s</em> could not be added', //TODO
+ 'over_max' => 'You have reached your limit of feeds (%d)', //TODO
+ 'updated' => 'Feed has been updated', //TODO
),
- 'purge_completed' => 'Purge completed (%d articles deleted)',
+ 'purge_completed' => 'Purge completed (%d articles deleted)', //TODO
),
'update' => array(
- 'can_apply' => 'FreshRSS will now be updated to the <strong>version %s</strong>.',
- 'error' => 'The update process has encountered an error: %s',
- 'file_is_nok' => 'Check permissions on <em>%s</em> directory. HTTP server must have rights to write into',
- 'finished' => 'Update completed!',
- 'none' => 'No update to apply',
- 'server_not_found' => 'Update server cannot be found. [%s]',
+ 'can_apply' => 'FreshRSS will now be updated to the <strong>version %s</strong>.', //TODO
+ 'error' => 'The update process has encountered an error: %s', //TODO
+ 'file_is_nok' => 'New <strong>version %s</strong> available, but check permissions on <em>%s</em> directory. HTTP server must have rights to write into', //TODO
+ 'finished' => 'Update completed!', //TODO
+ 'none' => 'No update to apply', //TODO
+ 'server_not_found' => 'Update server cannot be found. [%s]', //TODO
),
'user' => array(
'created' => array(
- '_' => 'User %s has been created',
- 'error' => 'User %s cannot be created',
+ '_' => 'User %s has been created', //TODO
+ 'error' => 'User %s cannot be created', //TODO
),
'deleted' => array(
- '_' => 'User %s has been deleted',
- 'error' => 'User %s cannot be deleted',
+ '_' => 'User %s has been deleted', //TODO
+ 'error' => 'User %s cannot be deleted', //TODO
),
),
'profile' => array(
- 'error' => 'Your profile cannot be modified',
- 'updated' => 'Your profile has been modified',
+ 'error' => 'Your profile cannot be modified', //TODO
+ 'updated' => 'Your profile has been modified', //TODO
),
);
diff --git a/app/i18n/tr/feedback.php b/app/i18n/tr/feedback.php
index 87361ff51..be79630be 100644
--- a/app/i18n/tr/feedback.php
+++ b/app/i18n/tr/feedback.php
@@ -87,7 +87,7 @@ return array(
'update' => array(
'can_apply' => 'FreshRSS <strong>%s versiyonuna</strong> gĂĽncellenecek.',
'error' => 'Güncelleme işlemi sırasında hata: %s',
- 'file_is_nok' => '<em>%s</em> klasör yetkisini kontrol edin. HTTP yazma yetkisi olmalı',
+ 'file_is_nok' => '<strong>%s versiyonuna</strong>. <em>%s</em> klasör yetkisini kontrol edin. HTTP yazma yetkisi olmalı',
'finished' => 'Güncelleme tamamlandı!',
'none' => 'GĂĽncelleme yok',
'server_not_found' => 'Güncelleme sunucusu bulunamadı. [%s]',
diff --git a/cli/README.md b/cli/README.md
index 0123e8d6e..1ac8c95ce 100644
--- a/cli/README.md
+++ b/cli/README.md
@@ -89,3 +89,55 @@ Example to get the number of feeds of a given user:
```sh
./cli/user-info.php --user alex | cut -f6
```
+
+
+# Install and updates
+
+## Using git
+
+If you manage FreshRSS via command line, then installing and updating FreshRSS can be done via git:
+
+```sh
+# If your local user does not have write access, prefix all commands by sudo:
+sudo ...
+
+# Install FreshRSS
+cd /usr/share/
+git clone https://github.com/FreshRSS/FreshRSS.git
+
+# Perform all commands below in your FreshRSS directory:
+cd /usr/share/FreshRSS
+
+# Use the development version of FreshRSS
+git checkout -b dev origin/dev
+
+# Check out a specific version of FreshRSS
+# See release names on https://github.com/FreshRSS/FreshRSS/releases
+# You will then need to manually change version
+# or checkout master or dev branch to get new versions
+git checkout 1.7.0
+
+# Verify what branch is used
+git branch
+
+# Check whether there is a new version of FreshRSS,
+# assuming you are on the /master or /dev branch
+git fetch --all
+git status
+
+# Discard manual changes (do a backup before)
+git reset --hard
+# Then re-delete the file forcing the setup wizard
+rm data/do-install.txt
+
+# Delete manual additions (do a backup before)
+git clean -f -d
+
+# Update to a newer version of FreshRSS,
+# assuming you are on the /master or /dev branch
+git pull
+
+# Set the rights so that your Web server can access the files
+# (Example for Debian / Ubuntu)
+chown -R :www-data . && chmod -R g+r . && chmod -R g+w ./data/
+```