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 unsafe method java.security.ProtectionDomain.getClassLoader #62

Closed
wants to merge 1 commit into from

Conversation

galusben
Copy link

@galusben galusben commented Dec 9, 2019

@ddekany
Copy link
Contributor

ddekany commented Jan 4, 2020

I close this, as it's not this simple to address this problem. Anyone interested in the status of this, see this: https://issues.apache.org/jira/browse/FREEMARKER-124

@ddekany ddekany closed this Jan 4, 2020
@galusben
Copy link
Author

galusben commented Jan 10, 2020

I know it is not simple to address, but it adds a quick fix to something many are exposed to. I agree that the trust level of template authors shall be as the level of source code writers, but from the file src/main/resources/freemarker/ext/beans/unsafeMethods.properties it seems that there are some blacklisted methods.

I understand that this list is not serious protection, but it will help some people that have made the mistake of trusting someone they shouldn't with a template.

Since this blog is out there, I would strongly recommend to add this method to the blacklist. There is zero cost in doing that, and the benefit can be saving someone's ass (even tough this someone did not know what they were doing).

@ddekany

@ddekany
Copy link
Contributor

ddekany commented Jan 10, 2020

The recipe in that blog entry won't work anymore with the next release (2.3.30). But it's addressed differently (and some other methods will become banned as well).

@galusben
Copy link
Author

Cool. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants