[Ejabberd] More fixes for Ejabberd integration (WIP)

This commit is contained in:
andryyy
2021-02-12 10:04:19 +01:00
parent 2bac898a15
commit f2453e316f
7 changed files with 118 additions and 35 deletions

View File

@@ -98,16 +98,16 @@ class mailcowCommandExecutor implements CommandExecutorInterface {
return hash_equals(hash($scheme, $password, true), $hash);
case "SMD5":
return verify_salted_hash($hash, $password, 'md5', 16);
return self::verify_salted_hash($hash, $password, 'md5', 16);
case "SSHA":
return verify_salted_hash($hash, $password, 'sha1', 20);
return self::verify_salted_hash($hash, $password, 'sha1', 20);
case "SSHA256":
return verify_salted_hash($hash, $password, 'sha256', 32);
return self::verify_salted_hash($hash, $password, 'sha256', 32);
case "SSHA512":
return verify_salted_hash($hash, $password, 'sha512', 64);
return self::verify_salted_hash($hash, $password, 'sha512', 64);
default:
return false;

View File

@@ -172,6 +172,9 @@ fi
# Fix permissions for global filters
chown -R 82:82 /global_sieve/*
[[ ! -f /etc/nginx/conf.d/ejabberd.conf ]] && echo '# Autogenerated by mailcow' > /etc/nginx/conf.d/ejabberd.conf
chown 82:82 /etc/nginx/conf.d/ejabberd.conf
# Run hooks
for file in /hooks/*; do
if [ -x "${file}" ]; then