Skip to content

Commit

Permalink
Use the correct classloader
Browse files Browse the repository at this point in the history
This is the fix for CVE-2011-1582

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1100832 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed May 8, 2011
1 parent 37b704d commit 299b26a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion java/org/apache/catalina/core/StandardWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,8 @@ public void servletSecurityAnnotationScan() throws ServletException {
if (getServlet() == null) {
Class<?> clazz = null;
try {
clazz = getParentClassLoader().loadClass(getServletClass());
clazz = getParent().getLoader().getClassLoader().loadClass(
getServletClass());
processServletSecurityAnnotation(clazz);
} catch (ClassNotFoundException e) {
// Safe to ignore. No class means no annotations to process
Expand Down
4 changes: 4 additions & 0 deletions webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
Use safe equality test when determining event type in the
MapperListener. (markt)
</fix>
<fix>
Use correct class loader when loading Servlet classes in
StandardWrapper. (markt)
</fix>
</changelog>
</subsection>
</section>
Expand Down

0 comments on commit 299b26a

Please sign in to comment.