@cryptotaxi247 / netdata-1 / commits / 8a7193245

Registry delete should allow deleting the host we are looking at (#5537)

* Remove check on whether a server delete request comes from the same server we are looking at

Chris Akritidis committed Mar 4, 2019 at 09:36 UTC 8a719324519ca9373e935241164b97bef052b168
1 file changed +7
registry/registry_internals.c
+7
@@ -126,6 +126,11 @@ REGISTRY_PERSON_URL *registry_verify_request(char *person_guid, char *machine_gu
126 info("Registry Request Verification: URL not found for person, person: '%s', machine '%s', url '%s'", person_guid, machine_guid, url);
127 return NULL;
128 }
129 + //else if (pu->machine != m) {
130 + // info("Registry Request Verification: Machine mismatch: person: '%s', machine requested='%s' <> loaded='%s', url '%s'", person_guid, machine_guid, pu->machine->guid, url);
131 + // return NULL;
132 + //}
133 +
134 return pu;
135 }
136
@@ -171,11 +176,13 @@ REGISTRY_PERSON *registry_request_delete(char *person_guid, char *machine_guid,
176 delete_url = registry_fix_url(delete_url, NULL);
177
178 // make sure the user is not deleting the url it uses
179 + /*
180 if(!strcmp(delete_url, pu->url->url)) {
181 info("Registry Delete Request: delete URL is the one currently accessed, person: '%s', machine '%s', url '%s', delete url '%s'"
182 , p->guid, m->guid, pu->url->url, delete_url);
183 return NULL;
184 }
185 + */
186
187 REGISTRY_PERSON_URL *dpu = registry_person_url_index_find(p, delete_url);
188 if(!dpu) {