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

[MINVOKER-324] Fix Temporary File Information Disclosure Vulnerability #152

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ private File mergeSettings(File interpolatedSettingsFile) throws MojoExecutionEx

private File writeMergedSettingsFile(Settings mergedSettings) throws IOException {
File mergedSettingsFile;
mergedSettingsFile = File.createTempFile("invoker-settings", ".xml");
mergedSettingsFile = Files.createTempFile("invoker-settings", ".xml").toFile();

SettingsXpp3Writer settingsWriter = new SettingsXpp3Writer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.maven.plugins.invoker;

import java.io.File;
import java.nio.file.Files;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -188,7 +189,7 @@ public void testConfigureRequestProject() throws Exception {
Properties props = new Properties();
InvokerProperties facade = new InvokerProperties(props);

File tempPom = File.createTempFile("maven-invoker-plugin-test", ".pom");
File tempPom = Files.createTempFile("maven-invoker-plugin-test", ".pom").toFile();
try {
File tempDir = tempPom.getParentFile();
when(request.getBaseDirectory()).thenReturn(tempDir);
Expand Down