1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-05 15:57:23 +01:00

Update roundcube carddav plugin to support roundcube 1.5 and close a security hole

This commit is contained in:
downtownallday
2021-11-15 16:07:54 -05:00
parent 334c7f71b5
commit 06216876a2
4 changed files with 27 additions and 11 deletions

View File

@@ -240,14 +240,26 @@ roundcube_force_carddav_refresh() {
local pass="$2"
local assets_dir="${ASSETS_DIR:-tests/assets}"
local code
if [ ! -e "$RCM_DIR/bin/carddav_refresh.sh" ]; then
echo "Please ignore the following errors about no such table carddav_addressbooks and carddav_migrations"
local carddav_major
local sync_script
carddav_major=$(grep "PLUGIN_VERSION\\s*=" "$RCM_DIR/plugins/carddav/carddav.php" | head -1 | sed -e 's/^.*v\([0-9][0-9]*\).*$/\1/')
[ -z "$carddav_major" ] && carddav_major="3"
if [ $carddav_major -eq 3 ]; then
if [ ! -e "$RCM_DIR/bin/carddav_refresh.sh" ]; then
echo "Please ignore the following errors about no such table carddav_addressbooks and carddav_migrations"
fi
sync_script="$assets_dir/mail/roundcube/carddav_refresh_v3.sh"
else
sync_script="$assets_dir/mail/roundcube/carddav_refresh.sh"
fi
if ! cp "$assets_dir/mail/roundcube/carddav_refresh.sh" $RCM_DIR/bin
if ! cp "$sync_script" "$RCM_DIR/bin/carddav_refresh.sh"
then
return 1
fi
pushd "$RCM_DIR" >/dev/null
bin/carddav_refresh.sh "$user" "$pass"
code=$?