You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by dg...@apache.org on 2018/09/24 18:34:12 UTC
[trafficcontrol] branch 3.0.x updated: Prohibit content
invalidation requests for no-origin DS types
This is an automated email from the ASF dual-hosted git repository.
dgelinas pushed a commit to branch 3.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/3.0.x by this push:
new c293557 Prohibit content invalidation requests for no-origin DS types
c293557 is described below
commit c2935571bfbdd5a4f54ab09a76a7f7da0a30c2db
Author: Rawlin Peters <ra...@comcast.com>
AuthorDate: Fri Sep 21 15:23:13 2018 -0600
Prohibit content invalidation requests for no-origin DS types
Prevent the submission of content invalidation requests against DS types
that don't have origins (e.g. CLIENT_STEERING).
(cherry picked from commit c06696a6d9ad5f72805aea6211ce3108a25a342d)
---
traffic_ops/app/lib/API/Job.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/traffic_ops/app/lib/API/Job.pm b/traffic_ops/app/lib/API/Job.pm
index 7281444..fbd7c4a 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();