-
Notifications
You must be signed in to change notification settings - Fork 343
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 deep_caching_type validator regex #1800
Conversation
@@ -1387,7 +1387,7 @@ sub is_deliveryservice_valid { | |||
active => [ is_required("is required") ], | |||
cdnId => [ is_required("is required"), \&is_valid_int_or_undef ], | |||
ccrDnsTtl => [ \&is_valid_int_or_undef ], | |||
deepCachingType => [ is_like( qr/^NEVER|ALWAYS$/, "must be NEVER or ALWAYS" ) ], | |||
deepCachingType => [ is_like( qr/^(NEVER|ALWAYS)$/, "must be NEVER or ALWAYS" ) ], |
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.
really minor nit.. looks like current code is using TABs to align the arrows.. can you match?
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.
Done, but if it were up to me everything would be using spaces :)
The regex is missing parentheses which allows any string starting with NEVER or ending with ALWAYS to be considered valid, but it would be disallowed at the DB level because it's an enum type.
0fc210d
to
d4a1920
Compare
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server 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.
tested in dev environment
The regex is missing parentheses which allows any string starting with
NEVER or ending with ALWAYS to be considered valid, but it would be
disallowed at the DB level because it's an enum type.
Thanks, @dangogh, for finding this!