summaryrefslogtreecommitdiffstats
path: root/web/api
diff options
context:
space:
mode:
authorPavlos Emm. Katsoulakis <paul@netdata.rocks>2019-06-07 18:14:26 +0300
committerPavlos Emm. Katsoulakis <paul@netdata.rocks>2019-06-07 18:14:26 +0300
commitd6f3937b4d4bffedb8a8cc61f80affde7f17b180 (patch)
tree880889241d456dcf0b7bf15f2092ff74d720d148 /web/api
parent77c1859506a0488993a98c5623937015928fde05 (diff)
Revert "MGMT_fixes change functions (#6242)"
This reverts commit 083378203c405665092f358e5f356f2afbb2ca15. --- As agreed with @thiago and @cakrit we revert URL parser changes, to buy the time on a more detailed investigation ---
Diffstat (limited to 'web/api')
-rw-r--r--web/api/health/health_cmdapi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/web/api/health/health_cmdapi.c b/web/api/health/health_cmdapi.c
index 42e1781d35..eac3daf06b 100644
--- a/web/api/health/health_cmdapi.c
+++ b/web/api/health/health_cmdapi.c
@@ -87,7 +87,7 @@ int web_client_api_request_v1_mgmt_health(RRDHOST *host, struct web_client *w, c
debug(D_WEB_CLIENT, "%llu: API v1 health query param '%s' with value '%s'", w->id, key, value);
// name and value are now the parameters
- if (!strcmp(key, "cmd")) {
+ if (!strncmp(key, "cmd",lkey)) {
if (!strcmp(value, HEALTH_CMDAPI_CMD_SILENCEALL)) {
silencers->all_alarms = 1;
silencers->stype = STYPE_SILENCE_NOTIFICATIONS;
@@ -124,19 +124,19 @@ int web_client_api_request_v1_mgmt_health(RRDHOST *host, struct web_client *w, c
}
}
- if (hash == hash_alarm && !strcasecmp(key, HEALTH_ALARM_KEY)) {
+ if (hash == hash_alarm && !strncasecmp(key, HEALTH_ALARM_KEY,lkey)) {
silencer->alarms = strdupz(value);
silencer->alarms_pattern = simple_pattern_create(silencer->alarms, NULL, SIMPLE_PATTERN_EXACT);
- } else if (hash == hash_chart && !strcasecmp(key, HEALTH_CHART_KEY)) {
+ } else if (hash == hash_chart && !strncasecmp(key, HEALTH_CHART_KEY,lkey)) {
silencer->charts = strdupz(value);
silencer->charts_pattern = simple_pattern_create(silencer->charts, NULL, SIMPLE_PATTERN_EXACT);
- } else if (hash == hash_context && !strcasecmp(key, HEALTH_CONTEXT_KEY)) {
+ } else if (hash == hash_context && !strncasecmp(key, HEALTH_CONTEXT_KEY,lkey)) {
silencer->contexts = strdupz(value);
silencer->contexts_pattern = simple_pattern_create(silencer->contexts, NULL, SIMPLE_PATTERN_EXACT);
- } else if (hash == hash_host && !strcasecmp(key, HEALTH_HOST_KEY)) {
+ } else if (hash == hash_host && !strncasecmp(key, HEALTH_HOST_KEY,lkey)) {
silencer->hosts = strdupz(value);
silencer->hosts_pattern = simple_pattern_create(silencer->hosts, NULL, SIMPLE_PATTERN_EXACT);
- } else if (hash == hash_families && !strcasecmp(key, HEALTH_FAMILIES_KEY)) {
+ } else if (hash == hash_families && !strncasecmp(key, HEALTH_FAMILIES_KEY,lkey)) {
silencer->families = strdupz(value);
silencer->families_pattern = simple_pattern_create(silencer->families, NULL, SIMPLE_PATTERN_EXACT);
} else {