Skip to content

Commit

Permalink
Ensure work dir attribute is made read-only
Browse files Browse the repository at this point in the history
CVE-2010-3718

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1022134 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Oct 13, 2010
1 parent 2c4536c commit a697f7b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions java/org/apache/catalina/core/StandardContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -5562,11 +5562,11 @@ private void postWorkDirectory() {
dir.mkdirs();

// Set the appropriate servlet context attribute
getServletContext().setAttribute(ServletContext.TEMPDIR, dir);
if (getServletContext() instanceof ApplicationContext)
((ApplicationContext) getServletContext()).setAttributeReadOnly
(ServletContext.TEMPDIR);

if (context == null) {
getServletContext();
}
context.setAttribute(ServletContext.TEMPDIR, dir);
context.setAttributeReadOnly(ServletContext.TEMPDIR);
}


Expand Down

0 comments on commit a697f7b

Please sign in to comment.