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

This commit is contained in:
Stefan Hacker 2010-06-29 23:39:16 +02:00
parent 6b33dda344
commit 5c40cfeb4b
2 changed files with 5 additions and 3 deletions

View File

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

View File

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