From 819459d0c6d32b2bd89d54ffcf1abfc131d12c07 Mon Sep 17 00:00:00 2001 From: nicoo Date: Thu, 26 Aug 2021 16:17:22 +0200 Subject: [PATCH] pw_models: Use SQLAlchemy's LargeBinary type This should work under ~all usual databases. --- app/pw_models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/pw_models.py b/app/pw_models.py index 363537a67..b0e420c39 100644 --- a/app/pw_models.py +++ b/app/pw_models.py @@ -6,6 +6,7 @@ import bcrypt from nacl.secret import Aead +from sqlalchemy.types import LargeBinary from sqlalchemy_utils import ChoiceType from app.config import PW_SITE_KEY @@ -123,7 +124,7 @@ def oracle(self) -> KeyedOracle: class PasswordOracle: - pw_blob = db.Column(db.BINARY, nullable=True) + pw_blob = db.Column(LargeBinary, nullable=True) pw_kind = db.Column(ChoiceType(PasswordKind), nullable=True) def set_password(self, password):