fix(gws): coerce target_org_units to array in check-user-filter#2681
Merged
Conversation
The target_org_units variable (multi-select) can be stored as a string when a single value is saved. The code assumed it was always an array, causing .join() and .some() to crash with 'join is not a function'. Coerce string values to a single-element array in parseGoogleWorkspaceCheckUserFilter. Fixes: Snoonu customer GWS 2FA check failing with 'userFilterConfig.targetOrgUnits.join is not a function'
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
🎉 This PR is included in version 3.33.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cherry-pick of
65e60ccfrommainontoreleaseso we can ship this fix without bringing along the rest of main's in-flight changes.Fixes the Google Workspace check-user-filter crash where
target_org_units(multi-select) is stored as a string when only a single value is saved. The code assumed it was always an array, causing.join()and.some()to throw'join is not a function'.Hit in production by Snoonu's GWS 2FA check.
Changes
parseGoogleWorkspaceCheckUserFilter: coerce string values into a single-element array; returnundefinedwhen missing.Why cherry-pick
mainhas unrelated changes not yet ready for prod. This is a self-contained hotfix — only touchespackages/integration-platform/src/manifests/google-workspace/.Test plan
Summary by cubic
Hotfix for Google Workspace user filter: coerce
target_org_unitsto an array when a single value is stored as a string. Prevents "join is not a function" crashes in the GWS 2FA check.target_org_units(string -> [string], missing -> undefined).Written for commit f5e6754. Summary will update on new commits. Review in cubic