Skip to content

4.2 - Mandate

Latest

Choose a tag to compare

@lewisgoddard lewisgoddard released this 29 Oct 06:55
62ddd5c

QR codes are now generated by chillerlan/php-qrcode, replacing the GPL-licensed and unmaintained jysperu/php-qr-code.

Package Changes

CHANGE: generateQrCode() now uses chillerlan/php-qrcode 6.x, which is MIT or Apache-2.0 licensed. Authenticatron no longer pulls in a GPL dependency. Its signature is unchanged, and it still returns a data:image/png;base64,… URI at the same dimensions. The PNGs are about 1.6 KB instead of 0.6 KB.
BUGFIX: Without ext-gd, generateQrCode() now returns null as documented, instead of throwing an uncaught Error. As a result, new() returns QR => null.
BUGFIX: No more imagedestroy() deprecation notices on PHP 8.5.
REQUIREMENT: Now needs ext-mbstring, and installs chillerlan/php-settings-container alongside it.

Example Pages

IMPROVEMENT: ?secret is honoured throughout. The new() example shows that secret instead of a fresh one, checkCode() shows which code and secret it checked, and the nav links keep it.
BUGFIX: An array-valued secret or secondfactor_code no longer causes a fatal TypeError.

Supporting Changes

TESTS: The QR code is decoded back to check it gives exactly the OTPAuth URL, and $Size and $Margin are checked to scale the image as before. Tests run on PHP 8.2 to 8.6.

Full Changelog: v4.1.2...4.2