You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/09/24 18:34:09 UTC

[GitHub] dg4prez closed pull request #2860: Prohibit content invalidation requests for no-origin DS types

dg4prez closed pull request #2860: Prohibit content invalidation requests for no-origin DS types
URL: https://github.com/apache/trafficcontrol/pull/2860
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/app/lib/API/Job.pm b/traffic_ops/app/lib/API/Job.pm
index 72814448f..fbd7c4ad6 100644
--- a/traffic_ops/app/lib/API/Job.pm
+++ b/traffic_ops/app/lib/API/Job.pm
@@ -168,6 +168,10 @@ sub create_current_user_job {
 	if ( !defined($ds) ) {
 		return $self->not_found();
 	}
+	my $org_server_fqdn = UI::DeliveryService::compute_org_server_fqdn($self, $ds_id);
+	if ( !defined($org_server_fqdn) ) {
+		return $self->alert("cannot invalidate content: requested delivery service has no origin");
+	}
 
 	my $tenant_utils = Utils::Tenant->new($self);
 	my $tenants_data = $tenant_utils->create_tenants_data_from_db();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services