[Pkg-voip-commits] r8567 - in /mumble/trunk/debian: changelog patches/0003-fix-long-username-query.patch patches/0004-fix-username-validation.patch patches/series
thorvald at alioth.debian.org
thorvald at alioth.debian.org
Mon Jul 12 13:36:28 UTC 2010
Author: thorvald
Date: Mon Jul 12 13:36:23 2010
New Revision: 8567
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=8567
Log:
Fix failure with SQLite with very long 'like' matches.
Closes: #587713
Added:
mumble/trunk/debian/patches/0003-fix-long-username-query.patch
mumble/trunk/debian/patches/0004-fix-username-validation.patch
Modified:
mumble/trunk/debian/changelog
mumble/trunk/debian/patches/series
Modified: mumble/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/mumble/trunk/debian/changelog?rev=8567&op=diff
==============================================================================
--- mumble/trunk/debian/changelog (original)
+++ mumble/trunk/debian/changelog Mon Jul 12 13:36:23 2010
@@ -1,3 +1,10 @@
+mumble (1.2.2-4) unstable; urgency=high
+
+ * Fix failure with SQLite with very long 'like' matches.
+ Closes: #587713
+
+ -- Thorvald Natvig <thorvald at debian.org> Mon, 12 Jul 2010 15:11:24 +0200
+
mumble (1.2.2-3) unstable; urgency=high
* Remove trailing slash from the mumble-server-web alias.
Added: mumble/trunk/debian/patches/0003-fix-long-username-query.patch
URL: http://svn.debian.org/wsvn/pkg-voip/mumble/trunk/debian/patches/0003-fix-long-username-query.patch?rev=8567&op=file
==============================================================================
--- mumble/trunk/debian/patches/0003-fix-long-username-query.patch (added)
+++ mumble/trunk/debian/patches/0003-fix-long-username-query.patch Mon Jul 12 13:36:23 2010
@@ -1,0 +1,42 @@
+commit 6b33dda344f89e5a039b7d79eb43925040654242
+Author: Benjamin Jemlich <pcgod at users.sourceforge.net>
+Date: Tue Jun 29 14:49:14 2010 +0200
+
+ Don't crash on long usernames
+
+diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp
+index f12867a..de307ea 100644
+--- a/src/murmur/Messages.cpp
++++ b/src/murmur/Messages.cpp
+@@ -1231,6 +1231,9 @@ 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 11b6906..7e15def 100644
+--- a/src/murmur/ServerDB.cpp
++++ b/src/murmur/ServerDB.cpp
+@@ -810,7 +810,7 @@ int Server::authenticate(QString &name, const QString &pw, const QStringList &em
+ TransactionHolder th;
+ QSqlQuery &query = *th.qsqQuery;
+
+- SQLPREP("SELECT `user_id`,`name`,`pw` FROM `%1users` WHERE `server_id` = ? AND `name` like ?");
++ SQLPREP("SELECT `user_id`,`name`,`pw` FROM `%1users` WHERE `server_id` = ? AND LOWER(`name`) = LOWER(?)");
+ query.addBindValue(iServerNum);
+ query.addBindValue(name);
+ SQLEXEC();
+@@ -1051,7 +1051,7 @@ int Server::getUserID(const QString &name) {
+ TransactionHolder th;
+
+ QSqlQuery &query = *th.qsqQuery;
+- SQLPREP("SELECT `user_id` FROM `%1users` WHERE `server_id` = ? AND `name` like ?");
++ SQLPREP("SELECT `user_id` FROM `%1users` WHERE `server_id` = ? AND LOWER(`name`) = LOWER(?)");
+ query.addBindValue(iServerNum);
+ query.addBindValue(name);
+ SQLEXEC();
Added: mumble/trunk/debian/patches/0004-fix-username-validation.patch
URL: http://svn.debian.org/wsvn/pkg-voip/mumble/trunk/debian/patches/0004-fix-username-validation.patch?rev=8567&op=file
==============================================================================
--- mumble/trunk/debian/patches/0004-fix-username-validation.patch (added)
+++ mumble/trunk/debian/patches/0004-fix-username-validation.patch Mon Jul 12 13:36:23 2010
@@ -1,0 +1,36 @@
+commit 5c40cfeb4b5f8911df926c19f2dd628703840f64
+Author: Stefan Hacker <dd0t at 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;
Modified: mumble/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/mumble/trunk/debian/patches/series?rev=8567&op=diff
==============================================================================
--- mumble/trunk/debian/patches/series (original)
+++ mumble/trunk/debian/patches/series Mon Jul 12 13:36:23 2010
@@ -1,2 +1,4 @@
0001-kFreeBSD.patch
0002-spelling-error.patch
+0003-fix-long-username-query.patch
+0004-fix-username-validation.patch
More information about the Pkg-voip-commits
mailing list