From 628ddc3a3e0dbb37d595272e6e7ebeeb214a13ae Mon Sep 17 00:00:00 2001 From: Kissaki Date: Sat, 22 Oct 2016 01:53:35 +0200 Subject: [PATCH] Remove most of channel name restriction The server has a regular expression setting for channel names. The additional restriction of having a word character is probably reasonable for most users. However, it is an arbitrary limitation that users may want to circumvent. For example: A channel could not be named with hyphens only "---". As this is an arbitrary and invisible limitation, whichs use case is covered by the channelname setting (with a default, and adjustable by the user) remove it. We still prevent 0-length channel names as a special case, as they could lead to issues in existing code paths (even when they should not with consistently correct implementation). --- src/murmur/Messages.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp index 529f287d3..d88153049 100644 --- a/src/murmur/Messages.cpp +++ b/src/murmur/Messages.cpp @@ -863,8 +863,7 @@ void Server::msgChannelState(ServerUser *uSource, MumbleProto::ChannelState &msg return; } - QRegExp re2("\\w"); - if (re2.indexIn(qsName) == -1) { + if (qsName.length() == 0) { PERM_DENIED_TYPE(ChannelName); return; }