mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
escape qrencode arguments in multibyte-safe way
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
require_once '../../includes/config.php';
|
||||
require_once '../../includes/defaults.php';
|
||||
require_once '../../includes/functions.php';
|
||||
|
||||
function qr_encode($str)
|
||||
{
|
||||
@@ -34,7 +35,7 @@ $ssid = qr_encode($ssid);
|
||||
$password = qr_encode($password);
|
||||
|
||||
$data = "WIFI:S:$ssid;T:$type;P:$password;$hidden;";
|
||||
$command = "qrencode -t svg -m 0 -o - " . escapeshellarg($data);
|
||||
$command = "qrencode -t svg -m 0 -o - " . mb_escapeshellarg($data);
|
||||
$svg = shell_exec($command);
|
||||
|
||||
$config_mtime = filemtime(RASPI_HOSTAPD_CONFIG);
|
||||
|
Reference in New Issue
Block a user