From 17d98dff951ad0fa8c41815222bf361707f5daa4 Mon Sep 17 00:00:00 2001 From: Evan Blaudy Date: Thu, 21 Nov 2024 20:52:07 +0100 Subject: [PATCH 1/2] [requirements] upgrade --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 96d9af032..808ef615c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -62,7 +62,7 @@ install_requires = opencv-python==4.10.0.84 OpenTimelineIO==0.17.0 OpenTimelineIO-Plugins==0.17.0 - orjson==3.10.11 + orjson==3.10.12 pillow==11.0.0 psutil==6.1.0 psycopg[binary]==3.2.3 @@ -105,7 +105,7 @@ test = monitoring = prometheus-flask-exporter==0.23.1 pygelf==0.4.2 - sentry-sdk==2.18.0 + sentry-sdk==2.19.0 lint = autoflake==2.3.1 From 2e3343cd47c339c2d6fdeac8f998e7c676c993f0 Mon Sep 17 00:00:00 2001 From: Evan Blaudy Date: Tue, 26 Nov 2024 14:54:02 +0100 Subject: [PATCH 2/2] [SAML] use only specific attributes from payload to pass to create/update_person --- zou/app/blueprints/auth/resources.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/zou/app/blueprints/auth/resources.py b/zou/app/blueprints/auth/resources.py index cf409d65c..6ddd64486 100644 --- a/zou/app/blueprints/auth/resources.py +++ b/zou/app/blueprints/auth/resources.py @@ -1362,8 +1362,22 @@ def post(self): authn_response.get_identity() email = authn_response.get_subject().text person_info = { - k: v if not isinstance(v, list) else " ".join(v) + k: ( + " ".join(v) + if isinstance(v, list) and k in ["first_name", "last_name"] + else v + ) for k, v in authn_response.ava.items() + if k + in [ + "first_name", + "last_name", + "phone", + "role", + "departments", + "studio_id", + "active", + ] } try: user = persons_service.get_person_by_email(email)