From 7e17bc74b22fabcd84e9a3f588d93b50b4d60194 Mon Sep 17 00:00:00 2001 From: nexxo Date: Sat, 25 Jul 2026 22:40:54 +0200 Subject: [PATCH] fix(vpn): give the QR code the specified four-module quiet zone Two modules is below the minimum, and against a bordered card some readers fail to locate the symbol at all. Co-Authored-By: Claude Opus 4.8 --- app/Services/Wireguard/QrCode.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Services/Wireguard/QrCode.php b/app/Services/Wireguard/QrCode.php index 6d04576..e328754 100644 --- a/app/Services/Wireguard/QrCode.php +++ b/app/Services/Wireguard/QrCode.php @@ -21,7 +21,9 @@ final class QrCode // against a screen — more redundancy would only make the code denser. $matrix = Encoder::encode($text, ErrorCorrectionLevel::L())->getMatrix(); $width = $matrix->getWidth(); - $quiet = 2; + // Four modules is the specified minimum quiet zone. Less than that and + // some readers fail to find the symbol at all against a bordered card. + $quiet = 4; $total = $width + 2 * $quiet; $cells = '';