Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Match all whitespace and non-whitespace for Pub/Sub subscription filter validation #2787

Conversation

modular-magician
Copy link
Collaborator

This change the regular expression validation for Pub/Sub subscriptions to use [\s\S] instead of . when matching characters to match both whitespace and non-whitespace characters. Because we allow empty filters (see this issue), having only whitespace characters (which would be matched by this filter) is valid as well. This will not introduce any breaking changes as it only expands the character set for subscription filters.

This fixes this issue.

Release Note Template for Downstream PRs (will be copied)

pubsub: allowed `google_pubsub_subscription` `filter` field to contain line breaks

Derived from GoogleCloudPlatform/magic-modules#11676

… filter validation (#11676)

[upstream:1f1fc6f3190c6c9345fa91c1db305a98fac7b357]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician requested a review from a team as a code owner September 12, 2024 15:19
@modular-magician modular-magician requested review from shuyama1 and removed request for a team September 12, 2024 15:19
@modular-magician modular-magician merged commit 5d33a41 into GoogleCloudPlatform:main Sep 12, 2024
4 checks passed
@modular-magician modular-magician deleted the downstream-pr-1f1fc6f3190c6c9345fa91c1db305a98fac7b357 branch November 18, 2024 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pubsub subscription filters with newlines are no longer allowed by validator
1 participant