From 14d29c7a92b74a111a10c7a59d0305c5676d2cbe Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Mon, 5 Dec 2022 16:21:32 +0530 Subject: [PATCH] Fixed an issue where master password was not set correctly with external config database. #5603 --- docs/en_US/release_notes_6_18.rst | 1 + web/pgadmin/model/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_6_18.rst b/docs/en_US/release_notes_6_18.rst index 760153736..9b7f9c5fd 100644 --- a/docs/en_US/release_notes_6_18.rst +++ b/docs/en_US/release_notes_6_18.rst @@ -26,3 +26,4 @@ Bug fixes | `Issue #5453 `_ - Fixed an issue where Transaction IDs were not found in session in the Query Tool. | `Issue #5564 `_ - Ensure that table statistics are sorted by size. + | `Issue #5603 `_ - Fixed an issue where master password was not set correctly with external config database. diff --git a/web/pgadmin/model/__init__.py b/web/pgadmin/model/__init__.py index 4e1bedeba..9cbd96367 100644 --- a/web/pgadmin/model/__init__.py +++ b/web/pgadmin/model/__init__.py @@ -92,10 +92,10 @@ class User(db.Model, UserMixin): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(256), nullable=True) username = db.Column(db.String(64), unique=True, nullable=False) - password = db.Column(db.String(256)) + password = db.Column(PgAdminDbBinaryString()) active = db.Column(db.Boolean(), nullable=False) confirmed_at = db.Column(db.DateTime()) - masterpass_check = db.Column(db.String(256)) + masterpass_check = db.Column(PgAdminDbBinaryString()) roles = db.relationship('Role', secondary=roles_users, backref=db.backref('users', lazy='dynamic')) auth_source = db.Column(db.String(16), unique=True, nullable=False)