1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Merge pull request #81 from YunoHost-Apps/testing

Testing
This commit is contained in:
frju365 2018-02-16 11:39:28 +01:00 committed by GitHub
commit 962cc61ec8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 111 additions and 84 deletions

View file

@ -5,7 +5,7 @@ Nextcloud for YunoHost
own data. A personal cloud which run on your own server. With Nextcloud own data. A personal cloud which run on your own server. With Nextcloud
you can synchronize your files over your devices. you can synchronize your files over your devices.
**Shipped version:** 12.0.4 **Shipped version:** 12.0.5
[![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=nextcloud) [![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=nextcloud)
![](https://github.com/nextcloud/screenshots/blob/master/files/filelist.png) ![](https://github.com/nextcloud/screenshots/blob/master/files/filelist.png)

View file

@ -1,38 +1,41 @@
{ {
"system": { "system": {
"datadirectory": "#DATADIR#", "updatechecker": false,
"trusted_domains": [ "memcache.local": "\\OC\\Memcache\\APCu",
"localhost", "integrity.check.disabled": true,
"#DOMAIN#" "filelocking.enabled": true,
], "memcache.locking": "\\OC\\Memcache\\Redis",
"updatechecker": false, "redis": {
"memcache.local": "\\OC\\Memcache\\APCu", "host": "localhost",
"integrity.check.disabled": true "port": "6379",
}, "timeout": "0.0",
"apps": { "password": ""
"user_ldap": { }
"ldap_base": "dc=yunohost,dc=org", },
"ldap_base_groups": "ou=groups,dc=yunohost,dc=org", "apps": {
"ldap_base_users": "ou=users,dc=yunohost,dc=org", "user_ldap": {
"ldap_cache_ttl": "600", "ldap_base": "dc=yunohost,dc=org",
"ldap_configuration_active": "1", "ldap_base_groups": "ou=groups,dc=yunohost,dc=org",
"ldap_display_name": "displayname", "ldap_base_users": "ou=users,dc=yunohost,dc=org",
"ldap_email_attr": "mail", "ldap_cache_ttl": "600",
"ldap_expert_username_attr": "uid", "ldap_configuration_active": "1",
"ldap_group_display_name": "cn", "ldap_display_name": "displayname",
"ldap_group_filter": "objectClass=posixGroup", "ldap_email_attr": "mail",
"ldap_group_filter_mode": "0", "ldap_expert_username_attr": "uid",
"ldap_groupfilter_objectclass": "posixGroup", "ldap_group_display_name": "cn",
"ldap_host": "localhost", "ldap_group_filter": "objectClass=posixGroup",
"ldap_login_filter": "(&(|(objectclass=posixAccount))(uid=%uid))", "ldap_group_filter_mode": "0",
"ldap_login_filter_mode": "0", "ldap_groupfilter_objectclass": "posixGroup",
"ldap_port": "389", "ldap_host": "localhost",
"ldap_quota_attr": "userquota", "ldap_login_filter": "(&(|(objectclass=posixAccount))(uid=%uid))",
"ldap_tls": "0", "ldap_login_filter_mode": "0",
"ldap_user_display_name": "cn", "ldap_port": "389",
"ldap_user_filter_mode": "0", "ldap_quota_attr": "userquota",
"ldap_userfilter_objectclass": "posixAccount", "ldap_tls": "0",
"ldap_userlist_filter": "objectclass=posixAccount" "ldap_user_display_name": "cn",
} "ldap_user_filter_mode": "0",
} "ldap_userfilter_objectclass": "posixAccount",
} "ldap_userlist_filter": "objectclass=posixAccount"
}
}
}

9
conf/config_install.json Normal file
View file

@ -0,0 +1,9 @@
{
"system": {
"datadirectory": "#DATADIR#",
"trusted_domains": [
"localhost",
"#DOMAIN#"
]
}
}

View file

@ -23,7 +23,12 @@ location ^~ __PATH__ {
# Set max upload size # Set max upload size
client_max_body_size 10G; client_max_body_size 10G;
fastcgi_buffers 64 4K; fastcgi_buffers 64 4K;
# Extend timeouts
client_body_timeout 60m;
proxy_read_timeout 60m;
fastcgi_read_timeout 60m;
# Disable gzip to avoid the removal of the ETag header # Disable gzip to avoid the removal of the ETag header
gzip off; gzip off;

View file

@ -6,7 +6,7 @@
"en": "Access & share your files, calendars, contacts, mail & more from any device, on your terms", "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" "fr": "Consultez et partagez vos fichiers, agendas, carnets d'adresses, emails et bien plus depuis les appareils de votre choix, sous vos conditions"
}, },
"version": "12.0.4-1", "version": "12.0.5-1",
"url": "https://nextcloud.com", "url": "https://nextcloud.com",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"maintainer": { "maintainer": {

View file

@ -3,7 +3,7 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
pkg_dependencies="php5-gd php5-json php5-intl php5-mcrypt php5-curl php5-apcu php5-imagick acl tar smbclient" pkg_dependencies="php5-gd php5-json php5-intl php5-mcrypt php5-curl php5-apcu php5-redis php5-imagick imagemagick acl tar smbclient"
#================================================= #=================================================
# COMMON HELPERS # COMMON HELPERS

View file

@ -144,11 +144,6 @@ exec_occ maintenance:install \
# CONFIGURE NEXTCLOUD # CONFIGURE NEXTCLOUD
#================================================= #=================================================
nc_conf="${final_path}/config.json"
cp ../conf/config.json "$nc_conf"
ynh_replace_string "#DOMAIN#" "$domain" "$nc_conf"
ynh_replace_string "#DATADIR#" "$datadir" "$nc_conf"
# Ensure that UpdateNotification app is disabled # Ensure that UpdateNotification app is disabled
exec_occ app:disable updatenotification exec_occ app:disable updatenotification
@ -156,7 +151,18 @@ exec_occ app:disable updatenotification
exec_occ app:enable user_ldap exec_occ app:enable user_ldap
exec_occ ldap:create-empty-config exec_occ ldap:create-empty-config
# Load the config file in nextcloud # Load the installation config file in nextcloud
nc_conf="${final_path}/config_install.json"
cp ../conf/config_install.json "$nc_conf"
ynh_replace_string "#DOMAIN#" "$domain" "$nc_conf"
ynh_replace_string "#DATADIR#" "$datadir" "$nc_conf"
exec_occ config:import "$nc_conf"
# Then remove it
rm -f "$nc_conf"
# Load the additional config file (used also for upgrade)
nc_conf="${final_path}/config_install.json"
cp ../conf/config.json "$nc_conf"
exec_occ config:import "$nc_conf" exec_occ config:import "$nc_conf"
# Then remove it # Then remove it
rm -f "$nc_conf" rm -f "$nc_conf"
@ -216,6 +222,8 @@ ynh_store_file_checksum "${final_path}/config/config.php"
cron_path="/etc/cron.d/$app" cron_path="/etc/cron.d/$app"
cp -a ../conf/nextcloud.cron "$cron_path" cp -a ../conf/nextcloud.cron "$cron_path"
chown root: "$cron_path"
chmod 644 "$cron_path"
ynh_replace_string "#USER#" "$app" "$cron_path" ynh_replace_string "#USER#" "$app" "$cron_path"
ynh_replace_string "#DESTDIR#" "$final_path" "$cron_path" ynh_replace_string "#DESTDIR#" "$final_path" "$cron_path"

View file

@ -286,6 +286,8 @@ ynh_store_file_checksum "${final_path}/config/config.php"
cron_path="/etc/cron.d/$app" cron_path="/etc/cron.d/$app"
cp -a ../conf/nextcloud.cron "$cron_path" cp -a ../conf/nextcloud.cron "$cron_path"
chown root: "$cron_path"
chmod 644 "$cron_path"
ynh_replace_string "#USER#" "$app" "$cron_path" ynh_replace_string "#USER#" "$app" "$cron_path"
ynh_replace_string "#DESTDIR#" "$final_path" "$cron_path" ynh_replace_string "#DESTDIR#" "$final_path" "$cron_path"
@ -334,7 +336,7 @@ they are probably disabled and you'll have to manually enable them again." >&2
#================================================= #=================================================
# Use logrotate to manage app-specific logfile(s) # Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate ynh_use_logrotate --non-append
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Last available nextcloud version # Last available nextcloud version
next_version="12.0.4" next_version="12.0.5"
# Nextcloud tarball checksum sha256 # Nextcloud tarball checksum sha256
nextcloud_source_sha256="654161a74ceaf9a60c7731d7d6702e6710a972633a97955d16f01abeb09d09b6" nextcloud_source_sha256="c8be29ace6821079e881818266fe49d28812b5aa0c7d2e76511173d48828ca43"

View file

@ -1,33 +1,33 @@
lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php | 4 ++++ lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php | 4 ++++
lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php | 3 ++- lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-) 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php diff --git a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
index 85ae127f5f..91618a09fc 100644 index 85ae127f5f..91618a09fc 100644
--- a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php --- a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
+++ b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php +++ b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
@@ -65,6 +65,10 @@ class ContentSecurityPolicyNonceManager { @@ -65,6 +65,10 @@ class ContentSecurityPolicyNonceManager {
* @return bool * @return bool
*/ */
public function browserSupportsCspV3() { public function browserSupportsCspV3() {
+ // YunoHost patch: disable CSPv3 nonces to: + // YunoHost patch: disable CSPv3 nonces to:
+ // - avoid white page on first login from YunoHost portal + // - avoid white page on first login from YunoHost portal
+ // - allow YunoHost tile display + // - allow YunoHost tile display
+ return false; + return false;
$browserWhitelist = [ $browserWhitelist = [
Request::USER_AGENT_CHROME, Request::USER_AGENT_CHROME,
// Firefox 45+ // Firefox 45+
diff --git a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php diff --git a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
index 64d4eb6e5d..59d5885620 100644 index 64d4eb6e5d..59d5885620 100644
--- a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php --- a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
+++ b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
@@ -377,7 +377,8 @@ class EmptyContentSecurityPolicy { @@ -377,7 +377,8 @@ class EmptyContentSecurityPolicy {
if(!empty($this->allowedFontDomains)) { if(!empty($this->allowedFontDomains)) {
$policy .= 'font-src ' . implode(' ', $this->allowedFontDomains); $policy .= 'font-src ' . implode(' ', $this->allowedFontDomains);
- $policy .= ';'; - $policy .= ';';
+ // YunoHost patch: extend font-src to load data fonts embedded in YunoHost tile script + // YunoHost patch: extend font-src to load data fonts embedded in YunoHost tile script
+ $policy .= ' data:;'; + $policy .= ' data:;';
} }
if(!empty($this->allowedConnectDomains)) { if(!empty($this->allowedConnectDomains)) {