Hello! We are running our annual fundraising. Please consider making a donation if you value this freely available service or want to support people around the world working towards liberatory social change. https://riseup.net/donate.

Verified Commit b847d0fa authored by drebs's avatar drebs
Browse files

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

parent a2a41830
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment