-
Notifications
You must be signed in to change notification settings - Fork 967
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid instantiating arbitrary classes
This PR avoids the use of `Class#newInstance`, which is deprecated in Java 9. In particular, previously you could set the `config.strategy` system to an arbitrary class that would get instantiated even if it was not a subclass of `ConfigLoadingStrategy`. This is now checked before instantiating the class. The previous behavior could arguably be considered a security concern when an attacker has write access to system properties, though in such a scenario there are likely many other ways to load arbitrary code.
- Loading branch information
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters