fix: validate feature flag endpoint management#2788
Open
kongwen686 wants to merge 1 commit into
Open
Conversation
Author
|
Payment / contact note if this PR is accepted for a bounty or reward: I am based in mainland China and Stripe onboarding may not be available for me. PayPal would be the preferred payout method if supported: hooqee@126.com. Contact email: chaoqiang.tian@gmail.com Please let me know which payout route is supported. |
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
Why
The endpoint management API existed, but it could silently skip duplicate adds, accept invalid paths, and update an endpoint without first proving it belongs to the feature flag in the route. These gaps make the API behavior differ from the validation and ownership requirements in #2249.
Validation
git diff --checkgo test ./handlers -run FeatureFlagEndpointcould not run in this environment becausegois not installedgofmt -w handlers/feature_flags.go handlers/feature_flags_test.gocould not run in this environment becausegofmtis not installedPayment/contact
Refs #2249