From: Eric Bollengier Date: Fri, 9 Oct 2020 11:05:44 +0000 (+0200) Subject: Check tag format in bconsole tag command X-Git-Tag: Release-11.3.2~1007 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ebf17b5e4dfcbcb9e22bb4bb47db8e4a453f252;p=thirdparty%2Fbacula.git Check tag format in bconsole tag command --- diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 7d59e88fd..0f225dfb7 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -1728,7 +1728,7 @@ int tag_cmd(UAContext *ua, const char *cmd) if (!get_cmd(ua, _("Enter the Tag value: "), false)) { return false; } - if (strlen(ua->cmd) > sizeof(t.Name)-1) { + if (strlen(ua->cmd) > sizeof(t.Name)-1 || !is_name_valid(ua->cmd, NULL, "#")) { ua->error_msg(_("Invalid tag\n")); return false; }