Skip to content
Snippets Groups Projects
Verified Commit b847d0fa authored by drebs's avatar drebs
Browse files

[bug] encode key before using it in local blobs storage

parent a2a41830
Branches
Tags
2 merge requests!88Attachments api,!87#8800 #8812 #8845
......@@ -20,6 +20,7 @@ Clientside BlobBackend Storage.
from urlparse import urljoin
import binascii
import errno
import os
import base64
......@@ -297,7 +298,9 @@ class SQLiteBlobBackend(object):
if not key:
raise ValueError('key cannot be None')
backend = 'pysqlcipher.dbapi2'
opts = sqlcipher.SQLCipherOptions('/tmp/ignored', key)
opts = sqlcipher.SQLCipherOptions(
'/tmp/ignored', binascii.b2a_hex(key),
is_raw_key=True, create=True)
pragmafun = partial(pragmas.set_init_pragmas, opts=opts)
openfun = _sqlcipherInitFactory(pragmafun)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment