Skip to content

Commit f16ea16

Browse files
authored
set verify ssl parameter for HTTP based QR provider to true by default PR #126
2 parents f35f2ae + b964b2a commit f16ea16

File tree

7 files changed

+8
-9
lines changed

7 files changed

+8
-9
lines changed

docs/qr-codes/image-charts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Image-Charts
77

88
Argument | Default value
99
------------------------|---------------
10-
`$verifyssl` | `false`
10+
`$verifyssl` | `true`
1111
`$errorcorrectionlevel` | `'L'`
1212
`$margin` | `4`
1313

docs/qr-codes/qr-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: QR Server
77

88
Argument | Default value
99
------------------------|---------------
10-
`$verifyssl` | `false`
10+
`$verifyssl` | `true`
1111
`$errorcorrectionlevel` | `'L'`
1212
`$margin` | `4`
1313
`$qzone` | `1`

lib/Providers/Qr/BaseHTTPQRCodeProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
abstract class BaseHTTPQRCodeProvider implements IQRCodeProvider
88
{
9-
protected bool $verifyssl;
9+
protected bool $verifyssl = true;
1010

1111
protected function getContent(string $url): string|bool
1212
{

lib/Providers/Qr/GoogleChartsQrCodeProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// https://developers.google.com/chart/infographics/docs/qr_codes
88
class GoogleChartsQrCodeProvider extends BaseHTTPQRCodeProvider
99
{
10-
public function __construct(protected bool $verifyssl = false, public string $errorcorrectionlevel = 'L', public int $margin = 4, public string $encoding = 'UTF-8')
10+
public function __construct(protected bool $verifyssl = true, public string $errorcorrectionlevel = 'L', public int $margin = 4, public string $encoding = 'UTF-8')
1111
{
1212
}
1313

lib/Providers/Qr/ImageChartsQRCodeProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
class ImageChartsQRCodeProvider extends BaseHTTPQRCodeProvider
1111
{
12-
public function __construct(protected bool $verifyssl = false, public string $errorcorrectionlevel = 'L', public int $margin = 1)
12+
public function __construct(protected bool $verifyssl = true, public string $errorcorrectionlevel = 'L', public int $margin = 1)
1313
{
1414
}
1515

lib/Providers/Qr/QRServerProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
namespace RobThree\Auth\Providers\Qr;
66

77
/**
8-
* Use http://goqr.me/api/doc/create-qr-code/ to get QR code
8+
* Use https://goqr.me/api/doc/create-qr-code/ to get QR code
99
*/
1010
class QRServerProvider extends BaseHTTPQRCodeProvider
1111
{
12-
public function __construct(protected bool $verifyssl = false, public string $errorcorrectionlevel = 'L', public int $margin = 4, public int $qzone = 1, public string $bgcolor = 'ffffff', public string $color = '000000', public string $format = 'png')
12+
public function __construct(protected bool $verifyssl = true, public string $errorcorrectionlevel = 'L', public int $margin = 4, public int $qzone = 1, public string $bgcolor = 'ffffff', public string $color = '000000', public string $format = 'png')
1313
{
1414
}
1515

lib/Providers/Qr/QRicketProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
*/
1010
class QRicketProvider extends BaseHTTPQRCodeProvider
1111
{
12-
public function __construct(public string $errorcorrectionlevel = 'L', public string $bgcolor = 'ffffff', public string $color = '000000', public string $format = 'p')
12+
public function __construct(protected bool $verifyssl = true, public string $errorcorrectionlevel = 'L', public string $bgcolor = 'ffffff', public string $color = '000000', public string $format = 'p')
1313
{
14-
$this->verifyssl = false;
1514
}
1615

1716
public function getMimeType(): string

0 commit comments

Comments
 (0)