mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
WW-4688 Excludes "java.ext.dirs" when scanning for actions
This commit is contained in:
@@ -138,6 +138,16 @@ public class UrlSet {
|
||||
return excludePaths(System.getProperty("java.endorsed.dirs", ""));
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls excludePaths(System.getProperty("java.ext.dirs"))
|
||||
*
|
||||
* @return url set
|
||||
* @throws MalformedURLException in case if incorrect URL
|
||||
*/
|
||||
public UrlSet excludeUserExtensionsDir() throws MalformedURLException {
|
||||
return excludePaths(System.getProperty("java.ext.dirs", ""));
|
||||
}
|
||||
|
||||
public UrlSet excludeJavaHome() throws MalformedURLException {
|
||||
String path = System.getProperty("java.home");
|
||||
if (path != null) {
|
||||
|
||||
+4
-2
@@ -443,8 +443,10 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
|
||||
});
|
||||
|
||||
|
||||
urlSet = urlSet.excludeJavaExtDirs();
|
||||
urlSet = urlSet.excludeJavaEndorsedDirs();
|
||||
urlSet = urlSet.excludeJavaExtDirs()
|
||||
.excludeJavaEndorsedDirs()
|
||||
.excludeUserExtensionsDir();
|
||||
|
||||
try {
|
||||
urlSet = urlSet.excludeJavaHome();
|
||||
} catch (NullPointerException e) {
|
||||
|
||||
Reference in New Issue
Block a user