Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to blacklist #426

Merged
merged 1 commit into from Apr 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
add method to blacklist
  • Loading branch information
Matt Coley committed Apr 13, 2020
commit 5dfa5b87318744a4d020b66d5f7747acc36b213b
Expand Up @@ -2,6 +2,7 @@

import com.google.common.base.CaseFormat;
import com.google.common.collect.ImmutableSet;
import java.lang.reflect.Method;
import java.util.Set;
import javax.el.BeanELResolver;
import javax.el.ELContext;
Expand Down Expand Up @@ -111,7 +112,12 @@ private String transformPropertyName(Object property) {
}

private void checkRestrictedClass(Object o, Object method) {
if (o instanceof Class || o instanceof ClassLoader || o instanceof Thread) {
if (
o instanceof Class ||
o instanceof ClassLoader ||
o instanceof Thread ||
o instanceof Method
) {
throw new MethodNotFoundException(
"Cannot find method '" + method + "' in " + o.getClass()
);
Expand Down