[Mono-bugs] [Bug 61429][Nor] Changed - AspParser - Case Sensitivity of Server-Side Include Directive

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 14 Jul 2004 05:01:20 -0400 (EDT)


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 ivan@chimerical.com.au.

http://bugzilla.ximian.com/show_bug.cgi?id=61429

--- shadow/61429	2004-07-12 08:51:45.000000000 -0400
+++ shadow/61429.tmp.30294	2004-07-14 05:01:20.000000000 -0400
@@ -55,6 +55,41 @@
 str.StartsWith("#include "))
 +                       if (len < 10 || lastQuote != len - 1 || !
 str.ToLower().StartsWith("#include "))
                                 return false;
 
                         str = str.Substring (9).Trim ();
+
+------- Additional Comments From ivan@chimerical.com.au  2004-07-14 05:01 -------
+This bug also applies to case sensitivity to the attributes.
+ie "file" works, but "File" does not.
+
+Updated Slack Patch:
+Index: System.Web.Compilation/AspParser.cs
+===================================================================
+RCS 
+file: /mono/mcs/class/System.Web/System.Web.Compilation/AspParser.cs,v
+retrieving revision 1.17
+diff -u -r1.17 AspParser.cs
+--- System.Web.Compilation/AspParser.cs 24 Jun 2004 20:58:16 -
+0000      1.17
++++ System.Web.Compilation/AspParser.cs 14 Jul 2004 08:51:36 -0000
+@@ -184,12 +184,12 @@
+                        str = str.Substring (2).Trim ();
+                        int len = str.Length;
+                        int lastQuote = str.LastIndexOf ('"');
+-                       if (len < 10 || lastQuote != len - 1 || !
+str.StartsWith ("#include "))
++                       if (len < 10 || lastQuote != len - 1 || !
+str.ToLower().StartsWith("#include "))
+                                return false;
+
+                        str = str.Substring (9).Trim ();
+-                       bool isfile = (str.StartsWith ("file"));
+-                       if (!isfile && !str.StartsWith ("virtual"))
++                       bool isfile = (str.ToLower().StartsWith 
+("file"));
++                       if (!isfile && !str.ToLower().StartsWith 
+("virtual"))
+                                return false;
+
+                        pathType = (isfile) ? "file" : "virtual";