diff options
author | Marek Habersack <grendel@twistedcode.net> | 2010-04-09 17:02:14 +0400 |
---|---|---|
committer | Marek Habersack <grendel@twistedcode.net> | 2010-04-09 17:02:14 +0400 |
commit | 8e649426c01f7e22ce2d5af150a17e7b76ee7772 (patch) | |
tree | ca389b0fb6042fb8de9ef2d99a5c4ed61cb4f1d8 | |
parent | d32b4828b324cd55121cabacdb88da2a71082190 (diff) |
Backport of r155140
svn path=/branches/mono-2-6/mcs/; revision=155141
-rw-r--r-- | mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog | 6 | ||||
-rw-r--r-- | mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog index f4b9d1d7ddc..91424286ecc 100644 --- a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog +++ b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog @@ -1,3 +1,9 @@ +2010-04-09 Marek Habersack <mhabersack@novell.com> + + * WebConfigurationManager.cs: GetSection properly processes paths + of form '~'. Fixes bug #595140. Patch from Adriaan van Kekem + <avkekem@hotmail.com>, thanks! + 2010-04-08 Gonzalo Paniagua Javier <gonzalo@novell.com> * GlobalizationSection.cs: use WebName instead of EncodingName. diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs index 802039b93bb..c422554a066 100644 --- a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs +++ b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs @@ -478,7 +478,7 @@ namespace System.Web.Configuration { if (VirtualPathUtility.IsRooted (path)) { if (path [0] == '~') - relPath = path.Substring (2); + relPath = path.Length > 1 ? path.Substring (2) : String.Empty; else if (path [0] == '/') relPath = path.Substring (1); else |