on forName validate packages of classes to load#8277
on forName validate packages of classes to load#8277DaanHoogland wants to merge 2 commits intoapache:4.20from
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## 4.18 #8277 +/- ##
============================================
- Coverage 13.13% 13.11% -0.02%
+ Complexity 9143 9135 -8
============================================
Files 2720 2720
Lines 257717 257658 -59
Branches 40176 40173 -3
============================================
- Hits 33843 33804 -39
+ Misses 219583 219561 -22
- Partials 4291 4293 +2 ☔ View full report in Codecov by Sentry. |
| public class ApiSerializerHelper { | ||
| public static final Logger s_logger = Logger.getLogger(ApiSerializerHelper.class.getName()); | ||
| private static String token = "/"; | ||
| private static String[] apiPackages = {"com.cloud.agent.api", "org.apache.cloudstack.api"}; |
There was a problem hiding this comment.
I am not sure if this will improve security (is it the goal of this PR ?).
anyone can create java classes in the packages
There was a problem hiding this comment.
yes, it is just an extra layer. They will also have to get those classes on the classpath of the remote machine though. I was think of extending the method to also be able to add a required base class or interface.
There was a problem hiding this comment.
I am not sure if this will improve security (is it the goal of this PR ?). anyone can create java classes in the packages
any sugestions for improvement @weizhouapache ?
b3965d3 to
e5e91a2
Compare
e5e91a2 to
4805e80
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #8277 +/- ##
============================================
- Coverage 16.18% 16.18% -0.01%
- Complexity 13300 13302 +2
============================================
Files 5657 5657
Lines 498478 498488 +10
Branches 60501 60503 +2
============================================
- Hits 80668 80661 -7
- Misses 408827 408840 +13
- Partials 8983 8987 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4805e80 to
099404b
Compare
099404b to
4baf61f
Compare
4baf61f to
eaeb853
Compare
|
@blueorangutan package |
Description
This PR...
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?