From 9e91cd70ee5854ce84a7a09d1f190f5dc278ba86 Mon Sep 17 00:00:00 2001 From: Gabriele Date: Fri, 11 Dec 2015 20:32:31 +0100 Subject: [PATCH] WebUI: Allow to remove the label assigned to a torrent Empty strings are not valid label names, but they are used to remove torrent labels, so allow them. --- src/webui/webapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/webapplication.cpp b/src/webui/webapplication.cpp index 1a61bff6d..534a66379 100644 --- a/src/webui/webapplication.cpp +++ b/src/webui/webapplication.cpp @@ -724,7 +724,7 @@ void WebApplication::action_command_setLabel() QStringList hashes = request().posts["hashes"].split("|"); QString label = request().posts["label"].trimmed(); - if (!Utils::Fs::isValidFileSystemName(label)) { + if (!Utils::Fs::isValidFileSystemName(label) && !label.isEmpty()) { status(400, "Labels must not contain special characters"); return; }