mirror of
https://github.com/YunoHost-Apps/rainloop_ynh.git
synced 2024-09-03 20:16:18 +02:00
commit
b249391962
9 changed files with 68 additions and 95 deletions
22
README.md
22
README.md
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
|||
|
||||
# Rainloop for YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/rainloop.svg)](https://dash.yunohost.org/appci/app/rainloop) ![](https://ci-apps.yunohost.org/ci/badges/rainloop.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/rainloop.maintain.svg)
|
||||
[![Integration level](https://dash.yunohost.org/integration/rainloop.svg)](https://dash.yunohost.org/appci/app/rainloop) ![Working status](https://ci-apps.yunohost.org/ci/badges/rainloop.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/rainloop.maintain.svg)
|
||||
[![Install Rainloop with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=rainloop)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
@ -35,13 +35,14 @@ Lightweight multi-account webmail
|
|||
- Autocompletion of e-mail addresses.
|
||||
|
||||
|
||||
**Shipped version:** 1.16.0~ynh4
|
||||
**Shipped version:** 1.17.0~ynh1
|
||||
|
||||
|
||||
**Demo:** https://mail.rainloop.net/
|
||||
|
||||
## Screenshots
|
||||
|
||||
![](./doc/screenshots/screenshot.png)
|
||||
![Screenshot of Rainloop](./doc/screenshots/screenshot.png)
|
||||
|
||||
## Disclaimers / important information
|
||||
|
||||
|
@ -54,21 +55,22 @@ For example: http://webmail.domain.com/app/?admin
|
|||
Default login is `admin`, the password is the one you chose during installation.
|
||||
## Documentation and resources
|
||||
|
||||
* Official app website: https://www.rainloop.net/
|
||||
* Official admin documentation: https://www.rainloop.net/docs/configuration/
|
||||
* Upstream app code repository: https://github.com/RainLoop/rainloop-webmail
|
||||
* YunoHost documentation for this app: https://yunohost.org/app_rainloop
|
||||
* Report a bug: https://github.com/YunoHost-Apps/rainloop_ynh/issues
|
||||
* Official app website: <https://www.rainloop.net/>
|
||||
* Official admin documentation: <https://www.rainloop.net/docs/configuration/>
|
||||
* Upstream app code repository: <https://github.com/RainLoop/rainloop-webmail>
|
||||
* YunoHost documentation for this app: <https://yunohost.org/app_rainloop>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/rainloop_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
```
|
||||
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade rainloop -u https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
||||
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
|
||||
|
|
28
README_fr.md
28
README_fr.md
|
@ -1,10 +1,14 @@
|
|||
<!--
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
# Rainloop pour YunoHost
|
||||
|
||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/rainloop.svg)](https://dash.yunohost.org/appci/app/rainloop) ![](https://ci-apps.yunohost.org/ci/badges/rainloop.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/rainloop.maintain.svg)
|
||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/rainloop.svg)](https://dash.yunohost.org/appci/app/rainloop) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/rainloop.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/rainloop.maintain.svg)
|
||||
[![Installer Rainloop avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=rainloop)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *Ce package vous permet d'installer Rainloop 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.*
|
||||
|
@ -31,13 +35,14 @@ Lightweight multi-account webmail
|
|||
- Autocompletion of e-mail addresses.
|
||||
|
||||
|
||||
**Version incluse :** 1.16.0~ynh4
|
||||
**Version incluse :** 1.17.0~ynh1
|
||||
|
||||
|
||||
**Démo :** https://mail.rainloop.net/
|
||||
|
||||
## Captures d'écran
|
||||
|
||||
![](./doc/screenshots/screenshot.png)
|
||||
![Capture d'écran de Rainloop](./doc/screenshots/screenshot.png)
|
||||
|
||||
## Avertissements / informations importantes
|
||||
|
||||
|
@ -50,21 +55,22 @@ For example: http://webmail.domain.com/app/?admin
|
|||
Default login is `admin`, the password is the one you chose during installation.
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : https://www.rainloop.net/
|
||||
* Documentation officielle de l'admin : https://www.rainloop.net/docs/configuration/
|
||||
* Dépôt de code officiel de l'app : https://github.com/RainLoop/rainloop-webmail
|
||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_rainloop
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/rainloop_ynh/issues
|
||||
* Site officiel de l'app : <https://www.rainloop.net/>
|
||||
* Documentation officielle de l'admin : <https://www.rainloop.net/docs/configuration/>
|
||||
* Dépôt de code officiel de l'app : <https://github.com/RainLoop/rainloop-webmail>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_rainloop>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/rainloop_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
```
|
||||
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing --debug
|
||||
ou
|
||||
sudo yunohost app upgrade rainloop -u https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
||||
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/RainLoop/rainloop-webmail/releases/download/v1.16.0/rainloop-community-1.16.0.zip
|
||||
SOURCE_SUM=db949c4363b048a02eaa0f06a26a8386979b8734198c2939ee1e8cc54362ca67
|
||||
SOURCE_URL=https://github.com/RainLoop/rainloop-webmail/releases/download/v1.17.0/rainloop-legacy-1.17.0.zip
|
||||
SOURCE_SUM=782dcabacadab5d7176f7701dd23319a040b2cfbf974fac6df068600cf69c50a
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=false
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Lightweight multi-account webmail",
|
||||
"fr": "Webmail léger multi-comptes"
|
||||
},
|
||||
"version": "1.16.0~ynh4",
|
||||
"version": "1.17.0~ynh1",
|
||||
"url": "https://www.rainloop.net/",
|
||||
"upstream": {
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
@ -20,12 +20,12 @@
|
|||
"name": "scith, Djip007, polytan02"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.3.0"
|
||||
"yunohost": ">= 11.0.9"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php7.3-fpm",
|
||||
"php7.4-fpm",
|
||||
"mysql"
|
||||
],
|
||||
"arguments": {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
YNH_PHP_VERSION="7.4"
|
||||
|
||||
pkg_dependencies="php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-dom"
|
||||
|
||||
|
|
|
@ -87,22 +87,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path/app"
|
||||
|
||||
ynh_script_progression --message="Patching CVE-2022-29360 code vulnerability..." --weight=1
|
||||
# Deploy CVE-2022-29360 patch
|
||||
version=$(ynh_app_upstream_version)
|
||||
# FIXME because we need to apply the patch manually with --binary flag
|
||||
# while we should be able to simply use the patching feature of ynh_setup_source
|
||||
ynh_add_config --template="../sources/patches/app-CVE-2022-29360.patch.template" --destination="../sources/patches/FIXMEapp-CVE-2022-29360.patch"
|
||||
patch --silent --binary $final_path/app/rainloop/v/$version/app/libraries/MailSo/Base/HtmlUtils.php < ../sources/patches/FIXMEapp-CVE-2022-29360.patch
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -112,6 +96,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
|||
ynh_add_fpm_config
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
|
|
|
@ -13,6 +13,10 @@ source /usr/share/yunohost/helpers
|
|||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
#### Remove this function if there's nothing to clean before calling the remove script.
|
||||
true
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
|
@ -39,12 +43,6 @@ test ! -d $final_path || ynh_die --message="There is already a directory: $final
|
|||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -73,6 +71,14 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
|||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -81,12 +87,11 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig
|
|||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RESTORE FAIL2BAN CONFIGURATION
|
||||
|
|
|
@ -112,23 +112,6 @@ then
|
|||
ynh_setup_source --dest_dir="$final_path/app"
|
||||
fi
|
||||
|
||||
ynh_script_progression --message="Patching CVE-2022-29360 code vulnerability..." --weight=1
|
||||
ynh_print_warn --message="You should stop using Rainloop, its upstream code is not maintained anymore"
|
||||
# Deploy CVE-2022-29360 patch
|
||||
version=$(ynh_app_upstream_version)
|
||||
# FIXME because we need to apply the patch manually with --binary flag
|
||||
# while we should be able to simply use the patching feature of ynh_setup_source
|
||||
ynh_add_config --template="../sources/patches/app-CVE-2022-29360.patch.template" --destination="../sources/patches/FIXMEapp-CVE-2022-29360.patch"
|
||||
patched="$(patch --silent --binary --forward $final_path/app/rainloop/v/$version/app/libraries/MailSo/Base/HtmlUtils.php <../sources/patches/FIXMEapp-CVE-2022-29360.patch)" || echo "${patched}" | grep "Reversed (or previously applied) patch detected! Skipping patch." -q || (echo "$patched" && false);
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -144,6 +127,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
|||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
|
@ -151,8 +142,8 @@ ynh_add_fpm_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading Rainloop configuration..." --weight=2
|
||||
|
||||
# Upgrade time_offset value for fail2ban
|
||||
# FIXME Temporary fix for rainloop, waiting for https://github.com/YunoHost/yunohost/pull/752 to be released.
|
||||
# Upgrade time_offset value for Fail2Ban
|
||||
# FIXME Temporary fix for Rainloop, waiting for https://github.com/YunoHost/yunohost/pull/752 to be released.
|
||||
# ynh_replace_string --match_string="^time_offset = .*" --replace_string="time_offset = $(date +%:::z)" --target_file="$final_path/app/data/_data_/_default_/configs/application.ini"
|
||||
timezone="$(date +%:::z)"
|
||||
ynh_replace_string --match_string="^time_offset = .*" --replace_string="time_offset = ${timezone//-/\\-}" --target_file="$final_path/app/data/_data_/_default_/configs/application.ini"
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
diff --git a/rainloop/v/__VERSION__/app/libraries/MailSo/Base/HtmlUtils.php b/rainloop/v/__VERSION__/app/libraries/MailSo/Base/HtmlUtils.new
|
||||
index 2177627..f1e014e 100644
|
||||
--- a/rainloop/v/__VERSION__/app/libraries/MailSo/Base/HtmlUtils.php
|
||||
+++ b/rainloop/v/__VERSION__/app/libraries/MailSo/Base/HtmlUtils.new
|
||||
@@ -239,7 +239,8 @@ class HtmlUtils
|
||||
$oWrapHtml->setAttribute($sKey, $sValue);
|
||||
}
|
||||
|
||||
- $oWrapDom = $oDom->createElement('div', '___xxx___');
|
||||
+ $rand_str = base64_encode(random_bytes(32));
|
||||
+ $oWrapDom = $oDom->createElement('div', $rand_str);
|
||||
$oWrapDom->setAttribute('data-x-div-type', 'body');
|
||||
foreach ($aBodylAttrs as $sKey => $sValue)
|
||||
{
|
||||
@@ -250,7 +251,7 @@ class HtmlUtils
|
||||
|
||||
$sWrp = $oDom->saveHTML($oWrapHtml);
|
||||
|
||||
- $sResult = \str_replace('___xxx___', $sResult, $sWrp);
|
||||
+ $sResult = \str_replace($rand_str, $sResult, $sWrp);
|
||||
}
|
||||
|
||||
$sResult = \str_replace(\MailSo\Base\HtmlUtils::$KOS, ':', $sResult);
|
Loading…
Reference in a new issue