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:
@@ -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 (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
|
||||||
if (isset($_POST['s']) && isset($_POST['d'])) {
|
if (isset($_POST['s']) && isset($_POST['d'])) {
|
||||||
$generator = new barcode_generator();
|
$generator = new barcode_generator();
|
||||||
@@ -3345,4 +3349,4 @@ class barcode_generator {
|
|||||||
119, 238, 241, 207, 179, 75, 150, 1,
|
119, 238, 241, 207, 179, 75, 150, 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user