-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
validate ids prior to using as seed for transmission schedule #14116
Conversation
) | ||
|
||
// Workflow IDs and Execution IDs are 32-byte hex-encoded strings | ||
func ValidateWorkflowOrExecutionID(id string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind keeping it in utils.go? Or alternatively moving all the validators to validation.go and their tests to validation_test.go? We are now in a messy state where some methods are here and some there... My preference is to keep stuff in utils.go as it minimizes the total amount of changes needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah crap, yeah I should have at least moved the corresponding tests, my bad. The utils stuff is used outside of the remote package as well now so should sit outside that, I'll tidy it up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved the validation logic used in remote and other packages in capabilities into validation package along with the corresponding tests. All other logic that is used only in remote package has been kept in the remote/utils.go file.
6afe791
to
8116158
Compare
Quality Gate passedIssues Measures |
resolves-> https://smartcontract-it.atlassian.net/browse/KS-404