From 55e94adb2b6afd099349fc1f71f60adfd9ebb55a Mon Sep 17 00:00:00 2001 From: billz Date: Sun, 7 Mar 2021 10:39:33 +0000 Subject: [PATCH] Add PHP_EOLs to parsed client.conf --- app/img/wg-qr-code.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/img/wg-qr-code.php b/app/img/wg-qr-code.php index 83cda725..7a66e6fc 100644 --- a/app/img/wg-qr-code.php +++ b/app/img/wg-qr-code.php @@ -11,7 +11,8 @@ if (!isset($_SERVER['HTTP_REFERER'])) { } exec("sudo cat " .RASPI_WIREGUARD_PATH.'client.conf', $return); -$peer_conf = qr_encode(implode($return)); +$peer_conf = implode(PHP_EOL,$return); +$peer_conf.= PHP_EOL; $command = "qrencode -t svg -m 0 -o - " . mb_escapeshellarg($peer_conf); $svg = shell_exec($command); $etag = hash('sha256', $peer_conf);