feature/sso-hardening #9

Merged
bstein merged 685 commits from feature/sso-hardening into main 2026-01-13 20:23:26 +00:00
Showing only changes of commit edd2189f3c - Show all commits

View File

@ -15,7 +15,14 @@ account_exists() {
local email="${2}"
# Nextcloud Mail does not provide a list command; export is safe (does not print passwords).
/usr/sbin/runuser -u www-data -- php occ mail:account:export "${user_id}" 2>/dev/null | grep -Fq -- "- E-Mail: ${email}"
local export
if ! export=$(/usr/sbin/runuser -u www-data -- php occ mail:account:export "${user_id}" 2>/dev/null); then
echo "WARN: unable to export mail accounts for ${user_id}; skipping sync for safety" >&2
return 0
fi
# Output formatting varies by Nextcloud/Mail versions and locale; match by email address.
grep -Fq -- "${email}" <<<"${export}"
}
token=$(