Modified:
branches/5.0/CHANGES
branches/5.0/Driver/Source/common/Cache.cs
branches/5.0/TestSuite/Source/ConnectionTests.cs
Log:
Fixed problem with connection string caching where our collection class was using case
insensitive semantics and this causes cases where a user orginally used the wrong case
for a user id and then fixed it to still get access denied errors. (Bug #31433)
Modified: branches/5.0/CHANGES
===================================================================
--- branches/5.0/CHANGES 2007-10-25 18:49:17 UTC (rev 1045)
+++ branches/5.0/CHANGES 2007-10-25 19:38:09 UTC (rev 1046)
@@ -14,6 +14,10 @@
been removed for some reason
- Fixed problem with installer where attempting to install over a failed uninstall
could leave multiple clients registered in machine.config. (Bug #31731)
+ - Fixed problem with connection string caching where our collection class was
+ using case insensitive semantics and this causes cases where a user orginally
+ used the wrong case for a user id and then fixed it to still get access denied
+ errors. (Bug #31433)
Version 5.0.8 8/16/2007
Modified: branches/5.0/Driver/Source/common/Cache.cs
===================================================================
--- branches/5.0/Driver/Source/common/Cache.cs 2007-10-25 18:49:17 UTC (rev 1045)
+++ branches/5.0/Driver/Source/common/Cache.cs 2007-10-25 19:38:09 UTC (rev 1046)
@@ -19,6 +19,9 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System.Collections.Specialized;
+using System.Collections;
+using System.Globalization;
+using System;
namespace MySql.Data.Common
{
@@ -26,7 +29,8 @@
{
private int capacity;
- public Cache(int initialCapacity, int capacity) : base(initialCapacity)
+ public Cache(int initialCapacity, int capacity) :
+ base(initialCapacity, StringComparer.CurrentCulture)
{
this.capacity = capacity;
}
Modified: branches/5.0/TestSuite/Source/ConnectionTests.cs
===================================================================
--- branches/5.0/TestSuite/Source/ConnectionTests.cs 2007-10-25 18:49:17 UTC (rev 1045)
+++ branches/5.0/TestSuite/Source/ConnectionTests.cs 2007-10-25 19:38:09 UTC (rev 1046)
@@ -410,5 +410,32 @@
Assert.AreEqual(1, o);
}
}
+
+ /// <summary>
+ /// Bug #31433 Username incorrectly cached for logon where case sensitive
+ /// </summary>
+ [Test]
+ public void CaseSensitiveUserId()
+ {
+ string connStr = GetConnectionStringEx("Test", "test", true);
+ MySqlConnection c = new MySqlConnection(connStr);
+ try
+ {
+ c.Open();
+ }
+ catch (MySqlException)
+ {
+ }
+ connStr = GetConnectionStringEx("test", "test", true);
+ c = new MySqlConnection(connStr);
+ try
+ {
+ c.Open();
+ }
+ catch (MySqlException ex)
+ {
+ Assert.Fail(ex.Message);
+ }
+ }
}
}
| Thread |
|---|
| • Connector/NET commit: r1046 - in branches/5.0: . Driver/Source/common TestSuite/Source | rburnett | 25 Oct |