We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2adb15e commit aa05fe7Copy full SHA for aa05fe7
1 file changed
src/Util/XML.php
@@ -95,6 +95,11 @@ public static function decodeP7M($file)
95
96
$output_file = $directory.'/'.basename($file, '.p7m');
97
98
+ // Validate that file path doesn't contain shell metacharacters
99
+ if (preg_match('/[;&|`$(){}\\[\\]<>]/', $file)) {
100
+ throw new \Exception('Invalid file path');
101
+ }
102
+
103
try {
104
if (function_exists('exec')) {
105
exec('openssl smime -verify -noverify -in "'.$file.'" -inform DER -out "'.$output_file.'"', $output, $cmd);
0 commit comments