From 6757a3f9f651a6a10dcc1c8127c3691ea49ed79d Mon Sep 17 00:00:00 2001 From: QiTao Weng Date: Thu, 4 Nov 2021 02:31:13 -0500 Subject: [PATCH] #2770: Add validation for httpBypassFqdn as hostname in Traffic Ops --- CHANGELOG.md | 1 + .../traffic_ops_golang/deliveryservice/deliveryservices.go | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 647de0b028..81e5854a56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ## [unreleased] ### Added +- [#2770](https://github.com/apache/trafficcontrol/issues/2770) Added validation for httpBypassFqdn as hostname in Traffic Ops - Added permission based roles for better access control. - [#5674](https://github.com/apache/trafficcontrol/issues/5674) Added new query parameters `cdn` and `maxRevalDurationDays` to the `GET /api/x/jobs` Traffic Ops API to filter by CDN name and within the start_time window defined by the `maxRevalDurationDays` GLOBAL profile parameter, respectively. - Added a new Traffic Ops cdn.conf option -- `disable_auto_cert_deletion` -- in order to optionally prevent the automatic deletion of certificates for delivery services that no longer exist whenever a CDN snapshot is taken. diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go b/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go index 7a675fb212..abbfb7d43c 100644 --- a/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go +++ b/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go @@ -1345,6 +1345,7 @@ func Validate(tx *sql.Tx, ds *tc.DeliveryServiceV4) error { "dscp": validation.Validate(ds.DSCP, validation.NotNil, validation.Min(0)), "geoLimit": validation.Validate(ds.GeoLimit, validation.NotNil), "geoProvider": validation.Validate(ds.GeoProvider, validation.NotNil), + "httpByPassFqdn": validation.Validate(ds.HTTPBypassFQDN, isDNSName), "logsEnabled": validation.Validate(ds.LogsEnabled, validation.NotNil), "regionalGeoBlocking": validation.Validate(ds.RegionalGeoBlocking, validation.NotNil), "remapText": validation.Validate(ds.RemapText, noLineBreaks),