Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorMarek Habersack <grendel@twistedcode.net>2009-06-08 11:19:59 +0400
committerMarek Habersack <grendel@twistedcode.net>2009-06-08 11:19:59 +0400
commit8c11b0cb1350f1e8d87d9b81b8dcc6121f54aa4e (patch)
tree84c55cad8c1c10dde4b2e7f285efcb61eb52dd00 /mcs
parentd3f7781195976402a81c0ea2e1e3d3ec3f26313e (diff)
Backport of r135630
svn path=/branches/mono-2-4/mcs/; revision=135631
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System.Configuration/System.Configuration/ChangeLog5
-rw-r--r--mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs10
2 files changed, 15 insertions, 0 deletions
diff --git a/mcs/class/System.Configuration/System.Configuration/ChangeLog b/mcs/class/System.Configuration/System.Configuration/ChangeLog
index 2f64f36c4fa..6ae39cd0868 100644
--- a/mcs/class/System.Configuration/System.Configuration/ChangeLog
+++ b/mcs/class/System.Configuration/System.Configuration/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-08 Marek Habersack <mhabersack@novell.com>
+
+ * ConfigurationLocation.cs: if the path passed to constructor
+ starts with any of ' ' '.' '/' or '\', throw an exception. Fixes
+ bug #510735
2008-12-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
diff --git a/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs b/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs
index f0109e9d2ad..b151da2d077 100644
--- a/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs
+++ b/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs
@@ -49,6 +49,16 @@ namespace System.Configuration {
internal ConfigurationLocation (string path, string xmlContent, Configuration parent, bool allowOverride)
{
+ if (!String.IsNullOrEmpty (path)) {
+ switch (path [0]) {
+ case ' ':
+ case '.':
+ case '/':
+ case '\\':
+ throw new ConfigurationErrorsException ("<location> path attribute must be a relative virtual path. It cannot start with any of ' ' '.' '/' or '\\'.");
+ }
+ }
+
this.path = path;
this.xmlContent = xmlContent;
this.parent = parent;