diff options
| author | Kevin Jurczyk <oss@k-jurczyk.de> | 2016-11-08 12:12:16 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-11-08 12:16:57 -0500 |
| commit | b141f9f3c8c5c7348daff5aa2a30850c3bf673ba (patch) | |
| tree | 302f5f2278967918e55dba3f64924c6db88a3b75 | |
| parent | 942c2429c033255979b6a55de836b9b26370673e (diff) | |
| download | sqlalchemy-b141f9f3c8c5c7348daff5aa2a30850c3bf673ba.tar.gz | |
Add quotes around PRAGMA values in pysqlcipher connect.
Arguments such as cipher, kdf_iter, cipher_page_size and
cipher_use_hmac may (always?) require quotes within the
PRAGMA directive.
Change-Id: I2c808f34e1c44f0593b72b304e170e4af0a6035a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/319
| -rw-r--r-- | doc/build/changelog/changelog_11.rst | 7 | ||||
| -rw-r--r-- | lib/sqlalchemy/dialects/sqlite/pysqlcipher.py | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/build/changelog/changelog_11.rst b/doc/build/changelog/changelog_11.rst index d8f785556..4c8bdc7d9 100644 --- a/doc/build/changelog/changelog_11.rst +++ b/doc/build/changelog/changelog_11.rst @@ -22,6 +22,13 @@ :version: 1.1.4 .. change:: + :tags: bug, sqlite + + Added quotes to the PRAGMA directives in the pysqlcipher dialect + to support additional cipher arguments appropriately. Pull request + courtesy Kevin Jurczyk. + + .. change:: :tags: bug, postgresql :tickets: 3846, 3807 diff --git a/lib/sqlalchemy/dialects/sqlite/pysqlcipher.py b/lib/sqlalchemy/dialects/sqlite/pysqlcipher.py index bbafc8d60..4a501acac 100644 --- a/lib/sqlalchemy/dialects/sqlite/pysqlcipher.py +++ b/lib/sqlalchemy/dialects/sqlite/pysqlcipher.py @@ -100,7 +100,7 @@ class SQLiteDialect_pysqlcipher(SQLiteDialect_pysqlite): conn.execute('pragma key="%s"' % passphrase) for prag, value in pragmas.items(): if value is not None: - conn.execute('pragma %s=%s' % (prag, value)) + conn.execute('pragma %s="%s"' % (prag, value)) return conn |
