diff --git a/.docker/web/entrypoint.sh b/.docker/web/entrypoint.sh index 65e278df4..50fd9c072 100644 --- a/.docker/web/entrypoint.sh +++ b/.docker/web/entrypoint.sh @@ -7,9 +7,9 @@ run_service() # We'll need these anyway so why not kill some time while waiting on MySQL to be ready if [ -n "$ENV" ] && [ "$ENV" == "prod" ]; then - su -c 'composer --version && composer install --no-dev --optimize-autoloader --no-suggest; yarn --prod; yarn prod' gazelle + su -c 'composer --version && composer install --no-progress --no-dev --optimize-autoloader --no-suggest; yarn --prod; yarn prod' gazelle else - su -c 'composer --version && composer install; yarn; yarn dev' gazelle + su -c 'composer --version && composer install --no-progress; yarn; yarn dev' gazelle fi # Wait for MySQL... diff --git a/Dockerfile b/Dockerfile index fe1b6a560..d169fe0e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,8 @@ WORKDIR /var/www # Software package layer # Nodesource setup comes after yarnpkg because it runs `apt-get update` -RUN apt update \ - && apt install -y --no-install-recommends \ +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ apt-transport-https \ build-essential \ ca-certificates \ @@ -13,9 +13,8 @@ RUN apt update \ wget \ && wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add - \ && echo "deb https://packages.sury.org/php/ buster main" | tee /etc/apt/sources.list.d/php.list \ - && apt update \ - && apt install -y --no-install-recommends \ - composer \ + && apt-get update \ + && apt-get install -y --no-install-recommends \ cron \ curl \ git \ @@ -56,16 +55,25 @@ RUN apt update \ && apt-get install -y --no-install-recommends \ nodejs \ yarn \ - && apt autoremove \ + && apt-get autoremove \ && rm -rf /var/lib/apt/lists/* +RUN cd /tmp \ + # install our own copy of composer as the one included in debian:buster-slim is too old + # to work properly with PHP8+ + && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ + && php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \ + && php composer-setup.php \ + && php -r "unlink('composer-setup.php');" \ + && mv composer.phar /usr/local/bin/composer + # Python tools layer RUN pip3 install chardet eac-logchecker xld-logchecker # Puppeteer layer # This installs the necessary packages to run the bundled version of chromium for puppeteer -RUN apt update \ - && apt install -y --no-install-recommends \ +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ gconf-service \ libasound2 \ libatk1.0-0 \ @@ -102,7 +110,7 @@ RUN apt update \ libnss3 \ lsb-release \ xdg-utils \ - && apt autoremove \ + && apt-get autoremove \ && rm -rf /var/lib/apt/lists/* # If running Docker >= 1.13.0 use docker run's --init arg to reap zombie processes, otherwise diff --git a/composer.json b/composer.json index b7b7014f9..f126dd922 100644 --- a/composer.json +++ b/composer.json @@ -29,14 +29,14 @@ "ext-json": "*", "ext-mysqli": "*", "d11wtq/boris": "^1.0", - "endroid/qr-code": "^3.9", + "endroid/qr-code": "^4.2", + "hashids/hashids": "^4.1", "maennchen/zipstream-php": "^2.1", - "orpheusnet/bencode-torrent": "^1.1.1", + "orpheusnet/bencode-torrent": "^1.2.0", "orpheusnet/logchecker": "^0.11.0", "robmorgan/phinx": "^0.12.4", "robthree/twofactorauth": "^1.7", "twig/twig": "^2.12", - "vinkla/hashids": "^8.1", "whichbrowser/parser": "^2.0" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 40678189a..6047c405a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,26 +4,26 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c628170c237fa736803260703eb73704", + "content-hash": "d89beac1ffd9e4f30bf74854304e125b", "packages": [ { "name": "bacon/bacon-qr-code", - "version": "2.0.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "add6d9ff97336b62f95a3b94f75cea4e085465b2" + "reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/add6d9ff97336b62f95a3b94f75cea4e085465b2", - "reference": "add6d9ff97336b62f95a3b94f75cea4e085465b2", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09", + "reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09", "shasum": "" }, "require": { - "dasprid/enum": "^1.0", + "dasprid/enum": "^1.0.3", "ext-iconv": "*", - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "phly/keep-a-changelog": "^1.4", @@ -53,7 +53,11 @@ ], "description": "BaconQrCode is a QR code generator for PHP.", "homepage": "https://github.com/Bacon/BaconQrCode", - "time": "2020-07-30T16:40:58+00:00" + "support": { + "issues": "https://github.com/Bacon/BaconQrCode/issues", + "source": "https://github.com/Bacon/BaconQrCode/tree/2.0.4" + }, + "time": "2021-06-18T13:26:35+00:00" }, { "name": "cakephp/core", @@ -336,121 +340,46 @@ "enum", "map" ], - "time": "2020-10-02T16:03:48+00:00" - }, - { - "name": "doctrine/inflector", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", - "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^7.0", - "phpstan/phpstan": "^0.11", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-strict-rules": "^0.11", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" - } + "support": { + "issues": "https://github.com/DASPRiD/Enum/issues", + "source": "https://github.com/DASPRiD/Enum/tree/1.0.3" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", - "homepage": "https://www.doctrine-project.org/projects/inflector.html", - "keywords": [ - "inflection", - "inflector", - "lowercase", - "manipulation", - "php", - "plural", - "singular", - "strings", - "uppercase", - "words" - ], - "time": "2020-05-29T15:13:26+00:00" + "time": "2020-10-02T16:03:48+00:00" }, { "name": "endroid/qr-code", - "version": "3.9.1", + "version": "4.2.2", "source": { "type": "git", "url": "https://github.com/endroid/qr-code.git", - "reference": "8605e2c958ed568788da4e16bd8a9502e32f375f" + "reference": "53bfce79da95bf082484301fecbc1d77a3907f78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/endroid/qr-code/zipball/8605e2c958ed568788da4e16bd8a9502e32f375f", - "reference": "8605e2c958ed568788da4e16bd8a9502e32f375f", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/53bfce79da95bf082484301fecbc1d77a3907f78", + "reference": "53bfce79da95bf082484301fecbc1d77a3907f78", "shasum": "" }, "require": { "bacon/bacon-qr-code": "^2.0", - "ext-gd": "*", - "khanamiryan/qrcode-detector-decoder": "^1.0.2", - "myclabs/php-enum": "^1.5", - "php": ">=7.2", - "symfony/options-resolver": "^3.4||^4.4||^5.0", - "symfony/property-access": "^3.4||^4.4||^5.0" + "php": "^7.3||^8.0" }, "require-dev": { "endroid/quality": "dev-master", - "setasign/fpdf": "^1.8" + "ext-gd": "*", + "khanamiryan/qrcode-detector-decoder": "^1.0.4", + "setasign/fpdf": "^1.8.2" }, "suggest": { - "roave/security-advisories": "Avoids installation of package versions with vulnerabilities", - "setasign/fpdf": "Required to use the FPDF writer.", - "symfony/security-checker": "Checks your composer.lock for vulnerabilities" + "ext-gd": "Enables you to write PNG images", + "khanamiryan/qrcode-detector-decoder": "Enables you to use the image validator", + "roave/security-advisories": "Makes sure package versions with known security issues are not installed", + "setasign/fpdf": "Enables you to use the PDF writer" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -471,90 +400,45 @@ "description": "Endroid QR Code", "homepage": "https://github.com/endroid/qr-code", "keywords": [ - "bundle", "code", "endroid", "php", "qr", "qrcode" ], - "time": "2020-07-10T10:16:06+00:00" - }, - { - "name": "graham-campbell/manager", - "version": "v4.6.0", - "source": { - "type": "git", - "url": "https://github.com/GrahamCampbell/Laravel-Manager.git", - "reference": "e18c29f98adb770bd890b6d66b27ba4730272599" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Manager/zipball/e18c29f98adb770bd890b6d66b27ba4730272599", - "reference": "e18c29f98adb770bd890b6d66b27ba4730272599", - "shasum": "" - }, - "require": { - "illuminate/contracts": "^5.5 || ^6.0 || ^7.0 || ^8.0", - "illuminate/support": "^5.5 || ^6.0 || ^7.0 || ^8.0", - "php": "^7.1.3 || ^8.0" - }, - "require-dev": { - "graham-campbell/analyzer": "^2.4 || ^3.0", - "graham-campbell/testbench-core": "^3.2", - "mockery/mockery": "^1.3.1", - "phpunit/phpunit": "^6.5 || ^7.5 || ^8.4 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "GrahamCampbell\\Manager\\": "src/" - } + "support": { + "issues": "https://github.com/endroid/qr-code/issues", + "source": "https://github.com/endroid/qr-code/tree/4.2.2" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Graham Campbell", - "email": "graham@alt-three.com" + "url": "https://github.com/endroid", + "type": "github" } ], - "description": "Manager Provides Some Manager Functionality For Laravel", - "keywords": [ - "Graham Campbell", - "GrahamCampbell", - "Laravel Manager", - "Laravel-Manager", - "connector", - "framework", - "interface", - "laravel", - "manager" - ], - "time": "2020-07-25T18:02:52+00:00" + "time": "2021-08-16T22:08:35+00:00" }, { "name": "hashids/hashids", - "version": "4.0.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/vinkla/hashids.git", - "reference": "43bb2407f16a631f0128f47bcb67ff986c63dde2" + "reference": "8cab111f78e0bd9c76953b082919fc9e251761be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vinkla/hashids/zipball/43bb2407f16a631f0128f47bcb67ff986c63dde2", - "reference": "43bb2407f16a631f0128f47bcb67ff986c63dde2", + "url": "https://api.github.com/repos/vinkla/hashids/zipball/8cab111f78e0bd9c76953b082919fc9e251761be", + "reference": "8cab111f78e0bd9c76953b082919fc9e251761be", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^8.0 || ^9.4", + "squizlabs/php_codesniffer": "^3.5" }, "suggest": { "ext-bcmath": "Required to use BC Math arbitrary precision mathematics (*).", @@ -563,7 +447,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -578,17 +462,15 @@ "authors": [ { "name": "Ivan Akimov", - "email": "ivan@barreleye.com", - "homepage": "https://twitter.com/IvanAkimov" + "email": "ivan@barreleye.com" }, { "name": "Vincent Klaiber", - "email": "hello@doubledip.se", - "homepage": "https://doubledip.se" + "email": "hello@doubledip.se" } ], "description": "Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers", - "homepage": "http://hashids.org/php", + "homepage": "https://hashids.org/php", "keywords": [ "bitly", "decode", @@ -600,163 +482,11 @@ "obfuscate", "youtube" ], - "time": "2019-04-03T13:40:29+00:00" - }, - { - "name": "illuminate/contracts", - "version": "v7.22.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "37a76782aef1bb83680143c4283b1bf3db751e96" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/37a76782aef1bb83680143c4283b1bf3db751e96", - "reference": "37a76782aef1bb83680143c4283b1bf3db751e96", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "psr/container": "^1.0", - "psr/simple-cache": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Contracts\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Contracts package.", - "homepage": "https://laravel.com", - "time": "2020-07-19T12:38:38+00:00" - }, - { - "name": "illuminate/support", - "version": "v7.22.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "cead591a137776e281090a46481c9831677018ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/cead591a137776e281090a46481c9831677018ca", - "reference": "cead591a137776e281090a46481c9831677018ca", - "shasum": "" - }, - "require": { - "doctrine/inflector": "^1.4|^2.0", - "ext-json": "*", - "ext-mbstring": "*", - "illuminate/contracts": "^7.0", - "nesbot/carbon": "^2.17", - "php": "^7.2.5", - "voku/portable-ascii": "^1.4.8" - }, - "conflict": { - "tightenco/collect": "<5.5.33" - }, - "suggest": { - "illuminate/filesystem": "Required to use the composer class (^7.0).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", - "ramsey/uuid": "Required to use Str::uuid() (^3.7|^4.0).", - "symfony/process": "Required to use the composer class (^5.0).", - "symfony/var-dumper": "Required to use the dd function (^5.0).", - "vlucas/phpdotenv": "Required to use the Env class and env helper (^4.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Support\\": "" - }, - "files": [ - "helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Support package.", - "homepage": "https://laravel.com", - "time": "2020-07-24T09:17:00+00:00" - }, - { - "name": "khanamiryan/qrcode-detector-decoder", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git", - "reference": "89b57f2d9939dd57394b83f6ccbd3e1a74659e34" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/89b57f2d9939dd57394b83f6ccbd3e1a74659e34", - "reference": "89b57f2d9939dd57394b83f6ccbd3e1a74659e34", - "shasum": "" - }, - "require": { - "php": "^5.6|^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Zxing\\": "lib/" - }, - "files": [ - "lib/Common/customFunctions.php" - ] + "support": { + "issues": "https://github.com/vinkla/hashids/issues", + "source": "https://github.com/vinkla/hashids/tree/4.1.0" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ashot Khanamiryan", - "email": "a.khanamiryan@gmail.com", - "homepage": "https://github.com/khanamiryan", - "role": "Developer" - } - ], - "description": "QR code decoder / reader", - "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder/", - "keywords": [ - "barcode", - "qr", - "zxing" - ], - "time": "2020-04-19T16:18:51+00:00" + "time": "2020-11-26T19:24:33+00:00" }, { "name": "maennchen/zipstream-php", @@ -865,101 +595,22 @@ ], "time": "2020-02-14T08:15:52+00:00" }, - { - "name": "nesbot/carbon", - "version": "2.36.1", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "ee7378a36cc62952100e718bcc58be4c7210e55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ee7378a36cc62952100e718bcc58be4c7210e55f", - "reference": "ee7378a36cc62952100e718bcc58be4c7210e55f", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.1.8 || ^8.0", - "symfony/polyfill-mbstring": "^1.0", - "symfony/translation": "^3.4 || ^4.0 || ^5.0" - }, - "require-dev": { - "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", - "kylekatarnls/multi-tester": "^2.0", - "phpmd/phpmd": "^2.8", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.30", - "phpunit/phpunit": "^7.5 || ^8.0", - "squizlabs/php_codesniffer": "^3.4" - }, - "bin": [ - "bin/carbon" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev", - "dev-3.x": "3.x-dev" - }, - "laravel": { - "providers": [ - "Carbon\\Laravel\\ServiceProvider" - ] - }, - "phpstan": { - "includes": [ - "extension.neon" - ] - } - }, - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - }, - { - "name": "kylekatarnls", - "homepage": "http://github.com/kylekatarnls" - } - ], - "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "http://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ], - "time": "2020-07-04T12:29:56+00:00" - }, { "name": "orpheusnet/bencode-torrent", - "version": "v1.1.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/OPSnet/bencode-torrent.git", - "reference": "917cf865a94f672d8b83af68ce693de3309ee3e5" + "reference": "42f5170482468ee26f0640e9dc10223e2913ae39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OPSnet/bencode-torrent/zipball/917cf865a94f672d8b83af68ce693de3309ee3e5", - "reference": "917cf865a94f672d8b83af68ce693de3309ee3e5", + "url": "https://api.github.com/repos/OPSnet/bencode-torrent/zipball/42f5170482468ee26f0640e9dc10223e2913ae39", + "reference": "42f5170482468ee26f0640e9dc10223e2913ae39", "shasum": "" }, "require": { - "php": "^7.2" + "php": ">=7.2" }, "require-dev": { "phpstan/phpstan": "^0.12.48", @@ -983,7 +634,11 @@ } ], "description": "PHP Library for decoding and encoding BitTorrent BEncoded data, built for Gazelle", - "time": "2020-10-12T00:27:44+00:00" + "support": { + "issues": "https://github.com/OPSnet/bencode-torrent/issues", + "source": "https://github.com/OPSnet/bencode-torrent/tree/v1.2.0" + }, + "time": "2021-08-22T14:43:26+00:00" }, { "name": "orpheusnet/logchecker", @@ -1706,97 +1361,41 @@ "time": "2020-10-24T12:01:57+00:00" }, { - "name": "symfony/options-resolver", - "version": "v5.1.7", + "name": "symfony/polyfill-ctype", + "version": "v1.20.0", "source": { "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "4c7e155bf7d93ea4ba3824d5a14476694a5278dd" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4c7e155bf7d93ea4ba3824d5a14476694a5278dd", - "reference": "4c7e155bf7d93ea4ba3824d5a14476694a5278dd", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-php80": "^1.15" + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" + "Symfony\\Polyfill\\Ctype\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony OptionsResolver Component", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "time": "2020-09-27T03:44:28+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2279,151 +1878,6 @@ "homepage": "https://symfony.com", "time": "2020-07-23T08:36:24+00:00" }, - { - "name": "symfony/property-access", - "version": "v5.1.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/property-access.git", - "reference": "4c43f7ff784e1e3ee1c96e15f76b342af6617b39" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/4c43f7ff784e1e3ee1c96e15f76b342af6617b39", - "reference": "4c43f7ff784e1e3ee1c96e15f76b342af6617b39", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15", - "symfony/property-info": "^5.1.1" - }, - "require-dev": { - "symfony/cache": "^4.4|^5.0" - }, - "suggest": { - "psr/cache-implementation": "To cache access methods." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\PropertyAccess\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony PropertyAccess Component", - "homepage": "https://symfony.com", - "keywords": [ - "access", - "array", - "extraction", - "index", - "injection", - "object", - "property", - "property path", - "reflection" - ], - "time": "2020-09-02T16:23:27+00:00" - }, - { - "name": "symfony/property-info", - "version": "v5.1.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/property-info.git", - "reference": "22518930091e0bdb249694efc509e3697f7e325e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/22518930091e0bdb249694efc509e3697f7e325e", - "reference": "22518930091e0bdb249694efc509e3697f7e325e", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15", - "symfony/string": "^5.1" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<0.3.0", - "symfony/dependency-injection": "<4.4" - }, - "require-dev": { - "doctrine/annotations": "~1.7", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/cache": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/serializer": "^4.4|^5.0" - }, - "suggest": { - "phpdocumentor/reflection-docblock": "To use the PHPDoc", - "psr/cache-implementation": "To cache results", - "symfony/doctrine-bridge": "To use Doctrine metadata", - "symfony/serializer": "To use Serializer metadata" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\PropertyInfo\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kévin Dunglas", - "email": "dunglas@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Property Info Component", - "homepage": "https://symfony.com", - "keywords": [ - "doctrine", - "phpdoc", - "property", - "symfony", - "type", - "validator" - ], - "time": "2020-09-07T05:10:28+00:00" - }, { "name": "symfony/service-contracts", "version": "v2.2.0", @@ -2580,145 +2034,6 @@ ], "time": "2020-10-24T12:01:57+00:00" }, - { - "name": "symfony/translation", - "version": "v5.1.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "4b9bf719f0fa5b05253c37fc7b335337ec7ec427" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/4b9bf719f0fa5b05253c37fc7b335337ec7ec427", - "reference": "4b9bf719f0fa5b05253c37fc7b335337ec7ec427", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15", - "symfony/translation-contracts": "^2" - }, - "conflict": { - "symfony/config": "<4.4", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" - }, - "provide": { - "symfony/translation-implementation": "2.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0", - "symfony/console": "^4.4|^5.0", - "symfony/dependency-injection": "^5.0", - "symfony/finder": "^4.4|^5.0", - "symfony/http-kernel": "^5.0", - "symfony/intl": "^4.4|^5.0", - "symfony/service-contracts": "^1.1.2|^2", - "symfony/yaml": "^4.4|^5.0" - }, - "suggest": { - "psr/log-implementation": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Translation Component", - "homepage": "https://symfony.com", - "time": "2020-06-30T17:42:22+00:00" - }, - { - "name": "symfony/translation-contracts", - "version": "v2.1.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "616a9773c853097607cf9dd6577d5b143ffdcd63" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/616a9773c853097607cf9dd6577d5b143ffdcd63", - "reference": "616a9773c853097607cf9dd6577d5b143ffdcd63", - "shasum": "" - }, - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to translation", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2020-07-06T13:23:11+00:00" - }, { "name": "symfony/yaml", "version": "v5.1.8", @@ -2856,118 +2171,6 @@ ], "time": "2020-07-05T13:08:05+00:00" }, - { - "name": "vinkla/hashids", - "version": "8.1.0", - "source": { - "type": "git", - "url": "https://github.com/vinkla/laravel-hashids.git", - "reference": "ecf5534731dbd476e52859b3a6ab265f29ebade7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vinkla/laravel-hashids/zipball/ecf5534731dbd476e52859b3a6ab265f29ebade7", - "reference": "ecf5534731dbd476e52859b3a6ab265f29ebade7", - "shasum": "" - }, - "require": { - "graham-campbell/manager": "^4.4", - "hashids/hashids": "^4.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5" - }, - "require-dev": { - "graham-campbell/analyzer": "^3.0", - "graham-campbell/testbench": "^5.4", - "mockery/mockery": "^1.3", - "phpunit/phpunit": "^8.5 || ^9.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "8.1-dev" - }, - "laravel": { - "providers": [ - "Vinkla\\Hashids\\HashidsServiceProvider" - ], - "aliases": { - "Hashids": "Vinkla\\Hashids\\Facades\\Hashids" - } - } - }, - "autoload": { - "psr-4": { - "Vinkla\\Hashids\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Vincent Klaiber", - "email": "hello@doubledip.se" - } - ], - "description": "A Hashids bridge for Laravel", - "keywords": [ - "hashids", - "laravel" - ], - "time": "2020-03-10T08:21:07+00:00" - }, - { - "name": "voku/portable-ascii", - "version": "1.5.3", - "source": { - "type": "git", - "url": "https://github.com/voku/portable-ascii.git", - "reference": "25bcbf01678930251fd572891447d9e318a6e2b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/25bcbf01678930251fd572891447d9e318a6e2b8", - "reference": "25bcbf01678930251fd572891447d9e318a6e2b8", - "shasum": "" - }, - "require": { - "php": ">=7.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~6.0 || ~7.0" - }, - "suggest": { - "ext-intl": "Use Intl for transliterator_transliterate() support" - }, - "type": "library", - "autoload": { - "psr-4": { - "voku\\": "src/voku/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Lars Moelleken", - "homepage": "http://www.moelleken.org/" - } - ], - "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", - "homepage": "https://github.com/voku/portable-ascii", - "keywords": [ - "ascii", - "clean", - "php" - ], - "time": "2020-07-22T23:32:04+00:00" - }, { "name": "whichbrowser/parser", "version": "v2.0.42", diff --git a/sections/user/2fa/configure.php b/sections/user/2fa/configure.php index 269611d43..44e61fb6a 100644 --- a/sections/user/2fa/configure.php +++ b/sections/user/2fa/configure.php @@ -1,7 +1,10 @@ true]); @@ -27,12 +30,17 @@ session_write_close(); } -$qrCode = new QrCode('otpauth://totp/' . SITE_NAME . "?secret=$secret"); -$qrCode->setSize(400); -$qrCode->setMargin(20); -$qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH()); -$qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]); -$qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]); +$qrCode = Builder::create() + ->writer(new PngWriter()) + ->writerOptions([]) + ->data('otpauth://totp/' . SITE_NAME . "?secret=$secret") + ->encoding(new Encoding('UTF-8')) + ->errorCorrectionLevel(new ErrorCorrectionLevelHigh()) + ->size(400) + ->margin(20) + ->foregroundColor(new Color(0, 0, 0, 0)) + ->backgroundColor(new Color(255, 255, 255, 0)) + ->build(); View::show_header('Two-factor Authentication');