diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-08-23 00:47:18 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-08-23 00:47:18 +0400 |
commit | 74e7acf7b78575a1bc742da1b4f9bf362841ed5b (patch) | |
tree | d950495bd18d24a5cfb9b4e034d4f267eb1ba6e5 /mcs/class/System.Web | |
parent | 159118e15cb7e4d84d33471d9827a3c84e23a584 (diff) |
same fix as in HEAD
svn path=/branches/mono-1-0/mcs/; revision=32670
Diffstat (limited to 'mcs/class/System.Web')
-rw-r--r-- | mcs/class/System.Web/System.Web.Configuration/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/mcs/class/System.Web/System.Web.Configuration/ChangeLog b/mcs/class/System.Web/System.Web.Configuration/ChangeLog index 2f67b0fee83..1347030a0e7 100644 --- a/mcs/class/System.Web/System.Web.Configuration/ChangeLog +++ b/mcs/class/System.Web/System.Web.Configuration/ChangeLog @@ -1,3 +1,8 @@ +2004-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * WebConfigurationSettings.cs: fix bug when processing empty location + tags. Closes bug #63001. + 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com> * AuthorizationConfig.cs: really fix bug #60482. Thanks David! diff --git a/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs b/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs index e00c1921978..ee47037cbfa 100644 --- a/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs +++ b/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs @@ -791,16 +791,13 @@ namespace System.Web.Configuration void StoreLocation (string name, XmlTextReader reader) { - if (locations == null) { - locations = new Hashtable (); - } - string path = null; bool haveAllow = false; bool allowOverride = true; + string att = null; while (reader.MoveToNextAttribute ()) { - string att = reader.Name; + att = reader.Name; if (att == "path") { if (path != null) @@ -830,8 +827,13 @@ namespace System.Web.Configuration ThrowException ("Unrecognized attribute.", reader); } + if (att == null) + return; // empty location tag + Location loc = new Location (this, path, allowOverride); - if (locations.ContainsKey (loc.Path)) + if (locations == null) + locations = new Hashtable (); + else if (locations.ContainsKey (loc.Path)) ThrowException ("Duplicated location path: " + loc.Path, reader); reader.MoveToElement (); |