Skip to content

Commit

Permalink
2006-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Browse files Browse the repository at this point in the history
	* HttpRequest.cs: physical path comes from GetFilePathTranslated to
	avoid trimming in HttpRequest.MapPath.


svn path=/branches/mono-1-1-13-8/mcs/; revision=68778
  • Loading branch information
gonzalop committed Nov 30, 2006
1 parent 7d44efe commit 435eda5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions mcs/class/System.Web/System.Web/ChangeLog
@@ -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-04-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* HttpApplicationFactory.cs: make sure that the application start event
Expand Down
6 changes: 4 additions & 2 deletions mcs/class/System.Web/System.Web/HttpRequest.cs
Expand Up @@ -913,8 +913,10 @@ internal void ReleaseResources ()
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 ();
Expand Down

0 comments on commit 435eda5

Please sign in to comment.