From 445e8d2a69ec78946a8e20704bfa1be1db07619b Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 2 Mar 2019 12:17:15 +0100 Subject: [PATCH 1/5] Upgrade to upstream version 15.0.5 --- README.md | 2 +- manifest.json | 2 +- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 865fc0c..728a8a9 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Nextcloud for YunoHost own data. A personal cloud which run on your own server. With Nextcloud you can synchronize your files over your devices. -**Shipped version:** 15.0.4 +**Shipped version:** 15.0.5 [![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=nextcloud) ![](https://raw.githubusercontent.com/nextcloud/screenshots/master/files/Files%20Overview.png) diff --git a/manifest.json b/manifest.json index 43bf976..77642da 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Access & share your files, calendars, contacts, mail & more from any device, on your terms", "fr": "Consultez et partagez vos fichiers, agendas, carnets d'adresses, emails et bien plus depuis les appareils de votre choix, sous vos conditions" }, - "version": "15.0.4~ynh1", + "version": "15.0.5~ynh1", "url": "https://nextcloud.com", "license": "AGPL-3.0", "maintainer": { diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 80d65dd..e66bb23 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,10 +1,10 @@ #!/bin/bash # Last available nextcloud version -next_version="15.0.4" +next_version="15.0.5" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="f87db047c174f563e391a22c959d9ace767ca14ef0f97fc394f3061fc63d8f77" +nextcloud_source_sha256="4661869b797a340cd967abb3dbe6931b375434e0a44480346a27ccd73250b988" # This function will only be executed upon applying the last upgrade referenced above last_upgrade_operations () { From 3dd34327ca32b7c962dd8c5869d900b0fca8aa29 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 2 Mar 2019 12:18:33 +0100 Subject: [PATCH 2/5] Update nginx configuration to latest Nextcloud recommendations --- conf/nginx.conf | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 2e085c9..7cdfd8f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -13,7 +13,7 @@ location ^~ __PATH__ { } # Add headers to serve security related headers - more_set_headers "Strict-Transport-Security: max-age=15768000"; + more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;"; more_set_headers "X-Content-Type-Options: nosniff"; more_set_headers "X-XSS-Protection: 1; mode=block"; more_set_headers "X-Robots-Tag: none"; @@ -59,9 +59,9 @@ location ^~ __PATH__ { deny all; } - location ~ ^__PATH__/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) { + location ~ ^__PATH__/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|ocm-provider/.+)\.php(/.*|)$ { include fastcgi_params; - fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_split_path_info ^(.+\.php)(/.*|)$; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTPS on; @@ -71,14 +71,15 @@ location ^~ __PATH__ { fastcgi_intercept_errors on; } - location ~ ^__PATH__/(?:updater|ocs-provider)(?:$|/) { + location ~ ^__PATH__/(?:updater|ocs-provider|ocm-provider)(?:$|/) { try_files $uri/ =404; index index.php; } # Adding the cache control header for js and css files - location ~* \.(?:css|js)$ { - more_set_headers "Cache-Control: public, max-age=7200"; + location ~ ^__PATH__/.+[^/]\.(?:css|js|woff2?|svg|gif)$ { + try_files $uri __PATH__/index.php$request_uri; + more_set_headers "Cache-Control: public, max-age=15778463"; # Add headers to serve security related headers more_set_headers "Strict-Transport-Security: max-age=15768000"; more_set_headers "X-Content-Type-Options: nosniff"; @@ -92,7 +93,7 @@ location ^~ __PATH__ { access_log off; } - location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ { + location ~* \.(?:png|html|ttf|ico|jpg|jpeg)$ { # Optional: Don't log access to other assets access_log off; } From b7e16f813971dfcba932ab2c8608d2b00976e99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Martin?= Date: Thu, 7 Mar 2019 10:16:56 +0100 Subject: [PATCH 3/5] change server name in notify --- scripts/install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/install b/scripts/install index 5bc37bf..cc61767 100755 --- a/scripts/install +++ b/scripts/install @@ -205,6 +205,11 @@ exec_occ config:system:get logout_url >/dev/null 2>&1 \ //-YunoHost- " >> "${final_path}/config/config.php" +#================================================= +# CHANGE HOSTNAME FOR ACTIVITY NOTIFICATIONS +#================================================= +ynh_replace_string "'overwrite.cli.url' => 'http://localhost'," "'overwrite.cli.url' => 'https://${domain}'," "${final_path}/config/config.php" + #================================================= # REMOVE THE TEMPORARY ADMIN AND SET THE TRUE ONE #================================================= From 46c496c6de9a13cc5f1cefbb9bad0197d71db13e Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 7 Mar 2019 11:51:14 +0100 Subject: [PATCH 4/5] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index cc61767..a2fc1d9 100755 --- a/scripts/install +++ b/scripts/install @@ -208,6 +208,7 @@ exec_occ config:system:get logout_url >/dev/null 2>&1 \ #================================================= # CHANGE HOSTNAME FOR ACTIVITY NOTIFICATIONS #================================================= + ynh_replace_string "'overwrite.cli.url' => 'http://localhost'," "'overwrite.cli.url' => 'https://${domain}'," "${final_path}/config/config.php" #================================================= From ee0d5457a19d37b15f0640ba27123b4ebb54e9c3 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 7 Mar 2019 11:55:02 +0100 Subject: [PATCH 5/5] Modify upgrade script as well --- scripts/upgrade | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index d58f4b0..c56fc18 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -265,6 +265,12 @@ exec_occ config:system:get logout_url >/dev/null 2>&1 \ //-YunoHost- " >> "${final_path}/config/config.php" +#================================================= +# CHANGE HOSTNAME FOR ACTIVITY NOTIFICATIONS +#================================================= + +ynh_replace_string "'overwrite.cli.url' => 'http://localhost'," "'overwrite.cli.url' => 'https://${domain}'," "${final_path}/config/config.php" + #================================================= # MOUNT HOME FOLDERS AS EXTERNAL STORAGE #=================================================