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

Use System.getProperty instead of System.getProperties #62

Merged

Conversation

kkofler
Copy link
Contributor

@kkofler kkofler commented Jan 22, 2018

Use System.getProperty to get a specific property instead of first
retrieving all properties with System.getProperties() only to read one
property out of it.

This is more friendly to security managers: instead of requiring the
permission to read and even write all properties
("java.util.PropertyPermission" "*" "read,write"), the policy only needs
to allow reading a specific property, which is much more secure.

Depending on the JVM implementation, System.getProperty can also be more
efficient.

@coveralls
Copy link

coveralls commented Jan 22, 2018

Coverage Status

Coverage decreased (-0.04%) to 82.696% when pulling 833cf23 on kkofler:security-policy-friendliness into 8c1c564 on svendiedrichsen:master.

Use System.getProperty to get a specific property instead of first
retrieving all properties with System.getProperties() only to read one
property out of it.

This is more friendly to security managers: instead of requiring the
permission to read and even write all properties
("java.util.PropertyPermission" "*" "read,write"), the policy only needs
to allow reading a specific property, which is much more secure.

Depending on the JVM implementation, System.getProperty can also be more
efficient.
@kkofler kkofler force-pushed the security-policy-friendliness branch from 1681e55 to 833cf23 Compare January 22, 2018 12:13
@kkofler
Copy link
Contributor Author

kkofler commented Jan 22, 2018

(The force-push changed the From address to my work address, I accidentally had the wrong address set.)

@svendiedrichsen svendiedrichsen merged commit e944d2f into svendiedrichsen:master Jan 22, 2018
@svendiedrichsen
Copy link
Owner

@kkofler Good point. Thanks very much for the PR.

@kkofler
Copy link
Contributor Author

kkofler commented Feb 9, 2018

Are you going to do a new release soon?

@svendiedrichsen
Copy link
Owner

I just made one.

@kkofler
Copy link
Contributor Author

kkofler commented Feb 11, 2018

Great, 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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants