You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/02/06 23:22:26 UTC

[incubator-trafficcontrol] branch master updated: Fix deep_caching_type validator regex

This is an automated email from the ASF dual-hosted git repository.

dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new f65852f  Fix deep_caching_type validator regex
f65852f is described below

commit f65852ffa9312630e5f60169a4251b682b8cf01f
Author: Rawlin Peters <ra...@comcast.com>
AuthorDate: Fri Jan 26 14:25:35 2018 -0700

    Fix deep_caching_type validator regex
    
    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.
---
 traffic_ops/app/lib/API/Deliveryservice.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traffic_ops/app/lib/API/Deliveryservice.pm b/traffic_ops/app/lib/API/Deliveryservice.pm
index 675c1da..9a8018d 100644
--- a/traffic_ops/app/lib/API/Deliveryservice.pm
+++ b/traffic_ops/app/lib/API/Deliveryservice.pm
@@ -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" ) ],
 			dnsBypassTtl			=> [ \&is_valid_int_or_undef ],
 			dscp				=> [ is_required("is required"), \&is_valid_int_or_undef ],
 			displayName			=> [ is_required("is required"), is_long_at_most( 48, 'too long' ) ],

-- 
To stop receiving notification emails like this one, please contact
dangogh@apache.org.