diff options
author | Kim Alvefur <zash@zash.se> | 2025-02-16 11:52:07 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2025-02-16 11:52:07 +0100 |
commit | 037c70246dc7715c896e00b3d177d61499c9d7ee (patch) | |
tree | ef5a779b87d12a8c957c5f82d6f6e5483fa3bb63 /util/sql.lua | |
parent | 9bae17a0bb56e92299ea4d7062c5594b60b0e544 (diff) | |
download | prosody-037c70246dc7715c896e00b3d177d61499c9d7ee.tar.gz prosody-037c70246dc7715c896e00b3d177d61499c9d7ee.zip |
util.sql: Don't send SQLCipher key to Postgres or MySQL (thanks gllmhyt)
This was copied from util.sqlite3 which only deals with SQLite3, but
here Postgres or MySQL are also possibilities, which wouldn't support
this.
Diffstat (limited to 'util/sql.lua')
-rw-r--r-- | util/sql.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/sql.lua b/util/sql.lua index 2f0ec493..06550455 100644 --- a/util/sql.lua +++ b/util/sql.lua @@ -84,7 +84,7 @@ function engine:connect() dbh:autocommit(false); -- don't commit automatically self.conn = dbh; self.prepared = {}; - if params.password then + if params.driver == "SQLite3" and params.password then local ok, err = self:execute(("PRAGMA key='%s'"):format(dbh:quote(params.password))); if not ok then return ok, err; |