|
|
|
@ -624,22 +624,23 @@ class Security |
|
|
|
|
return $output; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static function generateSecTokenVariable(string $prefix = ''): string |
|
|
|
|
{ |
|
|
|
|
if (empty($prefix)) { |
|
|
|
|
return 'sec_token'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $prefix.'_sec_token'; |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* Sanitize a string, so it can be used in the exec() command without |
|
|
|
|
* "jail-breaking" to execute other commands. |
|
|
|
|
* |
|
|
|
|
* @param string $param The string to filter |
|
|
|
|
* @return string |
|
|
|
|
*/ |
|
|
|
|
public static function sanitizeExecParam(string $param): string |
|
|
|
|
{ |
|
|
|
|
return preg_replace('/[`;&|]/', '', $param); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static function generateSecTokenVariable(string $prefix = ''): string |
|
|
|
|
{ |
|
|
|
|
if (empty($prefix)) { |
|
|
|
|
return 'sec_token'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $prefix.'_sec_token'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|