Author: juraj
Date: 2006-06-15 11:08:41 -0400 (Thu, 15 Jun 2006)
New Revision: 61758

Modified:
   trunk/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
   trunk/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs
   trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
Log:

2006-06-15 Juraj Skripsky <[EMAIL PROTECTED]>

        * AspTokenizer.cs (ReadAttValue), AspParser.cs (GetAttributes):
        Don't allow an attribute value to contain the same quote characters
        as the ones used for delimiting the value itself. Add a token
        NOTWELLFORMED to signal that case to AspParser. Fixes bug #78643.



Modified: trunk/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/AspParser.cs      
2006-06-15 15:00:59 UTC (rev 61757)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/AspParser.cs      
2006-06-15 15:08:41 UTC (rev 61758)
@@ -332,6 +332,11 @@
 
                                id = tokenizer.Value;
                                if (Eat ('=')){
+                                       if (Eat (Token.NOTWELLFORMED)){
+                                               OnError ("The server tag is not 
well formed.");
+                                               return null;
+                                       }
+
                                        if (Eat (Token.ATTVALUE)){
                                                attributes.Add (id, 
tokenizer.Value);
                                        } else if (Eat ('<') && Eat ('%')) {

Modified: trunk/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs   
2006-06-15 15:00:59 UTC (rev 61757)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs   
2006-06-15 15:08:41 UTC (rev 61758)
@@ -44,6 +44,7 @@
                public const int TEXT           = 0x0200004;
                public const int DOUBLEDASH     = 0x0200005;
                public const int CLOSING        = 0x0200006;
+               public const int NOTWELLFORMED  = 0x0200007;
        }
 
        class AspTokenizer
@@ -188,6 +189,8 @@
                                                read_char ();
                                                break;
                                        }
+                               } else if (quoted && c == quoteChar) {
+                                       return Token.NOTWELLFORMED;
                                }
 
                                sb.Append ((char) c);

Modified: trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2006-06-15 
15:00:59 UTC (rev 61757)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2006-06-15 
15:08:41 UTC (rev 61758)
@@ -1,3 +1,10 @@
+2006-06-15 Juraj Skripsky <[EMAIL PROTECTED]>
+
+       * AspTokenizer.cs (ReadAttValue), AspParser.cs (GetAttributes):
+       Don't allow an attribute value to contain the same quote characters
+       as the ones used for delimiting the value itself. Add a token
+       NOTWELLFORMED to signal that case to AspParser. Fixes bug #78643.
+
 2006-06-08     Konstantin Triger <[EMAIL PROTECTED]>
 
        * ThemeDirectoryCompiler.cs: use physical path instead of virtual path.

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to