commit 5c40cfeb4b5f8911df926c19f2dd628703840f64
Author: Stefan Hacker <dd0t@users.sourceforge.net>
Date:   Tue Jun 29 23:39:16 2010 +0200

    Don't validate the name before we are sure it wasn't already validated by an authenticator

diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp
index de307ea..f12867a 100644
--- a/src/murmur/Messages.cpp
+++ b/src/murmur/Messages.cpp
@@ -1231,9 +1231,6 @@ void Server::msgQueryUsers(ServerUser *uSource, MumbleProto::QueryUsers &msg) {
 
 	for (int i=0;i<msg.names_size();++i) {
 		QString name = u8(msg.names(i));
-		if (!validateUserName(name)) {
-			continue;
-		}
 		int id = getUserID(name);
 		if (id >= 0) {
 			name = getUserName(id);
diff --git a/src/murmur/ServerDB.cpp b/src/murmur/ServerDB.cpp
index 7e15def..70b4ca4 100644
--- a/src/murmur/ServerDB.cpp
+++ b/src/murmur/ServerDB.cpp
@@ -1048,6 +1048,11 @@ int Server::getUserID(const QString &name) {
 		qhUserNameCache.insert(id, name);
 		return id;
 	}
+
+	if (!validateUserName(name)) {
+	    return id;
+	}
+
 	TransactionHolder th;
 
 	QSqlQuery &query = *th.qsqQuery;
