2FA QR Codes

Move away from the Google Charts API for generating QR codes as this is currently broken and not a security best practice.
This commit is contained in:
Marcus Hill 2024-05-26 16:29:35 +01:00
parent 8b1ba7028e
commit 2b006af52d
1 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,10 @@ DEALINGS IN THE SOFTWARE.
\****************************************************************************/
// Check php-gd is installed
$testGD = get_extension_funcs("gd");
if (!$testGD){ echo "The GD extension is not installed, please install using 'apt install php-gd', restart Apache, and try again"; exit; }
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
if (isset($_POST['s']) && isset($_POST['d'])) {
$generator = new barcode_generator();