Software /
code /
prosody
Changeset
13715:edd006093533 13.0
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 16 Feb 2025 11:52:07 +0100 |
parents | 13713:4a687745bb51 |
children | 13716:953108962cd0 13717:4f173a44370b |
files | util/sql.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/sql.lua Sat Feb 15 17:10:30 2025 +0000 +++ b/util/sql.lua Sun Feb 16 11:52:07 2025 +0100 @@ -84,7 +84,7 @@ 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;