Skip to content

Commit

Permalink
submit security fix for GF bug 24659612
Browse files Browse the repository at this point in the history
svn path=/trunk/; revision=1489
  • Loading branch information
ruolli committed Dec 7, 2016
1 parent e47b49c commit 0f9ed39
Showing 1 changed file with 0 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.Enumeration;

import javax.servlet.RequestDispatcher;
Expand All @@ -78,7 +75,6 @@
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.BodyContent;

import org.apache.jasper.Constants;
import org.apache.jasper.JasperException;
import org.apache.jasper.compiler.Localizer;

Expand All @@ -101,35 +97,6 @@ public class JspRuntimeLibrary {
private static final String JSP_EXCEPTION
= "javax.servlet.jsp.jspException";

protected static class PrivilegedIntrospectHelper
implements PrivilegedExceptionAction<Object> {

private Object bean;
private String prop;
private String value;
private ServletRequest request;
private String param;
private boolean ignoreMethodNF;

PrivilegedIntrospectHelper(Object bean, String prop,
String value, ServletRequest request,
String param, boolean ignoreMethodNF)
{
this.bean = bean;
this.prop = prop;
this.value = value;
this.request = request;
this.param = param;
this.ignoreMethodNF = ignoreMethodNF;
}

public Object run() throws JasperException {
internalIntrospecthelper(
bean,prop,value,request,param,ignoreMethodNF);
return null;
}
}

/**
* Returns the value of the javax.servlet.error.exception request
* attribute value, if present, otherwise the value of the
Expand Down Expand Up @@ -339,27 +306,6 @@ public static void introspecthelper(Object bean, String prop,
String value, ServletRequest request,
String param, boolean ignoreMethodNF)
throws JasperException
{
if (Constants.IS_SECURITY_ENABLED) {
try {
PrivilegedIntrospectHelper dp =
new PrivilegedIntrospectHelper(
bean,prop,value,request,param,ignoreMethodNF);
AccessController.doPrivileged(dp);
} catch( PrivilegedActionException pe) {
Exception e = pe.getException();
throw (JasperException)e;
}
} else {
internalIntrospecthelper(
bean,prop,value,request,param,ignoreMethodNF);
}
}

private static void internalIntrospecthelper(Object bean, String prop,
String value, ServletRequest request,
String param, boolean ignoreMethodNF)
throws JasperException
{
Method method = null;
Class type = null;
Expand Down

0 comments on commit 0f9ed39

Please sign in to comment.