From 777a8e6413f5e979f3df6dd6d2de9116bf104fcd Mon Sep 17 00:00:00 2001 From: Paul Rhodes Date: Mon, 17 Mar 2025 10:22:48 +0000 Subject: [PATCH 1/3] fix: Ensure sub is a string when generating JWT tokens (#2321) --- flask_appbuilder/security/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flask_appbuilder/security/api.py b/flask_appbuilder/security/api.py index 936981d6f8..268333f9ad 100644 --- a/flask_appbuilder/security/api.py +++ b/flask_appbuilder/security/api.py @@ -105,11 +105,11 @@ def login(self) -> Response: # Identity can be any data that is json serializable resp = dict() resp[API_SECURITY_ACCESS_TOKEN_KEY] = create_access_token( - identity=user.id, fresh=True + identity=str(user.id), fresh=True ) if "refresh" in login_payload and login_payload["refresh"]: resp[API_SECURITY_REFRESH_TOKEN_KEY] = create_refresh_token( - identity=user.id + identity=str(user.id) ) return self.response(200, **resp) From 5952a248a34a1ffea1ee4fd674bda03f230d9d39 Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Mon, 14 Apr 2025 15:47:58 +0100 Subject: [PATCH 2/3] release: 4.5.5 --- CHANGELOG.rst | 15 +++++++++++++++ flask_appbuilder/__init__.py | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4380978780..70d1d32893 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,21 @@ Flask-AppBuilder ChangeLog ========================== +Improvements and Bug fixes on 4.5.5 +----------------------------------- + +- release: 4.6.1 (#2330) [Daniel Vaz Gaspar] +- fix: improve API for role users update (#2328) [Daniel Vaz Gaspar] +- fix: openAPI spec for security update role users (#2326) [Daniel Vaz Gaspar] +- feat(RoleApi): Add role/:id/users endpoint (#2319) [Enzo Martellucci] +- fix: Ensure sub is a string when generating JWT tokens (#2321) [Paul Rhodes] +- release: 4.6.0 (#2318) [Daniel Vaz Gaspar] +- fix: relax marshmallow-sqlalchemy version constraint to fix compatibility with marshmallow>=3.24 (#2298) [Steven Loria] +- docs: Fix edit template code example (#2308) [Matthew Schmoyer] +- feat: security user groups (#2305) [Daniel Vaz Gaspar] +- ci: fix mssql on CI (#2316) [Daniel Vaz Gaspar] +- doc: update `requirements` paths in contributing doc (#2313) [Đỗ Trọng Hải] + Improvements and Bug fixes on 4.5.4 ----------------------------------- diff --git a/flask_appbuilder/__init__.py b/flask_appbuilder/__init__.py index 351f8b5b8d..498e4eb582 100644 --- a/flask_appbuilder/__init__.py +++ b/flask_appbuilder/__init__.py @@ -1,5 +1,5 @@ __author__ = "Daniel Vaz Gaspar" -__version__ = "4.5.4" +__version__ = "4.5.5" from .actions import action # noqa: F401 from .api import ModelRestApi # noqa: F401 From 070e81fe30ea9d4c87c3de2f92eb5ce0fbf9617a Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Mon, 14 Apr 2025 15:53:02 +0100 Subject: [PATCH 3/3] fix changelog --- CHANGELOG.rst | 10 ---------- flask_appbuilder/__init__.py | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 70d1d32893..db42fee3be 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,17 +4,7 @@ Flask-AppBuilder ChangeLog Improvements and Bug fixes on 4.5.5 ----------------------------------- -- release: 4.6.1 (#2330) [Daniel Vaz Gaspar] -- fix: improve API for role users update (#2328) [Daniel Vaz Gaspar] -- fix: openAPI spec for security update role users (#2326) [Daniel Vaz Gaspar] -- feat(RoleApi): Add role/:id/users endpoint (#2319) [Enzo Martellucci] - fix: Ensure sub is a string when generating JWT tokens (#2321) [Paul Rhodes] -- release: 4.6.0 (#2318) [Daniel Vaz Gaspar] -- fix: relax marshmallow-sqlalchemy version constraint to fix compatibility with marshmallow>=3.24 (#2298) [Steven Loria] -- docs: Fix edit template code example (#2308) [Matthew Schmoyer] -- feat: security user groups (#2305) [Daniel Vaz Gaspar] -- ci: fix mssql on CI (#2316) [Daniel Vaz Gaspar] -- doc: update `requirements` paths in contributing doc (#2313) [Đỗ Trọng Hải] Improvements and Bug fixes on 4.5.4 ----------------------------------- diff --git a/flask_appbuilder/__init__.py b/flask_appbuilder/__init__.py index 498e4eb582..4438fd0016 100644 --- a/flask_appbuilder/__init__.py +++ b/flask_appbuilder/__init__.py @@ -1,5 +1,5 @@ __author__ = "Daniel Vaz Gaspar" -__version__ = "4.5.5" +__version__ = "4.5.5rc1" from .actions import action # noqa: F401 from .api import ModelRestApi # noqa: F401