-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sdk): Fix possible panic for
AttributeValueFQN.Prefix()
(#1472)
This commit adds additional checks to validate that Attribute Name / Values are not empty or contain a slash. This fixes a panic condition where `NewAttributeValueFQN` would return without error but `Prefix()` would then fail when the prefix is attempted to be parsed by `NewAttributeNameFQN`. This commit includes unit testing, and the fuzz testing that initially discovered this issue. See there for possibly dangerous values. An alternative or additional solution that we may want to consider: If `Prefix()` is a common or frequent operation we could proactively invoke the `NewAttributeNameFQN` from within `NewAttributeValueFQN`. That way any future validation added to `NewAttributeNameFQN` would be proactively checked rather than needing `Prefix()` to be invoked to be tested. Also included are some minor doc changes, spelling fixes, and some other fuzz testing that was co-located with these changes. PR closes #1468
- Loading branch information
Showing
3 changed files
with
139 additions
and
4 deletions.
There are no files selected for viewing
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
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
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