2006-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 30 Nov 2006 20:39:00 +0000 (20:39 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 30 Nov 2006 20:39:00 +0000 (20:39 -0000)
* HttpRequest.cs: physical path comes from GetFilePathTranslated to
avoid trimming in HttpRequest.MapPath.

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

mcs/class/System.Web/System.Web/ChangeLog
mcs/class/System.Web/System.Web/HttpRequest.cs

index 3baf353732fd984846f6a0c4b0e5eac0985d613c..f822a6122e9084bb9ec79b52f83728cd63171954 100644 (file)
@@ -1,3 +1,8 @@
+2006-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * HttpRequest.cs: physical path comes from GetFilePathTranslated to
+       avoid trimming in HttpRequest.MapPath.
+
 2006-11-29  Marek Habersack  <grendello@gmail.com>
 
        * HttpApplication.cs: Make use of the handler stack implemented
index d2a5deceffa48b11f49c75445d95dbbd45ede4ce..c14bc7d4a5635e8c109afea1da0139d5b88f5775 100644 (file)
@@ -923,8 +923,10 @@ namespace System.Web {
                                if (worker_request == null)
                                        return String.Empty; // don't check security with an empty string!
 
-                               if (physical_path == null)
-                                       physical_path = MapPath (CurrentExecutionFilePath);
+                               if (physical_path == null) {
+                                       // Don't call HttpRequest.MapPath here, as that one *trims* the input
+                                       physical_path = worker_request.GetFilePathTranslated ();
+                               }
 
                                if (SecurityManager.SecurityEnabled) {
                                        new FileIOPermission (FileIOPermissionAccess.PathDiscovery, physical_path).Demand ();