From 76e3e6ad6b3ae2775ef0cd8eafb8edb92596fdd5 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Wed, 23 Jun 2021 09:28:33 +0000 Subject: [PATCH] Update: Improved handling of bad tags in _parse_relay() --- src/cfgfile.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cfgfile.c b/src/cfgfile.c index 58685408..f036958e 100644 --- a/src/cfgfile.c +++ b/src/cfgfile.c @@ -2073,11 +2073,17 @@ static void _parse_relay(xmlDocPtr doc, } else if (strcmp(tmp, "default") == 0) { _parse_relay_upstream(doc, node->xmlChildrenNode, &(relay->upstream_default), configuration); } else { + __found_bad_tag(configuration, node, BTR_INVALID, tmp); ICECAST_LOG_WARN(" of unknown type is ignored."); } if (tmp) xmlFree(tmp); + } else if (xmlStrcmp(node->name, XMLSTR("server")) == 0 || xmlStrcmp(node->name, XMLSTR("port")) == 0 || + xmlStrcmp(node->name, XMLSTR("mount")) == 0 || xmlStrcmp(node->name, XMLSTR("relay-shoutcast-metadata")) == 0 || + xmlStrcmp(node->name, XMLSTR("username")) == 0 || xmlStrcmp(node->name, XMLSTR("password")) == 0 || + xmlStrcmp(node->name, XMLSTR("bind")) == 0) { + __found_bad_tag(configuration, node, BTR_OBSOLETE, "Use a block."); } else { __found_bad_tag(configuration, node, BTR_UNKNOWN, NULL); }