2009-07-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 23 Jul 2009 05:01:23 +0000 (05:01 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 23 Jul 2009 05:01:23 +0000 (05:01 -0000)
* WebConfigurationManager.cs: avoid possible infinite loop when the
path starts with ~ and 1 file check.

svn path=/trunk/mcs/; revision=138495

mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs

index a6425d85734157a8c80557712de9dab32a715cff..10557fe9c1fd77e762bf3354ac40563eab10eae9 100644 (file)
@@ -1,3 +1,8 @@
+2009-07-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * WebConfigurationManager.cs: avoid possible infinite loop when the
+       path starts with ~ and 1 file check.
+
 2009-07-15  Marek Habersack  <mhabersack@novell.com>
 
        * WebConfigurationManager.cs: another approach to suppressing
index c813c1cfac05217c4618273016d5b18d28bbc538..a25dce398a857a7f83eddf8bc2a9dca7ebf3cbfd 100644 (file)
@@ -490,7 +490,7 @@ namespace System.Web.Configuration {
                        if (req == null)
                                return path;
 
-                       curPath = path;
+                       curPath = dir;
                        string rootPath = HttpRuntime.AppDomainAppVirtualPath;
                        string physPath;
 
@@ -505,7 +505,7 @@ namespace System.Web.Configuration {
                                        break;
                                
                                curPath = GetParentDir (rootPath, curPath);
-                               if (curPath == null) {
+                               if (curPath == null || curPath == "~") {
                                        curPath = rootPath;
                                        break;
                                }