-
-
Notifications
You must be signed in to change notification settings - Fork 741
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: disallow invalid tag values #7268
Merged
thomasheartman
merged 9 commits into
main
from
fix/1-2454-bug-tags-can-have-whitespace-or-be-entirely-whitespace
Jun 5, 2024
Merged
fix: disallow invalid tag values #7268
thomasheartman
merged 9 commits into
main
from
fix/1-2454-bug-tags-can-have-whitespace-or-be-entirely-whitespace
Jun 5, 2024
Conversation
This file contains 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
There was a circular dependency going on which prevented these values from ever being validated.
thomasheartman
force-pushed
the
fix/1-2454-bug-tags-can-have-whitespace-or-be-entirely-whitespace
branch
from
June 4, 2024 10:37
cc7377f
to
f42b592
Compare
kwasniew
reviewed
Jun 4, 2024
kwasniew
reviewed
Jun 4, 2024
kwasniew
approved these changes
Jun 4, 2024
This is to separate it from the responses we use. Because if your existing tags were "invalid" based on this new validation, Unleash shouldn't complain about it.
thomasheartman
deleted the
fix/1-2454-bug-tags-can-have-whitespace-or-be-entirely-whitespace
branch
June 5, 2024 06:31
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.
This PR fixes how Unleash handles tag values. Specifically, it does these things:
Additionally, it moves the tag length constants into the constants file from the Joi tag schema file. This is because importing the values previously rendered them as undefined (probably due to a circular dependency somewhere in the system). This means that the previous values were also ignored by OpenAPI.
UI updates reflecting this wil follow.
Background
When you tag a flag, there's nothing stopping you from using an entirely empty tag or a tag with leading/trailing whitespace.
Empty tags make little sense and leading trailing whitespace differences are incredibly subtle:
Additionally, leading and trailing whitespace is not shown in the dropdown list, so you'd have to guess at which is the right one.