|
@@ -51,6 +51,7 @@ prosody_nightly_url="https://prosody.im/nightly/${prosody_latest_version}/latest
|
51
|
51
|
# From https://hg.prosody.im/prosody-modules
|
52
|
52
|
prosody_modules_filename='prosody-modules-20180322.tar.gz'
|
53
|
53
|
prosody_modules_hash='982d0dfcef98e9cb9cee4cc3801b8ce9a503a32e44c32b99df6fe94545b90072'
|
|
54
|
+xmpp_encryption_warning=$"For security reasons, OMEMO or PGP encryption is required for conversations on this server."
|
54
|
55
|
|
55
|
56
|
xmpp_variables=(ONION_ONLY
|
56
|
57
|
INSTALLED_WITHIN_DOCKER
|
|
@@ -818,11 +819,16 @@ function xmpp_create_config {
|
818
|
819
|
else
|
819
|
820
|
echo " dhparam = \"/etc/ssl/certs/xmpp.dhparam\";" >> /etc/prosody/prosody.cfg.lua
|
820
|
821
|
fi
|
|
822
|
+
|
821
|
823
|
{ echo '}';
|
822
|
824
|
echo '';
|
823
|
825
|
echo 'c2s_require_encryption = true';
|
824
|
826
|
echo 's2s_require_encryption = true';
|
825
|
827
|
echo '';
|
|
828
|
+ echo 'e2e_policy_muc = "none"';
|
|
829
|
+ echo 'e2e_policy_chat = "required"';
|
|
830
|
+ echo "e2e_policy_message_required_chat = \"$xmpp_encryption_warning\"";
|
|
831
|
+ echo '';
|
826
|
832
|
echo 's2s_secure_auth = false';
|
827
|
833
|
echo '';
|
828
|
834
|
echo 'authentication = "internal_hashed"';
|
|
@@ -838,6 +844,9 @@ function xmpp_create_config {
|
838
|
844
|
echo ''; } >> /etc/prosody/prosody.cfg.lua
|
839
|
845
|
if [[ "$ONION_ONLY" != 'no' ]]; then
|
840
|
846
|
echo "VirtualHost \"${XMPP_ONION_HOSTNAME}\"" >> /etc/prosody/prosody.cfg.lua
|
|
847
|
+ # TLS is not needed for onion transport security
|
|
848
|
+ sed -i 's|s2s_require_encryption =.*|s2s_require_encryption = false|g' /etc/prosody/prosody.cfg.lua
|
|
849
|
+ sed -i 's|c2s_require_encryption =.*|c2s_require_encryption = false|g' /etc/prosody/prosody.cfg.lua
|
841
|
850
|
else
|
842
|
851
|
echo "VirtualHost \"${DEFAULT_DOMAIN_NAME}\"" >> /etc/prosody/prosody.cfg.lua
|
843
|
852
|
fi
|