## Problem
- *Issue https://github.com/YunoHost-Apps/nextcloud_ynh/issues/69*
```
Warning: [Exception]
Warning: App "LDAP user and group backend" cannot be installed because the following dependencies are not fulfilled: The library ldap is not available.
```
Dependency not installed : LDAP plugin of PHP.
## Solution
- *Install missing dependencies "php-ldap"*
## PR Status
To be reviewed.
## Validation
---
*Minor decision*
- [ ] **Upgrade previous version** :
- [ ] **Code review** :
- [ ] **Approval (LGTM)** :
- [ ] **Approval (LGTM)** :
- [ ] **CI succeeded** :
When the PR is mark as ready to merge, you have to wait for 3 days before really merge it.
* Refactoring
* Fix upgrade script
* Fix owncloud migration + new helper ynh_handle_app_migration
* Add more informations about ynh_handle_app_migration
* Fix typos, enhance comments, fix spacing
* Rename $dependencies to $pkg_dependencies as matter of homogeneity with other apps
* [enh] Change the label during the migration
Problems:
- Due to some unknown problem in the interaction between SSOwat and Nextcloud server authentication, CSP nonces are wrong when you log into Nextcloud from YunoHost portal for the first time (systematically reproduced in a browser private session). The Nextcloud page is hence almost totally blank and you have to refresh the page or click on the Nextcloud logo.
- Due to CSP protection, the YunoHost tile (inline Javascript) is blocked
Solution:
While it's not a totally satisfying solution, a somewhat acceptable workaround to these two problems is to:
- block CSP v3 features (hence nonces), but still allowing CSP v2 features
- allow for "data:" font sources (needed to load YunoHost tile fonts)
This is done via patching Nextcloud sources:
- `ContentSecurityPolicyNonceManager`: disable the CSPv3 browser compatibility detection (return false in every case)
- `EmptyContentSecurityPolicy`: add the "data:" argument in `font-src` default CSP rule.