We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47ac069 commit 7122b41Copy full SHA for 7122b41
1 file changed
page-object/src/main/java/com/iluwatar/pageobject/App.java
@@ -77,7 +77,8 @@ public static void main(String[] args) {
77
} else {
78
// Java Desktop not supported - above unlikely to work for Windows so try the
79
// following instead...
80
- Runtime.getRuntime().exec("cmd.exe start " + applicationFile);
+ // Use ProcessBuilder with separate arguments to avoid command injection vulnerability
81
+ new ProcessBuilder("cmd.exe", "start", applicationFile.getAbsolutePath()).start();
82
}
83
84
} catch (IOException ex) {
0 commit comments