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

Fix security manager checks not being executed properly #23

Merged
merged 3 commits into from
Feb 17, 2019

Conversation

I-Al-Istannen
Copy link
Contributor

Problem

The security manager wrongly thought almost every access was initiated by itself, resulting in it being way too lenient.

Closes

#22 Unfiltered file access

Resolution

Fix the security manager believing calls originated from itself and add some small regression tests for this case.

Future possible problems

Checking whether the security manager appears in the callstack might be problematic, if a malicious user is able to inject it in there. Not quite sure if that is possible, but it is not ideal. I am more than happy to receive some nicer solution or hints, if anybody has some.

Addendum

For some reason, the test files were formatted with a different formatter, so the diff of that file is basically useless. The last two methods are new.

The security manager incorrectly assumed executed methods were his and
allowed unfiltered access
@irufus irufus merged commit 45c68aa into Together-Java:master Feb 17, 2019
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.

2 participants