Skip to content
Open
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
2 changes: 1 addition & 1 deletion amp_conf/htdocs/admin/libraries/BMO/PKCS.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function createCert($base,$cabase,$passphrase) {
throw new \Exception(_("Invalid password supplied - less than 8 chars"));
}
// Generate a key
$out = $this->runOpenSSL("x509 -req -sha256 -days 7 " . $cdv ." -in " . $location . "/" . $base . ".csr -CA " . $location . "/".$cabase.".crt -CAkey " . $location . "/".$cabase.".key -set_serial 01 -out " . $location . "/" . $base . ".crt -passin stdin", $passphrase);
$out = $this->runOpenSSL("x509 -req -sha256 -days " . $cdv ." -in " . $location . "/" . $base . ".csr -CA " . $location . "/".$cabase.".crt -CAkey " . $location . "/".$cabase.".key -set_serial 01 -out " . $location . "/" . $base . ".crt -passin stdin", $passphrase);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use some escapeshellarg() calls, but the same applies for every command in this file

} else {
$out = $this->runOpenSSL("x509 -req -sha256 -days " . $cdv ." -in " . $location . "/" . $base . ".csr -CA " . $location . "/".$cabase.".crt -CAkey " . $location . "/".$cabase.".key -set_serial 01 -out " . $location . "/" . $base . ".crt");
}
Expand Down