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).
This commit is contained in:
Kissaki 2016-10-22 01:53:35 +02:00
parent 0258d2a1e2
commit 628ddc3a3e

View File

@ -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;
}