trafficcontrol icon indicating copy to clipboard operation
trafficcontrol copied to clipboard

Invalid "orgServerFqdn" in Delivery Service creation/update causes Internal Server Error

Open ocket8888 opened this issue 3 years ago • 1 comments

This Bug Report affects these Traffic Control components:

  • Traffic Ops

Current behavior:

Creating or updating a Delivery Service with an orgServerFqdn that can't be parsed as a URL returns a 500 Internal Server Error.

Expected behavior:

Improper property values should return a client-level error and an appropriate alert describing the problem.

Steps to reproduce:

$ topost -kp deliveryservices '{
	"active": false,
	"cdnId": 2,
	"displayName": "test",
	"dnsBypassCname": "test",
	"dscp": 1,
	"geoLimit": 1,
	"geoLimitCountries": "[US, CA]",
	"geoProvider": -7,
	"initialDispersion": 1,
	"ipv6RoutingEnabled": true,
	"logsEnabled": true,
	"missLat": 0,
	"missLong": 0,
	"multiSiteOrigin": false,
	"orgServerFqdn": "",
	"protocol": 7,
	"qstringIgnore": 5,
	"rangeRequestHandling": 0,
	"regionalGeoBlocking": false,
	"tenantId": 1,
	"typeId": 1,
	"xmlId": "test"
}'

ocket8888 avatar Apr 22 '22 19:04 ocket8888

Looks like this only happens if it's literally a blank string. Something like "This isn't a valid URL" will properly return a 400-level error explaining that this isn't a URL.

ocket8888 avatar Apr 22 '22 19:04 ocket8888