From a85c429a857c21b64bf3c510f63f86bc2bf3d2df Mon Sep 17 00:00:00 2001 From: Arno Hautala Date: Sun, 19 Dec 2021 08:33:59 -0500 Subject: [PATCH 1/2] regex change to exclude comma from sasl_username (#2074) as proposed in #2071 by @jvolkenant --- management/mail_log.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/management/mail_log.py b/management/mail_log.py index 59c32c6e..bdf757cc 100755 --- a/management/mail_log.py +++ b/management/mail_log.py @@ -549,8 +549,9 @@ def scan_postfix_submission_line(date, log, collector): """ # Match both the 'plain' and 'login' sasl methods, since both authentication methods are - # allowed by Dovecot - m = re.match("([A-Z0-9]+): client=(\S+), sasl_method=(PLAIN|LOGIN), sasl_username=(\S+)", log) + # allowed by Dovecot. Exclude trailing comma after the username when additional fields + # follow after. + m = re.match("([A-Z0-9]+): client=(\S+), sasl_method=(PLAIN|LOGIN), sasl_username=(\S+)(? Date: Sat, 25 Dec 2021 07:17:34 -0800 Subject: [PATCH 2/2] Don't die if column already exists on Nextcloud 18 upgrade (#2078) --- setup/nextcloud.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup/nextcloud.sh b/setup/nextcloud.sh index af848344..b43816e4 100755 --- a/setup/nextcloud.sh +++ b/setup/nextcloud.sh @@ -172,7 +172,8 @@ if [ ! -d /usr/local/lib/owncloud/ ] || [[ ! ${CURRENT_NEXTCLOUD_VER} =~ ^$nextc CURRENT_NEXTCLOUD_VER="17.0.6" fi if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^17 ]]; then - echo "ALTER TABLE oc_flow_operations ADD COLUMN entity VARCHAR;" | sqlite3 $STORAGE_ROOT/owncloud/owncloud.db + # Don't exit the install if this column already exists (see #2076) + (echo "ALTER TABLE oc_flow_operations ADD COLUMN entity VARCHAR;" | sqlite3 $STORAGE_ROOT/owncloud/owncloud.db 2>/dev/null) || true InstallNextcloud 18.0.10 39c0021a8b8477c3f1733fddefacfa5ebf921c68 3.4.1 aee680a75e95f26d9285efd3c1e25cf7f3bfd27e 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a CURRENT_NEXTCLOUD_VER="18.0.10" fi