Browse Source
Merge remote-tracking branch 'origin/testing' into enh_postgresql_migration
enh_postgresql_migration
Merge remote-tracking branch 'origin/testing' into enh_postgresql_migration
enh_postgresql_migration
No known key found for this signature in database
GPG Key ID: AAFEEB16CFA2AE2D
36 changed files with 1541 additions and 1165 deletions
-
122README.md
-
117README_fr.md
-
17actions.toml
-
23check_process
-
3conf/config.json
-
4conf/config_install.json
-
17conf/extra_php-fpm.conf
-
2conf/nextcloud.cron
-
160conf/nginx.conf
-
399conf/php-fpm.conf
-
7conf/php-fpm.ini
-
26config_panel.toml
-
3hooks/post_user_create
-
16manifest.json
-
5pull_request_template.md
-
295scripts/_common.sh
-
66scripts/actions/add_multimedia_directories
-
52scripts/actions/disable_maintenance
-
57scripts/backup
-
126scripts/change_url
-
98scripts/config
-
223scripts/install
-
43scripts/remove
-
130scripts/restore
-
534scripts/upgrade
-
7scripts/upgrade.d/upgrade.13.sh
-
7scripts/upgrade.d/upgrade.14.sh
-
7scripts/upgrade.d/upgrade.15.sh
-
7scripts/upgrade.d/upgrade.16.sh
-
7scripts/upgrade.d/upgrade.17.sh
-
7scripts/upgrade.d/upgrade.18.sh
-
7scripts/upgrade.d/upgrade.19.sh
-
10scripts/upgrade.d/upgrade.last.sh
-
21sources/patches_last_version/app-00-add-logout_url-conf.patch
-
14sources/patches_last_version/app-01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch
-
17sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch
@ -0,0 +1,117 @@ |
|||
# Nextcloud pour YunoHost |
|||
|
|||
[](https://dash.yunohost.org/appci/app/nextcloud)   |
|||
[](https://install-app.yunohost.org/?app=nextcloud) |
|||
|
|||
*[Read this readme in english.](./README.md)* |
|||
|
|||
> *Ce package vous permet d'installer Nextcloud rapidement et simplement sur un serveur YunoHost. |
|||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* |
|||
|
|||
## Vue d'ensemble |
|||
|
|||
[Nextcloud](https://nextcloud.com) vous donne la liberté et le contrôle sur vos données. Un nuage personnel qui tourne sur votre serveur. |
|||
Avec NextCloud vous pouvez synchroniser vos fichiers sur vos appareils. |
|||
|
|||
**Version incluse :** 20.0.4 |
|||
|
|||
## Captures d'écran |
|||
|
|||
 |
|||
|
|||
## Démo |
|||
|
|||
* [Démo YunoHost](https://demo.yunohost.org/nextcloud/) |
|||
* [Démo officielle](https://demo.nextcloud.com/) |
|||
|
|||
## Documentation |
|||
|
|||
* Documentation officielle : https://docs.nextcloud.com/server/19/user_manual/ |
|||
* Documentation YunoHost : https://github.com/YunoHost/doc/blob/master/app_nextcloud_fr.md |
|||
|
|||
## Configuration |
|||
|
|||
#### Configurer l'intégration d'OnlyOffice |
|||
|
|||
À partir de sa version 18, Nextcloud inclut une intégration directe de OnlyOffice (un éditeur de texte enrichi en ligne) via une application Nextcloud. |
|||
Pour l'installer et la configurer : |
|||
- Installez l'application *Community Document Server* dans votre Nextcloud. C'est la partie qui fait tourner un serveur OnlyOffice. |
|||
- Installez l'application *ONLYOFFICE*. C'est la partie cliente qui va se connecter au serveur OnlyOffice. |
|||
- Ensuite dans les Paramètres -> ONLYOFFICE (`https://yourdomain.tld/nextcloud/settings/admin/onlyoffice`), si vous voulez configurer quels formats de fichier s'ouvrent avec OnlyOffice. |
|||
- Et voilà :) Vous devriez pouvoir créer de nouveaux types de documents, et les ouvrir. |
|||
|
|||
*NB : OnlyOffice n'est disponible que sous architecture x86 - L'architecture **ARM** n'est **pas** supporté (Raspberry Pi, OLinuXino...)* |
|||
|
|||
## Caractéristiques spécifiques YunoHost |
|||
|
|||
En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suivantes sont incluses dans ce package : |
|||
|
|||
* Intégration avec les utilisateurs YunoHost et le SSO - exemple, le bouton de déconnexion |
|||
* Permet à un utilisateur d'être l'administrateur (choisi à l'installation) |
|||
* Permet de multiples instances de cette application |
|||
* Accès optionnel au répertoire home depuis les fichiers Nextcloud (à activer à l'installation, le partage étant activé par défaut) |
|||
* Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, baikal |
|||
|
|||
#### Support multi-utilisateurs |
|||
|
|||
#### Architectures supportées |
|||
|
|||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/nextcloud/) |
|||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/nextcloud/) |
|||
|
|||
## Limitations |
|||
|
|||
Pour intégrer le bouton de déconnexion du SSO, nous devons patcher les sources de Nextcloud. |
|||
En attendant un intégration de leur part, la vérification d'intégrité du code source est désactivée pour ne pas avoir de message d'avertissement. |
|||
|
|||
Notez également que nous avons choisi de désactiver les applications tierces-parties lors des mises à jour. Ça permet d'éviter une installation de Nextcloud instable - ou qui pourrait planter. |
|||
Vous devrez juste les réactiver manuellement après chaque mise à jour. |
|||
|
|||
Et enfin, le message d'erreur suivant dans les logs de Nextcloud peut être ignoré sans problème : |
|||
``` |
|||
Following symlinks is not allowed ('/home/yunohost.multimedia/user/Share' -> '/home/yunohost.multimedia/share/' not inside '/home/yunohost.multimedia/user/') |
|||
``` |
|||
|
|||
## Informations supplémentaires |
|||
|
|||
#### Migrer depuis ownCloud |
|||
|
|||
**La migration n'est pas encore considérée comme stable, merci de la faire prudemment et uniquement pour tester !** |
|||
|
|||
Ce package gère la migration de ownCloud vers Nextcloud. Pour ça, l'application ownCloud doit **être à jour** dans YunoHost. |
|||
|
|||
Vous allez ensuite mettre à niveau votre ownCloud avec ce dépôt. |
|||
Ça ne peut être fait qu'en ligne de commande - par exemple via SSH. Une fois connecté, vous n'avez plus qu'à exécuter la commande suivante : |
|||
```bash |
|||
sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/nextcloud_ynh owncloud --debug |
|||
``` |
|||
|
|||
L'option `--debug` va vous permettre de visualiser entièrement les retours de la mise à niveau. Si vous rencontrez un problème, merci de nous le transmettre. |
|||
|
|||
Notez qu'une tâche cron va être exécutée une fois la fin de cette commande. Vous devez attendre qu'elle se fasse avant de faire une autre opération liée aux applications. |
|||
Vous devriez constater que Nextcloud sera installé après ça. |
|||
|
|||
Notez que ça ne changera pas le label ni l'URL. Pour renommer le label, vous pouvez exécuter la commande suivante (en remplaçant `Nextcloud` par ce que vous voulez) : |
|||
```bash |
|||
sudo yunohost app setting nextcloud label -v "Nextcloud" |
|||
sudo yunohost app ssowatconf |
|||
``` |
|||
|
|||
## Liens |
|||
|
|||
* Signaler un bug : https://github.com/YunoHost-Apps/nextcloud_ynh/issues |
|||
* Site web de Nextcloud : https://nextcloud.com/ |
|||
* Dépôt de Nextcloud : https://github.com/nextcloud/server |
|||
* Site web de YunoHost : https://yunohost.org/ |
|||
|
|||
--- |
|||
|
|||
## Informations pour les développeurs |
|||
|
|||
Merci de faire votre « pull request » sur la [branche testing](https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing). |
|||
Pour tester la branche testing, faites comme ceci. |
|||
``` |
|||
sudo yunohost app install https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing --debug |
|||
ou |
|||
sudo yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing --debug |
|||
``` |
|||
@ -0,0 +1,17 @@ |
|||
[disable_maintenance] |
|||
name = "Disable the maintenance mode of Nextcloud" |
|||
command = "/bin/bash scripts/actions/disable_maintenance" |
|||
# user = "root" # optional |
|||
# cwd = "/" # optional |
|||
# accepted_return_codes = [0, 1, 2, 3] # optional |
|||
accepted_return_codes = [0] |
|||
description = "Disable the maintenance mode of Nextcloud if you're stuck after an upgrade" |
|||
|
|||
[add_multimedia_directories] |
|||
name = "Add multimedia directories" |
|||
command = "/bin/bash scripts/actions/add_multimedia_directories" |
|||
# user = "root" # optional |
|||
# cwd = "/" # optional |
|||
# accepted_return_codes = [0, 1, 2, 3] # optional |
|||
accepted_return_codes = [0] |
|||
description = "Add the multimedia and shared multimedia directories again" |
|||
@ -1,9 +1,9 @@ |
|||
{ |
|||
"system": { |
|||
"datadirectory": "#DATADIR#", |
|||
"datadirectory": "__DATADIR__", |
|||
"trusted_domains": [ |
|||
"localhost", |
|||
"#DOMAIN#" |
|||
"__DOMAIN__" |
|||
] |
|||
} |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
|
|||
; Additional php.ini defines, specific to this pool of workers. |
|||
env[PATH] = $PATH |
|||
php_admin_value[memory_limit] = 512M |
|||
php_value[upload_max_filesize] = 10G |
|||
php_value[post_max_size] = 10G |
|||
php_value[default_charset] = UTF-8 |
|||
; OPcache is already activated by default |
|||
; php_value[opcache.enable]=1 |
|||
; The following parameters are nevertheless recommended for Nextcloud |
|||
; see here: https://docs.nextcloud.com/server/15/admin_manual/installation/server_tuning.html#enable-php-opcache |
|||
php_value[opcache.enable_cli]=1 |
|||
php_value[opcache.interned_strings_buffer]=8 |
|||
php_value[opcache.max_accelerated_files]=10000 |
|||
php_value[opcache.memory_consumption]=128 |
|||
php_value[opcache.save_comments]=1 |
|||
php_value[opcache.revalidate_freq]=1 |
|||
@ -1 +1 @@ |
|||
*/15 * * * * #USER# /usr/bin/php -f #DESTDIR#/cron.php |
|||
*/15 * * * * __USER__ /usr/bin/php__YNH_PHP_VERSION__ -f __DESTDIR__/cron.php |
|||
@ -1,399 +0,0 @@ |
|||
; Start a new pool named 'www'. |
|||
; the variable $pool can we used in any directive and will be replaced by the |
|||
; pool name ('www' here) |
|||
[__NAMETOCHANGE__] |
|||
|
|||
; Per pool prefix |
|||
; It only applies on the following directives: |
|||
; - 'slowlog' |
|||
; - 'listen' (unixsocket) |
|||
; - 'chroot' |
|||
; - 'chdir' |
|||
; - 'php_values' |
|||
; - 'php_admin_values' |
|||
; When not set, the global prefix (or /usr) applies instead. |
|||
; Note: This directive can also be relative to the global prefix. |
|||
; Default Value: none |
|||
;prefix = /path/to/pools/$pool |
|||
|
|||
; Unix user/group of processes |
|||
; Note: The user is mandatory. If the group is not set, the default user's group |
|||
; will be used. |
|||
user = __USER__ |
|||
group = __USER__ |
|||
|
|||
; The address on which to accept FastCGI requests. |
|||
; Valid syntaxes are: |
|||
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on |
|||
; a specific port; |
|||
; 'port' - to listen on a TCP socket to all addresses on a |
|||
; specific port; |
|||
; '/path/to/unix/socket' - to listen on a unix socket. |
|||
; Note: This value is mandatory. |
|||
listen = /var/run/php5-fpm-__NAMETOCHANGE__.sock |
|||
|
|||
; Set listen(2) backlog. A value of '-1' means unlimited. |
|||
; Default Value: 128 (-1 on FreeBSD and OpenBSD) |
|||
;listen.backlog = 128 |
|||
|
|||
; Set permissions for unix socket, if one is used. In Linux, read/write |
|||
; permissions must be set in order to allow connections from a web server. Many |
|||
; BSD-derived systems allow connections regardless of permissions. |
|||
; Default Values: user and group are set as the running user |
|||
; mode is set to 0660 |
|||
listen.owner = www-data |
|||
listen.group = www-data |
|||
;listen.mode = 0660 |
|||
|
|||
; List of ipv4 addresses of FastCGI clients which are allowed to connect. |
|||
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original |
|||
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address |
|||
; must be separated by a comma. If this value is left blank, connections will be |
|||
; accepted from any ip address. |
|||
; Default Value: any |
|||
;listen.allowed_clients = 127.0.0.1 |
|||
|
|||
; Specify the nice(2) priority to apply to the pool processes (only if set) |
|||
; The value can vary from -19 (highest priority) to 20 (lower priority) |
|||
; Note: - It will only work if the FPM master process is launched as root |
|||
; - The pool processes will inherit the master process priority |
|||
; unless it specified otherwise |
|||
; Default Value: no set |
|||
; priority = -19 |
|||
|
|||
; Choose how the process manager will control the number of child processes. |
|||
; Possible Values: |
|||
; static - a fixed number (pm.max_children) of child processes; |
|||
; dynamic - the number of child processes are set dynamically based on the |
|||
; following directives. With this process management, there will be |
|||
; always at least 1 children. |
|||
; pm.max_children - the maximum number of children that can |
|||
; be alive at the same time. |
|||
; pm.start_servers - the number of children created on startup. |
|||
; pm.min_spare_servers - the minimum number of children in 'idle' |
|||
; state (waiting to process). If the number |
|||
; of 'idle' processes is less than this |
|||
; number then some children will be created. |
|||
; pm.max_spare_servers - the maximum number of children in 'idle' |
|||
; state (waiting to process). If the number |
|||
; of 'idle' processes is greater than this |
|||
; number then some children will be killed. |
|||
; ondemand - no children are created at startup. Children will be forked when |
|||
; new requests will connect. The following parameter are used: |
|||
; pm.max_children - the maximum number of children that |
|||
; can be alive at the same time. |
|||
; pm.process_idle_timeout - The number of seconds after which |
|||
; an idle process will be killed. |
|||
; Note: This value is mandatory. |
|||
pm = dynamic |
|||
|
|||
; The number of child processes to be created when pm is set to 'static' and the |
|||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. |
|||
; This value sets the limit on the number of simultaneous requests that will be |
|||
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. |
|||
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP |
|||
; CGI. The below defaults are based on a server without much resources. Don't |
|||
; forget to tweak pm.* to fit your needs. |
|||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' |
|||
; Note: This value is mandatory. |
|||
pm.max_children = 10 |
|||
|
|||
; The number of child processes created on startup. |
|||
; Note: Used only when pm is set to 'dynamic' |
|||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 |
|||
pm.start_servers = 2 |
|||
|
|||
; The desired minimum number of idle server processes. |
|||
; Note: Used only when pm is set to 'dynamic' |
|||
; Note: Mandatory when pm is set to 'dynamic' |
|||
pm.min_spare_servers = 1 |
|||
|
|||
; The desired maximum number of idle server processes. |
|||
; Note: Used only when pm is set to 'dynamic' |
|||
; Note: Mandatory when pm is set to 'dynamic' |
|||
pm.max_spare_servers = 3 |
|||
|
|||
; The number of seconds after which an idle process will be killed. |
|||
; Note: Used only when pm is set to 'ondemand' |
|||
; Default Value: 10s |
|||
;pm.process_idle_timeout = 10s; |
|||
|
|||
; The number of requests each child process should execute before respawning. |
|||
; This can be useful to work around memory leaks in 3rd party libraries. For |
|||
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. |
|||
; Default Value: 0 |
|||
pm.max_requests = 500 |
|||
|
|||
; The URI to view the FPM status page. If this value is not set, no URI will be |
|||
; recognized as a status page. It shows the following informations: |
|||
; pool - the name of the pool; |
|||
; process manager - static, dynamic or ondemand; |
|||
; start time - the date and time FPM has started; |
|||
; start since - number of seconds since FPM has started; |
|||
; accepted conn - the number of request accepted by the pool; |
|||
; listen queue - the number of request in the queue of pending |
|||
; connections (see backlog in listen(2)); |
|||
; max listen queue - the maximum number of requests in the queue |
|||
; of pending connections since FPM has started; |
|||
; listen queue len - the size of the socket queue of pending connections; |
|||
; idle processes - the number of idle processes; |
|||
; active processes - the number of active processes; |
|||
; total processes - the number of idle + active processes; |
|||
; max active processes - the maximum number of active processes since FPM |
|||
; has started; |
|||
; max children reached - number of times, the process limit has been reached, |
|||
; when pm tries to start more children (works only for |
|||
; pm 'dynamic' and 'ondemand'); |
|||
; Value are updated in real time. |
|||
; Example output: |
|||
; pool: www |
|||
; process manager: static |
|||
; start time: 01/Jul/2011:17:53:49 +0200 |
|||
; start since: 62636 |
|||
; accepted conn: 190460 |
|||
; listen queue: 0 |
|||
; max listen queue: 1 |
|||
; listen queue len: 42 |
|||
; idle processes: 4 |
|||
; active processes: 11 |
|||
; total processes: 15 |
|||
; max active processes: 12 |
|||
; max children reached: 0 |
|||
; |
|||
; By default the status page output is formatted as text/plain. Passing either |
|||
; 'html', 'xml' or 'json' in the query string will return the corresponding |
|||
; output syntax. Example: |
|||
; http://www.foo.bar/status |
|||
; http://www.foo.bar/status?json |
|||
; http://www.foo.bar/status?html |
|||
; http://www.foo.bar/status?xml |
|||
; |
|||
; By default the status page only outputs short status. Passing 'full' in the |
|||
; query string will also return status for each pool process. |
|||
; Example: |
|||
; http://www.foo.bar/status?full |
|||
; http://www.foo.bar/status?json&full |
|||
; http://www.foo.bar/status?html&full |
|||
; http://www.foo.bar/status?xml&full |
|||
; The Full status returns for each process: |
|||
; pid - the PID of the process; |
|||
; state - the state of the process (Idle, Running, ...); |
|||
; start time - the date and time the process has started; |
|||
; start since - the number of seconds since the process has started; |
|||
; requests - the number of requests the process has served; |
|||
; request duration - the duration in µs of the requests; |
|||
; request method - the request method (GET, POST, ...); |
|||
; request URI - the request URI with the query string; |
|||
; content length - the content length of the request (only with POST); |
|||
; user - the user (PHP_AUTH_USER) (or '-' if not set); |
|||
; script - the main script called (or '-' if not set); |
|||
; last request cpu - the %cpu the last request consumed |
|||
; it's always 0 if the process is not in Idle state |
|||
; because CPU calculation is done when the request |
|||
; processing has terminated; |
|||
; last request memory - the max amount of memory the last request consumed |
|||
; it's always 0 if the process is not in Idle state |
|||
; because memory calculation is done when the request |
|||
; processing has terminated; |
|||
; If the process is in Idle state, then informations are related to the |
|||
; last request the process has served. Otherwise informations are related to |
|||
; the current request being served. |
|||
; Example output: |
|||
; ************************ |
|||
; pid: 31330 |
|||
; state: Running |
|||
; start time: 01/Jul/2011:17:53:49 +0200 |
|||
; start since: 63087 |
|||
; requests: 12808 |
|||
; request duration: 1250261 |
|||
; request method: GET |
|||
; request URI: /test_mem.php?N=10000 |
|||
; content length: 0 |
|||
; user: - |
|||
; script: /home/fat/web/docs/php/test_mem.php |
|||
; last request cpu: 0.00 |
|||
; last request memory: 0 |
|||
; |
|||
; Note: There is a real-time FPM status monitoring sample web page available |
|||
; It's available in: ${prefix}/share/fpm/status.html |
|||
; |
|||
; Note: The value must start with a leading slash (/). The value can be |
|||
; anything, but it may not be a good idea to use the .php extension or it |
|||
; may conflict with a real PHP file. |
|||
; Default Value: not set |
|||
;pm.status_path = /status |
|||
|
|||
; The ping URI to call the monitoring page of FPM. If this value is not set, no |
|||
; URI will be recognized as a ping page. This could be used to test from outside |
|||
; that FPM is alive and responding, or to |
|||
; - create a graph of FPM availability (rrd or such); |
|||
; - remove a server from a group if it is not responding (load balancing); |
|||
; - trigger alerts for the operating team (24/7). |
|||
; Note: The value must start with a leading slash (/). The value can be |
|||
; anything, but it may not be a good idea to use the .php extension or it |
|||
; may conflict with a real PHP file. |
|||
; Default Value: not set |
|||
;ping.path = /ping |
|||
|
|||
; This directive may be used to customize the response of a ping request. The |
|||
; response is formatted as text/plain with a 200 response code. |
|||
; Default Value: pong |
|||
;ping.response = pong |
|||
|
|||
; The access log file |
|||
; Default: not set |
|||
;access.log = log/$pool.access.log |
|||
|
|||
; The access log format. |
|||
; The following syntax is allowed |
|||
; %%: the '%' character |
|||
; %C: %CPU used by the request |
|||
; it can accept the following format: |
|||
; - %{user}C for user CPU only |
|||
; - %{system}C for system CPU only |
|||
; - %{total}C for user + system CPU (default) |
|||
; %d: time taken to serve the request |
|||
; it can accept the following format: |
|||
; - %{seconds}d (default) |
|||
; - %{miliseconds}d |
|||
; - %{mili}d |
|||
; - %{microseconds}d |
|||
; - %{micro}d |
|||
; %e: an environment variable (same as $_ENV or $_SERVER) |
|||
; it must be associated with embraces to specify the name of the env |
|||
; variable. Some exemples: |
|||
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e |
|||
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e |
|||
; %f: script filename |
|||
; %l: content-length of the request (for POST request only) |
|||
; %m: request method |
|||
; %M: peak of memory allocated by PHP |
|||
; it can accept the following format: |
|||
; - %{bytes}M (default) |
|||
; - %{kilobytes}M |
|||
; - %{kilo}M |
|||
; - %{megabytes}M |
|||
; - %{mega}M |
|||
; %n: pool name |
|||
; %o: ouput header |
|||
; it must be associated with embraces to specify the name of the header: |
|||
; - %{Content-Type}o |
|||
; - %{X-Powered-By}o |
|||
; - %{Transfert-Encoding}o |
|||
; - .... |
|||
; %p: PID of the child that serviced the request |
|||
; %P: PID of the parent of the child that serviced the request |
|||
; %q: the query string |
|||
; %Q: the '?' character if query string exists |
|||
; %r: the request URI (without the query string, see %q and %Q) |
|||
; %R: remote IP address |
|||
; %s: status (response code) |
|||
; %t: server time the request was received |
|||
; it can accept a strftime(3) format: |
|||
; %d/%b/%Y:%H:%M:%S %z (default) |
|||
; %T: time the log has been written (the request has finished) |
|||
; it can accept a strftime(3) format: |
|||
; %d/%b/%Y:%H:%M:%S %z (default) |
|||
; %u: remote user |
|||
; |
|||
; Default: "%R - %u %t \"%m %r\" %s" |
|||
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" |
|||
|
|||
; The log file for slow requests |
|||
; Default Value: not set |
|||
; Note: slowlog is mandatory if request_slowlog_timeout is set |
|||
slowlog = /var/log/nginx/__NAMETOCHANGE__.slow.log |
|||
|
|||
; The timeout for serving a single request after which a PHP backtrace will be |
|||
; dumped to the 'slowlog' file. A value of '0s' means 'off'. |
|||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) |
|||
; Default Value: 0 |
|||
request_slowlog_timeout = 5s |
|||
|
|||
; The timeout for serving a single request after which the worker process will |
|||
; be killed. This option should be used when the 'max_execution_time' ini option |
|||
; does not stop script execution for some reason. A value of '0' means 'off'. |
|||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) |
|||
; Default Value: 0 |
|||
request_terminate_timeout = 1d |
|||
|
|||
; Set open file descriptor rlimit. |
|||
; Default Value: system defined value |
|||
;rlimit_files = 1024 |
|||
|
|||
; Set max core size rlimit. |
|||
; Possible Values: 'unlimited' or an integer greater or equal to 0 |
|||
; Default Value: system defined value |
|||
;rlimit_core = 0 |
|||
|
|||
; Chroot to this directory at the start. This value must be defined as an |
|||
; absolute path. When this value is not set, chroot is not used. |
|||
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one |
|||
; of its subdirectories. If the pool prefix is not set, the global prefix |
|||
; will be used instead. |
|||
; Note: chrooting is a great security feature and should be used whenever |
|||
; possible. However, all PHP paths will be relative to the chroot |
|||
; (error_log, sessions.save_path, ...). |
|||
; Default Value: not set |
|||
;chroot = |
|||
|
|||
; Chdir to this directory at the start. |
|||
; Note: relative path can be used. |
|||
; Default Value: current directory or / when chroot |
|||
chdir = __FINALPATH__ |
|||
|
|||
; Redirect worker stdout and stderr into main error log. If not set, stdout and |
|||
; stderr will be redirected to /dev/null according to FastCGI specs. |
|||
; Note: on highloaded environement, this can cause some delay in the page |
|||
; process time (several ms). |
|||
; Default Value: no |
|||
catch_workers_output = yes |
|||
|
|||
; Limits the extensions of the main script FPM will allow to parse. This can |
|||
; prevent configuration mistakes on the web server side. You should only limit |
|||
; FPM to .php extensions to prevent malicious users to use other extensions to |
|||
; exectute php code. |
|||
; Note: set an empty value to allow all extensions. |
|||
; Default Value: .php |
|||
;security.limit_extensions = .php .php3 .php4 .php5 |
|||
|
|||
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from |
|||
; the current environment. |
|||
; Default Value: clean env |
|||
;env[HOSTNAME] = $HOSTNAME |
|||
;env[PATH] = /usr/local/bin:/usr/bin:/bin |
|||
;env[TMP] = /tmp |
|||
;env[TMPDIR] = /tmp |
|||
;env[TEMP] = /tmp |
|||
env[PATH] = $PATH |
|||
|
|||
; Additional php.ini defines, specific to this pool of workers. These settings |
|||
; overwrite the values previously defined in the php.ini. The directives are the |
|||
; same as the PHP SAPI: |
|||
; php_value/php_flag - you can set classic ini defines which can |
|||
; be overwritten from PHP call 'ini_set'. |
|||
; php_admin_value/php_admin_flag - these directives won't be overwritten by |
|||
; PHP call 'ini_set' |
|||
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. |
|||
|
|||
; Defining 'extension' will load the corresponding shared extension from |
|||
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not |
|||
; overwrite previously defined php.ini values, but will append the new value |
|||
; instead. |
|||
|
|||
; Note: path INI options can be relative and will be expanded with the prefix |
|||
; (pool, global or /usr) |
|||
|
|||
; Default Value: nothing is defined by default except the values in php.ini and |
|||
; specified at startup with the -d argument |
|||
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com |
|||
;php_flag[display_errors] = off |
|||
;php_admin_value[error_log] = /var/log/fpm-php.www.log |
|||
;php_admin_flag[log_errors] = on |
|||
;php_admin_value[memory_limit] = 32M |
|||
|
|||
; Additional php.ini defines, specific to this pool of workers. |
|||
php_value[upload_max_filesize] = 10G |
|||
php_value[post_max_size] = 10G |
|||
php_value[default_charset] = UTF-8 |
|||
php_value[always_populate_raw_post_data] = -1 |
|||
@ -1,7 +0,0 @@ |
|||
opcache.enable=1 |
|||
opcache.enable_cli=1 |
|||
opcache.interned_strings_buffer=8 |
|||
opcache.max_accelerated_files=10000 |
|||
opcache.memory_consumption=128 |
|||
opcache.save_comments=1 |
|||
opcache.revalidate_freq=1 |
|||
@ -0,0 +1,26 @@ |
|||
version = "0.1" |
|||
name = "Nextcloud configuration panel" |
|||
|
|||
[main] |
|||
name = "Nextcloud configuration" |
|||
|
|||
[main.php_fpm_config] |
|||
name = "PHP-FPM configuration" |
|||
|
|||
[main.php_fpm_config.footprint] |
|||
ask = "Memory footprint of the service ?" |
|||
choices = ["low", "medium", "high", "specific"] |
|||
default = "low" |
|||
help = "low <= 20Mb per pool. medium between 20Mb and 40Mb per pool. high > 40Mb per pool.<br>Use specific to set a value with the following option." |
|||
|
|||
[main.php_fpm_config.free_footprint] |
|||
ask = "Memory footprint of the service ?" |
|||
type = "number" |
|||
default = "0" |
|||
help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values." |
|||
|
|||
[main.php_fpm_config.usage] |
|||
ask = "Expected usage of the service ?" |
|||
choices = ["low", "medium", "high"] |
|||
default = "low" |
|||
help = "low: Personal usage, behind the sso. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." |
|||
@ -0,0 +1,66 @@ |
|||
#!/bin/bash |
|||
|
|||
#================================================= |
|||
# GENERIC STARTING |
|||
#================================================= |
|||
# IMPORT GENERIC HELPERS |
|||
#================================================= |
|||
|
|||
source scripts/_common.sh |
|||
source /usr/share/yunohost/helpers |
|||
|
|||
#================================================= |
|||
# RETRIEVE ARGUMENTS |
|||
#================================================= |
|||
|
|||
app=$YNH_APP_INSTANCE_NAME |
|||
|
|||
final_path=$(ynh_app_setting_get --app=$app --key=final_path) |
|||
|
|||
#================================================= |
|||
# CHECK IF ARGUMENTS ARE CORRECT |
|||
#================================================= |
|||
|
|||
#================================================= |
|||
# DEFINE FUNCTION |
|||
#================================================= |
|||
|
|||
# Define a function to execute commands with `occ` |
|||
exec_occ() { |
|||
(cd "$final_path" && exec_as "$app" \ |
|||
php$YNH_PHP_VERSION occ --no-interaction --no-ansi "$@") |
|||
} |
|||
|
|||
# Define a function to add an external storage |
|||
# Create the external storage for the given folders and enable sharing |
|||
create_external_storage() { |
|||
local datadir="$1" |
|||
local mount_name="$2" |
|||
local mount_id=`exec_occ files_external:create --output=json \ |
|||
"$mount_name" 'local' 'null::null' -c "datadir=$datadir" || true` |
|||
! [[ $mount_id =~ ^[0-9]+$ ]] \ |
|||
&& ynh_print_warn --message="Unable to create external storage" \ |
|||
|| exec_occ files_external:option "$mount_id" enable_sharing true |
|||
} |
|||
|
|||
#================================================= |
|||
# SPECIFIC ACTION |
|||
#================================================= |
|||
# YUNOHOST MULTIMEDIA INTEGRATION |
|||
#================================================= |
|||
ynh_script_progression --message="Updating multimedia directories..." --weight=6 |
|||
|
|||
# Build YunoHost multimedia directories |
|||
ynh_multimedia_build_main_dir |
|||
# Mount the user directory in Nextcloud |
|||
exec_occ app:enable files_external |
|||
create_external_storage "/home/yunohost.multimedia/\$user" "Multimedia" |
|||
create_external_storage "/home/yunohost.multimedia/share" "Shared multimedia" |
|||
# Allow nextcloud to write into these directories |
|||
ynh_multimedia_addaccess $app |
|||
|
|||
#================================================= |
|||
# END OF SCRIPT |
|||
#================================================= |
|||
|
|||
ynh_script_progression --message="Execution completed" --last |
|||
@ -0,0 +1,52 @@ |
|||
#!/bin/bash |
|||
|
|||
#================================================= |
|||
# GENERIC STARTING |
|||
#================================================= |
|||
# IMPORT GENERIC HELPERS |
|||
#================================================= |
|||
|
|||
source scripts/_common.sh |
|||
source /usr/share/yunohost/helpers |
|||
|
|||
#================================================= |
|||
# RETRIEVE ARGUMENTS |
|||
#================================================= |
|||
|
|||
app=$YNH_APP_INSTANCE_NAME |
|||
|
|||
final_path=$(ynh_app_setting_get --app=$app --key=final_path) |
|||
|
|||
#================================================= |
|||
# CHECK IF ARGUMENTS ARE CORRECT |
|||
#================================================= |
|||
|
|||
#================================================= |
|||
# CHECK IF AN ACTION HAS TO BE DONE |
|||
#================================================= |
|||
|
|||
# Check the current status of the maintenance mode |
|||
|
|||
if [ "$(grep "maintenance" "$final_path/config/config.php" | awk '{print $3}' | cut -d',' -f1)" != "true" ] |
|||
then |
|||
ynh_die --message="Nextcloud isn't currently under maintenance." --ret_code=0 |
|||
fi |
|||
|
|||
#================================================= |
|||
# SPECIFIC ACTION |
|||
#================================================= |
|||
# DISABLE THE MAINTENANCE MODE |
|||
#================================================= |
|||
|
|||
ynh_script_progression --message="Disabling maintenance mode..." --weight=3 |
|||
|
|||
( |
|||
cd "$final_path" && exec_as "$app" \ |
|||
php$YNH_PHP_VERSION occ --no-interaction --no-ansi maintenance:mode --off |
|||
) |
|||
|
|||
#================================================= |
|||
# END OF SCRIPT |
|||
#================================================= |
|||
|
|||
ynh_script_progression --message="Execution completed" --last |
|||
@ -0,0 +1,126 @@ |
|||
#!/bin/bash |
|||
|
|||
#================================================= |
|||
# GENERIC STARTING |
|||
#================================================= |
|||
# IMPORT GENERIC HELPERS |
|||
#================================================= |
|||
|
|||
source _common.sh |
|||
source /usr/share/yunohost/helpers |
|||
|
|||
#================================================= |
|||
# RETRIEVE ARGUMENTS |
|||
#================================================= |
|||
|
|||
old_domain=$YNH_APP_OLD_DOMAIN |
|||
old_path=$YNH_APP_OLD_PATH |
|||
|
|||
new_domain=$YNH_APP_NEW_DOMAIN |
|||
new_path=$YNH_APP_NEW_PATH |
|||
|
|||
app=$YNH_APP_INSTANCE_NAME |
|||
|
|||
#================================================= |
|||
# LOAD SETTINGS |
|||
#================================================= |
|||
ynh_script_progression --message="Loading installation settings..." |
|||
|
|||
# Needed for helper "ynh_add_nginx_config" |
|||
final_path=$(ynh_app_setting_get --app=$app --key=final_path) |
|||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) |
|||
|
|||
#================================================= |
|||
# CHECK WHICH PARTS SHOULD BE CHANGED |
|||
#================================================= |
|||
|
|||
change_domain=0 |
|||
if [ "$old_domain" != "$new_domain" ] |
|||
then |
|||
change_domain=1 |
|||
fi |
|||
|
|||
change_path=0 |
|||
if [ "$old_path" != "$new_path" ] |
|||
then |
|||
change_path=1 |
|||
fi |
|||
|
|||
#================================================= |
|||
# STANDARD MODIFICATIONS |
|||
#================================================= |
|||
# MODIFY URL IN NGINX CONF |
|||
#================================================= |
|||
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 |
|||
|
|||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf |
|||
|
|||
# Change the path in the NGINX config file |
|||
if [ $change_path -eq 1 ] |
|||
then |
|||
# Make a backup of the original NGINX config file if modified |
|||
ynh_backup_if_checksum_is_different --file="$nginx_conf_path" |
|||
# Set global variables for NGINX helper |
|||
domain="$old_domain" |
|||
path_url="$new_path" |
|||
# Create a dedicated NGINX config |
|||
ynh_add_nginx_config |
|||
fi |
|||
|
|||
# Change the domain for NGINX |
|||
if [ $change_domain -eq 1 ] |
|||
then |
|||
# Delete file checksum for the old conf file location |
|||
ynh_delete_file_checksum --file="$nginx_conf_path" |
|||
mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf |
|||
# Store file checksum for the new config file location |
|||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" |
|||
fi |
|||
|
|||
#================================================= |
|||
# SPECIFIC MODIFICATIONS |
|||
#================================================= |
|||
ynh_script_progression --message="Applying Nextcloud specific modifications..." --weight=2 |
|||
|
|||
# Define a function to execute commands with `occ` |
|||
exec_occ() { |
|||
(cd "$final_path" && exec_as "$app" \ |
|||
php${phpversion} occ --no-interaction --no-ansi "$@") |
|||
} |
|||
|
|||
if [ $change_domain -eq 1 ] |
|||
then |
|||
# Change the trusted domain |
|||
exec_occ config:system:set trusted_domains 1 --value=$new_domain |
|||
|
|||
# Change hostname for activity notifications |
|||
ynh_replace_string --match_string="'overwrite.cli.url' => 'http://${old_domain}'," --replace_string="'overwrite.cli.url' => 'https://${new_domain}'," --target_file="${final_path}/config/config.php" |
|||
fi |
|||
|
|||
if [ $change_domain -eq 1 ] |
|||
then |
|||
# Check if .well-known is available for this domain |
|||
if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav" |
|||
then |
|||
ynh_print_warn --message="Another app already uses the domain $domain to serve a caldav/carddav feature. You may encounter issues when dealing with your calendar or address book." |
|||
|
|||
# Remove lines about .well-known/carddav and caldav with sed. |
|||
sed --in-place --regexp-extended '/^location = \/\.well\-known\/(caldav|carddav) \{/,/\}/d' "/etc/nginx/conf.d/$new_domain.d/$app.conf" |
|||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" |
|||
fi |
|||
fi |
|||
|
|||
#================================================= |
|||
# GENERIC FINALISATION |
|||
#================================================= |
|||
# RELOAD NGINX |
|||
#================================================= |
|||
ynh_script_progression --message="Reloading NGINX web server..." |
|||
|
|||
ynh_systemd_action --service_name=nginx --action=reload |
|||
|
|||
#================================================= |
|||
# END OF SCRIPT |
|||
#================================================= |
|||
|
|||
ynh_script_progression --message="Change of URL completed for $app" --last |
|||
@ -0,0 +1,98 @@ |
|||
#!/bin/bash |
|||
|
|||
#================================================= |
|||
# GENERIC STARTING |
|||
#================================================= |
|||
# IMPORT GENERIC HELPERS |
|||
#================================================= |
|||
|
|||
source _common.sh |
|||
source /usr/share/yunohost/helpers |
|||
|
|||
#================================================= |
|||
# RETRIEVE ARGUMENTS |
|||
#================================================= |
|||
|
|||
app=$YNH_APP_INSTANCE_NAME |
|||
|
|||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) |
|||
|
|||
#================================================= |
|||
# LOAD VALUES |
|||
#================================================= |
|||
|
|||
# Load the real value from the app config or elsewhere. |
|||
# Then get the value from the form. |
|||
# If the form has a value for a variable, take the value from the form, |
|||
# Otherwise, keep the value from the app config. |
|||
|
|||
# Footprint for php-fpm |
|||
old_fpm_footprint="$(ynh_app_setting_get --app=$app --key=fpm_footprint)" |
|||
fpm_footprint="${YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FOOTPRINT:-$old_fpm_footprint}" |
|||
|
|||
# Free footprint value for php-fpm |
|||
# Check if fpm_footprint is an integer |
|||
if [ "$fpm_footprint" -eq "$fpm_footprint" ] 2> /dev/null |
|||
then |
|||
# If fpm_footprint is an integer, that's a numeric value for the footprint |
|||
old_free_footprint=$fpm_footprint |
|||
fpm_footprint=specific |
|||
else |
|||
old_free_footprint=0 |
|||
fi |
|||
free_footprint="${YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FREE_FOOTPRINT:-$old_free_footprint}" |
|||
|
|||
# Usage for php-fpm |
|||
old_fpm_usage="$(ynh_app_setting_get --app=$app --key=fpm_usage)" |
|||
fpm_usage="${YNH_CONFIG_MAIN_PHP_FPM_CONFIG_USAGE:-$old_fpm_usage}" |
|||
|
|||
#================================================= |
|||
# SHOW_CONFIG FUNCTION FOR 'SHOW' COMMAND |
|||
#================================================= |
|||
|
|||
show_config() { |
|||
# here you are supposed to read some config file/database/other then print the values |
|||
# ynh_return "YNH_CONFIG_${PANEL_ID}_${SECTION_ID}_${OPTION_ID}=value" |
|||
|
|||
ynh_return "YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FOOTPRINT=$fpm_footprint" |
|||
ynh_return "YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FREE_FOOTPRINT=$free_footprint" |
|||
ynh_return "YNH_CONFIG_MAIN_PHP_FPM_CONFIG_USAGE=$fpm_usage" |
|||
} |
|||
|
|||
#================================================= |
|||
# MODIFY THE CONFIGURATION |
|||
#================================================= |
|||
|
|||
apply_config() { |
|||
|
|||
#================================================= |
|||
# RECONFIGURE PHP-FPM |
|||
#================================================= |
|||
|
|||
if [ "$fpm_usage" != "$old_fpm_usage" ] || [ "$fpm_footprint" != "$old_fpm_footprint" ] || [ "$free_footprint" != "$old_free_footprint" ] |
|||
then |
|||
# If fpm_footprint is set to 'specific', use $free_footprint value. |
|||
if [ "$fpm_footprint" = "specific" ] |
|||
then |
|||
fpm_footprint=$free_footprint |
|||
fi |
|||
|
|||
if [ "$fpm_footprint" != "0" ] |
|||
then |
|||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies" |
|||
else |
|||
ynh_print_err --message="When selecting 'specific', you have to set a footprint value into the field below." |
|||
fi |
|||
fi |
|||
} |
|||
|
|||
#================================================= |
|||
# GENERIC FINALIZATION |
|||
#================================================= |
|||
# SELECT THE ACTION FOLLOWING THE GIVEN ARGUMENT |
|||
#================================================= |
|||
|
|||
case $1 in |
|||
show) show_config;; |
|||
apply) apply_config;; |
|||
esac |
|||
@ -0,0 +1,7 @@ |
|||
#!/bin/bash |
|||
|
|||
# Last available nextcloud version |
|||
next_version="14.0.0" |
|||
|
|||
# Nextcloud tarball checksum sha256 |
|||
nextcloud_source_sha256="f965c14286e7aabbfe49c947d86af59597af302c35d10e0b5440e7e6c53b8f47" |
|||
@ -0,0 +1,7 @@ |
|||
#!/bin/bash |
|||
|
|||
# Last available nextcloud version |
|||
next_version="15.0.0" |
|||
|
|||
# Nextcloud tarball checksum sha256 |
|||
nextcloud_source_sha256="5bb0c58171353da844019b64080c21078002a59ab956ab72adb958844a98eb78" |
|||
@ -0,0 +1,7 @@ |
|||
#!/bin/bash |
|||
|
|||
# Last available nextcloud version |
|||
next_version="16.0.0" |
|||
|
|||
# Nextcloud tarball checksum sha256 |
|||
nextcloud_source_sha256="4532f7028b1d9bf060f75ac4fbbde52a59ecd9c9155f3178a038d3cf3609402e" |
|||
@ -0,0 +1,7 @@ |
|||
#!/bin/bash |
|||
|
|||
# Last available nextcloud version |
|||
next_version="17.0.0" |
|||
|
|||
# Nextcloud tarball checksum sha256 |
|||
nextcloud_source_sha256="6081421b33ecdb3130b2bfb2293a3f4045aeb0b471ee570e675de3d931a142a6" |
|||
@ -0,0 +1,7 @@ |
|||
#!/bin/bash |
|||
|
|||
# Last available nextcloud version |
|||
next_version="18.0.0" |
|||
|
|||
# Nextcloud tarball checksum sha256 |
|||
nextcloud_source_sha256="194095a5586d84040bc455f77b8aa6c80f9a6a6dd713c9aebdad046713d4267b" |
|||
@ -0,0 +1,7 @@ |
|||
#!/bin/bash |
|||
|
|||
# Last available nextcloud version |
|||
next_version="19.0.0" |
|||
|
|||
# Nextcloud tarball checksum sha256 |
|||
nextcloud_source_sha256="d23d429657c5e3476d7e73af1eafc70e42a81cfe2ed65b20655a005724fe0aae" |
|||
@ -0,0 +1,7 @@ |
|||
#!/bin/bash |
|||
|
|||
# Last available nextcloud version |
|||
next_version="20.0.0" |
|||
|
|||
# Nextcloud tarball checksum sha256 |
|||
nextcloud_source_sha256="a273e0151f68567f729d9a82a7e3f124ff0f0471aa17bae6bfd83c5362d84cd8" |
|||
@ -1,11 +1,7 @@ |
|||
#!/bin/bash |
|||
|
|||
# Last available nextcloud version |
|||
next_version="13.0.2" |
|||
# Last available Nextcloud version |
|||
next_version="20.0.4" |
|||
|
|||
# Nextcloud tarball checksum sha256 |
|||
nextcloud_source_sha256="7396f98a1a53a9f4b144f55360d87c89cb6ee899feef1cfbf29a736219f9c47d" |
|||
|
|||
# Patch nextcloud files only for the last version |
|||
cp -a ../sources/patches_last_version/* ../sources/patches |
|||
|
|||
nextcloud_source_sha256="269f1622e326f5d11e387d3861aad4e2b0e79334ae97eed5a7b3352ba7661420" |
|||
@ -1,14 +1,21 @@ |
|||
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
|
|||
index 13aef8f67a..55d8dbf9d1 100644
|
|||
--- a/core/Controller/LoginController.php
|
|||
+++ b/core/Controller/LoginController.php
|
|||
@@ -119,7 +119,10 @@
|
|||
@@ -119,11 +119,12 @@ class LoginController extends Controller {
|
|||
} |
|||
$this->userSession->logout(); |
|||
|
|||
- $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm'));
|
|||
- $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute(
|
|||
- 'core.login.showLoginForm',
|
|||
- ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers
|
|||
+ $redirectUrl = $this->config->getSystemValue('logout_url',
|
|||
+ $this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')
|
|||
+ );
|
|||
+ $this->urlGenerator->linkToRouteAbsolute(
|
|||
+ 'core.login.showLoginForm',
|
|||
+ ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers)
|
|||
)); |
|||
-
|
|||
+ $response = new RedirectResponse($redirectUrl);
|
|||
$response->addHeader('Clear-Site-Data', '"cache", "cookies", "storage", "executionContexts"'); |
|||
return $response; |
|||
} |
|||
$this->session->set('clearingExecutionContexts', '1'); |
|||
$this->session->close(); |
|||
|
|||
@ -0,0 +1,17 @@ |
|||
lib/public/AppFramework/Http/ContentSecurityPolicy.php | 3 ++- |
|||
1 file changed, 2 insertions(+), 1 deletion(-) |
|||
|
|||
diff --git a/lib/public/AppFramework/Http/ContentSecurityPolicy.php b/lib/public/AppFramework/Http/ContentSecurityPolicy.php
|
|||
index e9ecf00036..8e69c8d2dc 100644
|
|||
--- a/lib/public/AppFramework/Http/ContentSecurityPolicy.php
|
|||
+++ b/lib/public/AppFramework/Http/ContentSecurityPolicy.php
|
|||
@@ -44,7 +44,8 @@ class ContentSecurityPolicy extends EmptyContentSecurityPolicy {
|
|||
/** @var bool Whether inline JS snippets are allowed */ |
|||
protected $inlineScriptAllowed = false; |
|||
/** @var bool Whether eval in JS scripts is allowed */ |
|||
- protected $evalScriptAllowed = false;
|
|||
+ // YunoHost patch: allow for eval in JS scripts for YunoHost tile
|
|||
+ protected $evalScriptAllowed = true;
|
|||
/** @var array Domains from which scripts can get loaded */ |
|||
protected $allowedScriptDomains = [ |
|||
'\'self\'', |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue