-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fixes #20372: there is no validation on the variable name in generic method variable_from_smth #1324
base: branches/rudder/6.1
Are you sure you want to change the base?
Conversation
…method variable_from_smth
# @parameter variable_name The variable to define, the full name will be variable_prefix.variable_name | ||
# @parameter value The variable content in JSON format | ||
# @parameter variable_prefix The prefix of the variable name | ||
# @parameter_constraint variable_prefix "regex" : "^[A-z0-9_]+$" |
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.
A-z
matches non letter chars too.
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.
We should use something like A-Za-z
instead.
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.
plus we need to make it possible to use a variable here, I don't remember if we have a mechanism on server part to skip constraint check in this case
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.
this mecanism should be server side, otherwise we would need to adapt every regex
…eneric method variable_from_smth Fixes #20372: there is no validation on the variable name in generic method variable_from_smth
PR updated with a new commit |
@ncharles is this really a wip ? |
https://issues.rudder.io/issues/20372