Require TLS by default when connecting to Postgres servers.

This commit is contained in:
Sadie Powell 2021-08-28 14:46:53 +01:00
parent b7615ccd86
commit 981b9e0409
2 changed files with 2 additions and 2 deletions

View File

@ -1709,7 +1709,7 @@
# pgsql is more complex than described here, see the docs for #
# more: https://docs.inspircd.org/3/modules/pgsql #
#
#<database module="pgsql" name="mydb" user="myuser" pass="mypass" host="localhost" id="my_database" ssl="no">
#<database module="pgsql" name="mydb" user="myuser" pass="mypass" host="localhost" id="my_database" tls="yes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Muteban: Implements extended ban 'm', which stops anyone matching

View File

@ -259,7 +259,7 @@ class SQLConn : public SQL::Provider, public EventHandler
if (conf->readString("pass", item))
conninfo << " password = '" << item << "'";
if (conf->getBool("ssl"))
if (conf->getBool("tls", conf->getBool("ssl", true)))
conninfo << " sslmode = 'require'";
else
conninfo << " sslmode = 'disable'";