[Mono-bugs] [Bug 76958][Nor] New - CookieContainer.GetCookies fail
with multiple subdomain
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Dec 9 10:47:31 EST 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by colin at univ-metz.fr.
http://bugzilla.ximian.com/show_bug.cgi?id=76958
--- shadow/76958 2005-12-09 10:47:31.000000000 -0500
+++ shadow/76958.tmp.22841 2005-12-09 10:47:31.000000000 -0500
@@ -0,0 +1,44 @@
+Bug#: 76958
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: colin at univ-metz.fr
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: CookieContainer.GetCookies fail with multiple subdomain
+
+Description of Problem:
+if a cookie is stock with .foo.org domain then it doesn't delivered for
+www.server.foo.org.
+
+proposed solution :
+
+Index: System.Net/CookieContainer.cs
+===================================================================
+--- System.Net/CookieContainer.cs (revision 54151)
++++ System.Net/CookieContainer.cs (working copy)
+@@ -233,7 +233,8 @@
+ if (dot == -1)
+ return (String.Compare (host, domain, true,
+CultureInfo.InvariantCulture) == 0);
+
+- string subdomain = host.Substring (dot);
++ if (host.Length < domain.Length) return false;
++ string subdomain = host.Substring (host.Length - domain.Length);
+ return (String.Compare (subdomain, domain, true,
+CultureInfo.InvariantCulture) == 0);
+ }
+
+
+thx,
+
+cyrille.
More information about the mono-bugs
mailing list