mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Merge with upstream master
This commit is contained in:
@@ -603,11 +603,10 @@ function mb_escapeshellarg($arg)
|
||||
{
|
||||
$isWindows = strtolower(substr(PHP_OS, 0, 3)) === 'win';
|
||||
if ($isWindows) {
|
||||
$escaped_arg = str_replace(array('"', '%'), '', $arg);
|
||||
return '"' . str_replace(array('"', '%'), '', $arg) . '"';
|
||||
} else {
|
||||
$escaped_arg = str_replace("'", "'\\''", $arg);
|
||||
return "'" . str_replace("'", "'\\''", $arg) . "'";
|
||||
}
|
||||
return "\"$escaped_arg\"";
|
||||
}
|
||||
|
||||
function dnsServers()
|
||||
@@ -776,3 +775,11 @@ function qr_encode($str)
|
||||
{
|
||||
return preg_replace('/(?<!\\\)([\":;,])/', '\\\\\1', $str);
|
||||
}
|
||||
|
||||
function evalHexSequence($string) {
|
||||
$evaluator = function ($input) {
|
||||
return hex2bin($input[1]);
|
||||
};
|
||||
return preg_replace_callback('/\\\x(..)/', $evaluator, $string);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user