-
Notifications
You must be signed in to change notification settings - Fork 20
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: Update to JDK21 - EXO-71474 - Meeds-io/MIPs#91 #324
Conversation
@@ -106,7 +105,7 @@ | |||
File dir = | |||
FileNameProducer.generateBackupSetDir(wsBackupConfig.getRepository(), wsBackupConfig.getWorkspace(), | |||
config.getBackupDir().getPath(), startTime); | |||
PrivilegedFileHelper.mkdirs(dir); | |||
dir.mkdirs(); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
@@ -1956,7 +1946,7 @@ | |||
public void restoreExistingRepository(File repositoryBackupSetDir, boolean asynchronous) | |||
throws BackupOperationException, BackupConfigurationException | |||
{ | |||
File[] cfs = PrivilegedFileHelper.listFiles(repositoryBackupSetDir, new RepositoryBackupLogsFilter()); | |||
File[] cfs = repositoryBackupSetDir.listFiles(new RepositoryBackupLogsFilter()); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
@@ -1981,7 +1971,7 @@ | |||
public void restoreExistingWorkspace(File workspaceBackupSetDir, boolean asynchronous) | |||
throws BackupOperationException, BackupConfigurationException | |||
{ | |||
File[] cfs = PrivilegedFileHelper.listFiles(workspaceBackupSetDir, new BackupLogsFilter()); | |||
File[] cfs = workspaceBackupSetDir.listFiles(new BackupLogsFilter()); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
@@ -770,7 +766,7 @@ | |||
File dir = | |||
FileNameProducer.generateBackupSetDir(config.getRepository(), config.getWorkspace(), config.getBackupDir() | |||
.getPath(), startTime); | |||
PrivilegedFileHelper.mkdirs(dir); | |||
dir.mkdirs(); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
@@ -2007,7 +1997,7 @@ | |||
public void restoreRepository(File repositoryBackupSetDir, boolean asynchronous) throws BackupOperationException, | |||
BackupConfigurationException | |||
{ | |||
File[] cfs = PrivilegedFileHelper.listFiles(repositoryBackupSetDir, new RepositoryBackupLogsFilter()); | |||
File[] cfs = repositoryBackupSetDir.listFiles(new RepositoryBackupLogsFilter()); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
@@ -1842,7 +1841,7 @@ | |||
throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath); | |||
} | |||
|
|||
File[] cfs = PrivilegedFileHelper.listFiles(backupSetDir, new RepositoryBackupLogsFilter()); | |||
File[] cfs = backupSetDir.listFiles(new RepositoryBackupLogsFilter()); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
@@ -1301,8 +1300,8 @@ | |||
throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath); | |||
} | |||
|
|||
File[] cfsw = PrivilegedFileHelper.listFiles(backupSetDir, new BackupLogsFilter()); | |||
File[] cfsr = PrivilegedFileHelper.listFiles(backupSetDir, new RepositoryBackupLogsFilter()); | |||
File[] cfsw = backupSetDir.listFiles(new BackupLogsFilter()); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
@@ -965,7 +964,7 @@ | |||
throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath); | |||
} | |||
|
|||
File[] cfs = PrivilegedFileHelper.listFiles(backupSetDir, new BackupLogsFilter()); | |||
File[] cfs = backupSetDir.listFiles(new BackupLogsFilter()); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
File[] cfsw = PrivilegedFileHelper.listFiles(backupSetDir, new BackupLogsFilter()); | ||
File[] cfsr = PrivilegedFileHelper.listFiles(backupSetDir, new RepositoryBackupLogsFilter()); | ||
File[] cfsw = backupSetDir.listFiles(new BackupLogsFilter()); | ||
File[] cfsr = backupSetDir.listFiles(new RepositoryBackupLogsFilter()); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
@@ -298,7 +238,7 @@ | |||
{ | |||
this.logFile = logFile; | |||
reader = | |||
XMLInputFactory.newInstance().createXMLStreamReader(PrivilegedFileHelper.fileInputStream(logFile), | |||
XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(logFile), |
Check failure
Code scanning / SonarCloud
XML parsers should not be vulnerable to XXE attacks High
Remove usage of SecurityManager as it is deprecated for removal in jdk21 Remove also usage of classes - SecurityHelper - PrivilegedSystemHelper - PrivilegedFileHelper - SecureList - SecureSet - SecureCollections These classes are here only to use securityManager, and as it is removed, it is no more necessary
|
Remove usage of SecurityManager as it is deprecated for removal in jdk21 Remove also usage of classes
These classes are here only to use securityManager, and as it is removed, it is no more necessary