From bb0d92db2d0fd4f2234729187e24789a623b143e Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Tue, 26 Apr 2022 12:00:36 +0200 Subject: [PATCH] VC/Zoom: Fix error with slashes in user identifiers --- vc_zoom/README.md | 4 ++++ vc_zoom/indico_vc_zoom/util.py | 3 ++- vc_zoom/setup.cfg | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/vc_zoom/README.md b/vc_zoom/README.md index f7707e0..29910c8 100644 --- a/vc_zoom/README.md +++ b/vc_zoom/README.md @@ -11,6 +11,10 @@ ## Changelog +### 3.1.3 + +- Fix error with user identifiers (in "authenticators" lookup mode) containing a forward slash + ### 3.1.2 - Do not include Zoom link in event descriptions returned by the HTTP API (iCalendar files for diff --git a/vc_zoom/indico_vc_zoom/util.py b/vc_zoom/indico_vc_zoom/util.py index 550560e..14ca253 100644 --- a/vc_zoom/indico_vc_zoom/util.py +++ b/vc_zoom/indico_vc_zoom/util.py @@ -60,7 +60,8 @@ def _iter_user_identifiers(user): done = set() for provider in ZoomPlugin.settings.get('authenticators'): for __, identifier in user.iter_identifiers(check_providers=True, providers={provider}): - if identifier in done: + # skip garbage that breaks API calls; a valid identifier will never contain a slash.. + if identifier in done or '/' in identifier: continue done.add(identifier) yield identifier diff --git a/vc_zoom/setup.cfg b/vc_zoom/setup.cfg index cb3720f..cbd3ef2 100644 --- a/vc_zoom/setup.cfg +++ b/vc_zoom/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = indico-plugin-vc-zoom -version = 3.1.2 +version = 3.1.3 description = Zoom video-conferencing plugin for Indico long_description = file: README.md long_description_content_type = text/markdown; charset=UTF-8; variant=GFM