-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
WebAppClassLoader should protect ServiceLoader access of META-INF/services
and getResource()
lookups
#4652
Comments
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I think we should still try to fix this one. #6112 was a problem caused by not having the filter on services files. @janbartel came up with a good way of work around by adding a location specific pattern for the server classes, which apparently does exclude the services files as well. But I don't think that is general enough for all circumstances |
@lorban want to put this on your todo list? |
This isn't as easy as it sounds. Editing out This statement also sounds odd to me:
is that case possible at all, knowing that the |
Taking the second question first. The case is possible because a webapplication can itself contain jetty classes within it's WEB-INF/lib. So for example, there could be code within a webapp using the service loader to find implementations of For the second part, yes this is difficult. Temp files are one solution... or potentially we could use a custom |
Also, remember that service loading is very different with JPMS, where JPMS modules declare the service class and what are the implementations, etc. Any solution would need to be tested with JPMS as well. |
This issue has been automatically marked as stale because it has been a |
kicking the can along the road.... |
This issue has been automatically marked as stale because it has been a |
@gregw how's the status of this issue? |
@sbordet it is not done. It is still a nice to have (or nice to investigate), but we can proceed without it. |
This should be expanded to protect Eg: a logging implementation in the webapp, should not be able to find a hit when using |
META-INF/services
and getResource()
lookups
This issue has been automatically marked as stale because it has been a |
If a webapp uses the ServiceLoader, then the WebAppClassLoader should handle server classes by:
/META-INF/service/org.some.Service
iforg.some.Service
is a server class/META-INF/service/org.some.Service
file so that any implementations listed within the file that are server classes are also removedThe text was updated successfully, but these errors were encountered: