diff --git a/flexiapi/.env.example b/flexiapi/.env.example index 2dcbfb7..27961cc 100644 --- a/flexiapi/.env.example +++ b/flexiapi/.env.example @@ -5,6 +5,7 @@ APP_DEBUG=false APP_URL=http://localhost APP_SIP_DOMAIN=sip.example.com APP_FLEXISIP_PROXY_PID=/var/run/flexisip-proxy.pid +APP_EVERYONE_IS_ADMIN=false # SIP server parameters ACCOUNT_PROXY_REGISTRAR_ADDRESS=sip.example.com # Proxy registrar address, can be different than the SIP domain diff --git a/flexiapi/app/Http/Middleware/AuthenticateAdmin.php b/flexiapi/app/Http/Middleware/AuthenticateAdmin.php index afe4b01..877835a 100644 --- a/flexiapi/app/Http/Middleware/AuthenticateAdmin.php +++ b/flexiapi/app/Http/Middleware/AuthenticateAdmin.php @@ -19,7 +19,7 @@ class AuthenticateAdmin return redirect()->route('account.login'); } - if (!$request->user()->isAdmin()) { + if (!$request->user()->isAdmin() && !config('app.everyone_is_admin')) { return abort(403, 'Unauthorized area'); } diff --git a/flexiapi/app/Http/Middleware/AuthenticateDigestOrKey.php b/flexiapi/app/Http/Middleware/AuthenticateDigestOrKey.php index 6ac2275..290a226 100644 --- a/flexiapi/app/Http/Middleware/AuthenticateDigestOrKey.php +++ b/flexiapi/app/Http/Middleware/AuthenticateDigestOrKey.php @@ -92,14 +92,14 @@ class AuthenticateDigestOrKey 'opaque' => 'required|in:'.$this->getOpaque(), 'uri' => 'in:/'.$request->path(), 'qop' => 'required|in:auth', - 'realm' => 'required', + 'realm' => 'required|in:'.$domain, 'nc' => 'required', 'cnonce' => 'required', 'algorithm' => [ 'required', Rule::in(array_keys(self::ALGORITHMS)), ], - 'username' => 'required|email', + 'username' => 'required|in:'.$username, ])->validate(); // Headers @@ -195,14 +195,14 @@ class AuthenticateDigestOrKey foreach (array_keys(self::ALGORITHMS) as $algorithm) { array_push( $headers, - $this->generateAuthHeader($algorithm, $nonce) + $this->generateAuthHeader($account->domain, $algorithm, $nonce) ); } break; } else if (\in_array($password->algorithm, array_keys(self::ALGORITHMS))) { array_push( $headers, - $this->generateAuthHeader($password->algorithm, $nonce) + $this->generateAuthHeader($account->domain, $password->algorithm, $nonce) ); } } @@ -210,15 +210,15 @@ class AuthenticateDigestOrKey return $headers; } - private function generateAuthHeader(string $algorithm, string $nonce): string + private function generateAuthHeader(string $realm, string $algorithm, string $nonce): string { - return 'Digest realm=test,qop=auth,algorithm='.$algorithm.',nonce="'.$nonce.'",opaque="'.$this->getOpaque().'"'; + return 'Digest realm="'.$realm.'",qop="auth",algorithm='.$algorithm.',nonce="'.$nonce.'",opaque="'.$this->getOpaque().'"'; } private function extractFromHeader(string $string): string { list($from) = explode(';', \substr($string, 4)); - return $from; + return \rawurldecode($from); } private function getOpaque(): string diff --git a/flexiapi/bootstrap/cache/.gitignore b/flexiapi/bootstrap/cache/.gitignore old mode 100644 new mode 100755 diff --git a/flexiapi/composer.lock b/flexiapi/composer.lock index d972ec9..8319179 100644 --- a/flexiapi/composer.lock +++ b/flexiapi/composer.lock @@ -401,16 +401,16 @@ }, { "name": "egulias/email-validator", - "version": "2.1.24", + "version": "2.1.25", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ca90a3291eee1538cd48ff25163240695bd95448" + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ca90a3291eee1538cd48ff25163240695bd95448", - "reference": "ca90a3291eee1538cd48ff25163240695bd95448", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4", + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4", "shasum": "" }, "require": { @@ -457,7 +457,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/2.1.24" + "source": "https://github.com/egulias/EmailValidator/tree/2.1.25" }, "funding": [ { @@ -465,7 +465,7 @@ "type": "github" } ], - "time": "2020-11-14T15:56:27+00:00" + "time": "2020-12-29T14:50:06+00:00" }, { "name": "erusev/parsedown", @@ -577,16 +577,16 @@ }, { "name": "giggsey/libphonenumber-for-php", - "version": "8.12.14", + "version": "8.12.15", "source": { "type": "git", "url": "https://github.com/giggsey/libphonenumber-for-php.git", - "reference": "c42a963110b08b8a4a419c35566bf9d3456ba479" + "reference": "c1f328bface2745ff1a292639dd68cafc673a456" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/c42a963110b08b8a4a419c35566bf9d3456ba479", - "reference": "c42a963110b08b8a4a419c35566bf9d3456ba479", + "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/c1f328bface2745ff1a292639dd68cafc673a456", + "reference": "c1f328bface2745ff1a292639dd68cafc673a456", "shasum": "" }, "require": { @@ -646,7 +646,7 @@ "issues": "https://github.com/giggsey/libphonenumber-for-php/issues", "source": "https://github.com/giggsey/libphonenumber-for-php" }, - "time": "2020-12-02T10:54:10+00:00" + "time": "2020-12-15T10:15:17+00:00" }, { "name": "giggsey/locale", @@ -970,16 +970,16 @@ }, { "name": "laravel/framework", - "version": "v8.17.2", + "version": "v8.20.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "b89363b540bd8ad6e727ee165b510a19fe170a28" + "reference": "b5d8573ab16027867eaa1ac148893833434f9b02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/b89363b540bd8ad6e727ee165b510a19fe170a28", - "reference": "b89363b540bd8ad6e727ee165b510a19fe170a28", + "url": "https://api.github.com/repos/laravel/framework/zipball/b5d8573ab16027867eaa1ac148893833434f9b02", + "reference": "b5d8573ab16027867eaa1ac148893833434f9b02", "shasum": "" }, "require": { @@ -999,15 +999,15 @@ "psr/simple-cache": "^1.0", "ramsey/uuid": "^4.0", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^5.1", - "symfony/error-handler": "^5.1", - "symfony/finder": "^5.1", - "symfony/http-foundation": "^5.1", - "symfony/http-kernel": "^5.1", - "symfony/mime": "^5.1", - "symfony/process": "^5.1", - "symfony/routing": "^5.1", - "symfony/var-dumper": "^5.1", + "symfony/console": "^5.1.4", + "symfony/error-handler": "^5.1.4", + "symfony/finder": "^5.1.4", + "symfony/http-foundation": "^5.1.4", + "symfony/http-kernel": "^5.1.4", + "symfony/mime": "^5.1.4", + "symfony/process": "^5.1.4", + "symfony/routing": "^5.1.4", + "symfony/var-dumper": "^5.1.4", "tijsverkoyen/css-to-inline-styles": "^2.2.2", "vlucas/phpdotenv": "^5.2", "voku/portable-ascii": "^1.4.8" @@ -1058,11 +1058,11 @@ "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "^1.4.2", - "orchestra/testbench-core": "^6.5", + "orchestra/testbench-core": "^6.8", "pda/pheanstalk": "^4.0", "phpunit/phpunit": "^8.5.8|^9.3.3", "predis/predis": "^1.1.1", - "symfony/cache": "^5.1" + "symfony/cache": "^5.1.4" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.155).", @@ -1087,8 +1087,8 @@ "predis/predis": "Required to use the predis connector (^1.1.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.1).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^5.1).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.1.4).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^5.1.4).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, @@ -1133,7 +1133,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-12-03T13:47:59+00:00" + "time": "2020-12-22T21:21:19+00:00" }, { "name": "laravel/tinker", @@ -1205,16 +1205,16 @@ }, { "name": "laravelcollective/html", - "version": "v6.2.0", + "version": "v6.2.1", "source": { "type": "git", "url": "https://github.com/LaravelCollective/html.git", - "reference": "3bb99be7502feb2129b375cd026ccb0fa4b66628" + "reference": "ae15b9c4bf918ec3a78f092b8555551dd693fde3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LaravelCollective/html/zipball/3bb99be7502feb2129b375cd026ccb0fa4b66628", - "reference": "3bb99be7502feb2129b375cd026ccb0fa4b66628", + "url": "https://api.github.com/repos/LaravelCollective/html/zipball/ae15b9c4bf918ec3a78f092b8555551dd693fde3", + "reference": "ae15b9c4bf918ec3a78f092b8555551dd693fde3", "shasum": "" }, "require": { @@ -1228,12 +1228,12 @@ "require-dev": { "illuminate/database": "^6.0|^7.0|^8.0", "mockery/mockery": "~1.0", - "phpunit/phpunit": "~7.1" + "phpunit/phpunit": "~8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.0-dev" + "dev-master": "6.x-dev" }, "laravel": { "providers": [ @@ -1273,7 +1273,7 @@ "issues": "https://github.com/LaravelCollective/html/issues", "source": "https://github.com/LaravelCollective/html" }, - "time": "2020-09-07T19:59:40+00:00" + "time": "2020-12-15T20:20:05+00:00" }, { "name": "league/commonmark", @@ -1473,24 +1473,23 @@ }, { "name": "league/iso3166", - "version": "2.1.5", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/thephpleague/iso3166.git", - "reference": "aed3b32fc293afdf2c6c6a322c2408eb5d20804a" + "reference": "9976d382f270ad3f3df8a68719beb7a7179ffa1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/iso3166/zipball/aed3b32fc293afdf2c6c6a322c2408eb5d20804a", - "reference": "aed3b32fc293afdf2c6c6a322c2408eb5d20804a", + "url": "https://api.github.com/repos/thephpleague/iso3166/zipball/9976d382f270ad3f3df8a68719beb7a7179ffa1e", + "reference": "9976d382f270ad3f3df8a68719beb7a7179ffa1e", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.3|^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.12", - "phpunit/phpunit": "^5.7.11 || ^6.0 || ^7.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { @@ -1527,7 +1526,7 @@ "issues": "https://github.com/thephpleague/iso3166/issues", "source": "https://github.com/thephpleague/iso3166" }, - "time": "2020-01-29T07:08:12+00:00" + "time": "2020-12-05T06:50:42+00:00" }, { "name": "league/mime-type-detection", @@ -1586,16 +1585,16 @@ }, { "name": "monolog/monolog", - "version": "2.1.1", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5" + "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9eee5cec93dfb313a38b6b288741e84e53f02d5", - "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084", "shasum": "" }, "require": { @@ -1608,16 +1607,17 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^6.0", + "elasticsearch/elasticsearch": "^7", "graylog2/gelf-php": "^1.4.2", + "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", - "php-parallel-lint/php-parallel-lint": "^1.0", "phpspec/prophecy": "^1.6.1", + "phpstan/phpstan": "^0.12.59", "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", - "ruflin/elastica": ">=0.90 <3.0", + "ruflin/elastica": ">=0.90 <7.0.1", "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { @@ -1637,7 +1637,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-main": "2.x-dev" } }, "autoload": { @@ -1653,11 +1653,11 @@ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "homepage": "https://seld.be" } ], "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", + "homepage": "https://github.com/Seldaek/monolog", "keywords": [ "log", "logging", @@ -1665,7 +1665,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.1.1" + "source": "https://github.com/Seldaek/monolog/tree/2.2.0" }, "funding": [ { @@ -1677,20 +1677,20 @@ "type": "tidelift" } ], - "time": "2020-07-23T08:41:23+00:00" + "time": "2020-12-14T13:15:25+00:00" }, { "name": "nesbot/carbon", - "version": "2.42.0", + "version": "2.43.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "d0463779663437392fe42ff339ebc0213bd55498" + "reference": "d32c57d8389113742f4a88725a170236470012e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d0463779663437392fe42ff339ebc0213bd55498", - "reference": "d0463779663437392fe42ff339ebc0213bd55498", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d32c57d8389113742f4a88725a170236470012e2", + "reference": "d32c57d8389113742f4a88725a170236470012e2", "shasum": "" }, "require": { @@ -1770,20 +1770,20 @@ "type": "tidelift" } ], - "time": "2020-11-28T14:25:28+00:00" + "time": "2020-12-17T20:55:32+00:00" }, { "name": "nikic/php-parser", - "version": "v4.10.2", + "version": "v4.10.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "658f1be311a230e0907f5dfe0213742aff0596de" + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/658f1be311a230e0907f5dfe0213742aff0596de", - "reference": "658f1be311a230e0907f5dfe0213742aff0596de", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", "shasum": "" }, "require": { @@ -1824,9 +1824,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" }, - "time": "2020-09-26T10:30:38+00:00" + "time": "2020-12-20T10:01:03+00:00" }, { "name": "opis/closure", @@ -2064,24 +2064,24 @@ }, { "name": "propaganistas/laravel-phone", - "version": "4.2.6", + "version": "4.2.7", "source": { "type": "git", "url": "https://github.com/Propaganistas/Laravel-Phone.git", - "reference": "b99ca1fe48884df39656990819b9faec4ec711ea" + "reference": "f2765e308977511c7ee42a48d635dca7026fa427" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/b99ca1fe48884df39656990819b9faec4ec711ea", - "reference": "b99ca1fe48884df39656990819b9faec4ec711ea", + "url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/f2765e308977511c7ee42a48d635dca7026fa427", + "reference": "f2765e308977511c7ee42a48d635dca7026fa427", "shasum": "" }, "require": { "giggsey/libphonenumber-for-php": "^7.0|^8.0", "illuminate/support": "^6.0|^7.0|^8.0", "illuminate/validation": "^6.0|^7.0|^8.0", - "league/iso3166": "^2.0", - "php": ">=7.1" + "league/iso3166": "^2.0|^3.0", + "php": "^7.1|^8.0" }, "require-dev": { "orchestra/testbench": "*", @@ -2123,9 +2123,9 @@ ], "support": { "issues": "https://github.com/Propaganistas/Laravel-Phone/issues", - "source": "https://github.com/Propaganistas/Laravel-Phone/tree/4.2.6" + "source": "https://github.com/Propaganistas/Laravel-Phone/tree/4.2.7" }, - "time": "2020-10-25T20:07:56+00:00" + "time": "2020-12-06T10:57:11+00:00" }, { "name": "psr/container", @@ -2386,16 +2386,16 @@ }, { "name": "psy/psysh", - "version": "v0.10.4", + "version": "v0.10.5", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560" + "reference": "7c710551d4a2653afa259c544508dc18a9098956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560", - "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/7c710551d4a2653afa259c544508dc18a9098956", + "reference": "7c710551d4a2653afa259c544508dc18a9098956", "shasum": "" }, "require": { @@ -2456,9 +2456,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/master" + "source": "https://github.com/bobthecow/psysh/tree/v0.10.5" }, - "time": "2020-05-03T19:32:03+00:00" + "time": "2020-12-04T02:51:30+00:00" }, { "name": "ralouphie/getallheaders", @@ -2671,32 +2671,31 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.3", + "version": "v6.2.4", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" + "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", + "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", "shasum": "" }, "require": { - "egulias/email-validator": "~2.0", + "egulias/email-validator": "^2.0", "php": ">=7.0.0", "symfony/polyfill-iconv": "^1.0", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + "mockery/mockery": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.0" }, "suggest": { - "ext-intl": "Needed to support internationalized email addresses", - "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" + "ext-intl": "Needed to support internationalized email addresses" }, "type": "library", "extra": { @@ -2731,22 +2730,32 @@ ], "support": { "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.3" + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.4" }, - "time": "2019-11-12T09:31:26+00:00" + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", + "type": "tidelift" + } + ], + "time": "2020-12-08T18:02:06+00:00" }, { "name": "symfony/console", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3e0564fb08d44a98bd5f1960204c958e57bd586b" + "reference": "47c02526c532fb381374dab26df05e7313978976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3e0564fb08d44a98bd5f1960204c958e57bd586b", - "reference": "3e0564fb08d44a98bd5f1960204c958e57bd586b", + "url": "https://api.github.com/repos/symfony/console/zipball/47c02526c532fb381374dab26df05e7313978976", + "reference": "47c02526c532fb381374dab26df05e7313978976", "shasum": "" }, "require": { @@ -2814,7 +2823,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.2.0" + "source": "https://github.com/symfony/console/tree/v5.2.1" }, "funding": [ { @@ -2830,20 +2839,20 @@ "type": "tidelift" } ], - "time": "2020-11-28T11:24:18+00:00" + "time": "2020-12-18T08:03:05+00:00" }, { "name": "symfony/css-selector", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256" + "reference": "f789e7ead4c79e04ca9a6d6162fc629c89bd8054" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256", - "reference": "b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/f789e7ead4c79e04ca9a6d6162fc629c89bd8054", + "reference": "f789e7ead4c79e04ca9a6d6162fc629c89bd8054", "shasum": "" }, "require": { @@ -2879,7 +2888,7 @@ "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.2.0" + "source": "https://github.com/symfony/css-selector/tree/v5.2.1" }, "funding": [ { @@ -2895,7 +2904,7 @@ "type": "tidelift" } ], - "time": "2020-10-28T21:31:18+00:00" + "time": "2020-12-08T17:02:38+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2966,16 +2975,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "289008c5be039e39908d33ae0a8ac99be1210bba" + "reference": "59b190ce16ddf32771a22087b60f6dafd3407147" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/289008c5be039e39908d33ae0a8ac99be1210bba", - "reference": "289008c5be039e39908d33ae0a8ac99be1210bba", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/59b190ce16ddf32771a22087b60f6dafd3407147", + "reference": "59b190ce16ddf32771a22087b60f6dafd3407147", "shasum": "" }, "require": { @@ -3015,7 +3024,7 @@ "description": "Symfony ErrorHandler Component", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.2.0" + "source": "https://github.com/symfony/error-handler/tree/v5.2.1" }, "funding": [ { @@ -3031,20 +3040,20 @@ "type": "tidelift" } ], - "time": "2020-10-28T21:46:03+00:00" + "time": "2020-12-09T18:54:12+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "aa13a09811e6d2ad43f8fb336bebdb7691d85d3c" + "reference": "1c93f7a1dff592c252574c79a8635a8a80856042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/aa13a09811e6d2ad43f8fb336bebdb7691d85d3c", - "reference": "aa13a09811e6d2ad43f8fb336bebdb7691d85d3c", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1c93f7a1dff592c252574c79a8635a8a80856042", + "reference": "1c93f7a1dff592c252574c79a8635a8a80856042", "shasum": "" }, "require": { @@ -3100,7 +3109,7 @@ "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.1" }, "funding": [ { @@ -3116,7 +3125,7 @@ "type": "tidelift" } ], - "time": "2020-11-01T16:14:45+00:00" + "time": "2020-12-18T08:03:05+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -3199,16 +3208,16 @@ }, { "name": "symfony/finder", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "fd8305521692f27eae3263895d1ef1571c71a78d" + "reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/fd8305521692f27eae3263895d1ef1571c71a78d", - "reference": "fd8305521692f27eae3263895d1ef1571c71a78d", + "url": "https://api.github.com/repos/symfony/finder/zipball/0b9231a5922fd7287ba5b411893c0ecd2733e5ba", + "reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba", "shasum": "" }, "require": { @@ -3240,7 +3249,7 @@ "description": "Symfony Finder Component", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.2.0" + "source": "https://github.com/symfony/finder/tree/v5.2.1" }, "funding": [ { @@ -3256,7 +3265,7 @@ "type": "tidelift" } ], - "time": "2020-11-18T09:42:36+00:00" + "time": "2020-12-08T17:02:38+00:00" }, { "name": "symfony/http-client-contracts", @@ -3339,16 +3348,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e4576271ee99123aa59a40564c7b5405f0ebd1e6" + "reference": "a1f6218b29897ab52acba58cfa905b83625bef8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e4576271ee99123aa59a40564c7b5405f0ebd1e6", - "reference": "e4576271ee99123aa59a40564c7b5405f0ebd1e6", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a1f6218b29897ab52acba58cfa905b83625bef8d", + "reference": "a1f6218b29897ab52acba58cfa905b83625bef8d", "shasum": "" }, "require": { @@ -3392,7 +3401,7 @@ "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.2.0" + "source": "https://github.com/symfony/http-foundation/tree/v5.2.1" }, "funding": [ { @@ -3408,20 +3417,20 @@ "type": "tidelift" } ], - "time": "2020-11-27T06:13:25+00:00" + "time": "2020-12-18T10:00:10+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "38907e5ccb2d9d371191a946734afc83c7a03160" + "reference": "1feb619286d819180f7b8bc0dc44f516d9c62647" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/38907e5ccb2d9d371191a946734afc83c7a03160", - "reference": "38907e5ccb2d9d371191a946734afc83c7a03160", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1feb619286d819180f7b8bc0dc44f516d9c62647", + "reference": "1feb619286d819180f7b8bc0dc44f516d9c62647", "shasum": "" }, "require": { @@ -3504,7 +3513,7 @@ "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.2.0" + "source": "https://github.com/symfony/http-kernel/tree/v5.2.1" }, "funding": [ { @@ -3520,20 +3529,20 @@ "type": "tidelift" } ], - "time": "2020-11-30T05:54:18+00:00" + "time": "2020-12-18T13:49:39+00:00" }, { "name": "symfony/mime", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "05f667e8fa029568964fd3bec6bc17765b853cc5" + "reference": "de97005aef7426ba008c46ba840fc301df577ada" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/05f667e8fa029568964fd3bec6bc17765b853cc5", - "reference": "05f667e8fa029568964fd3bec6bc17765b853cc5", + "url": "https://api.github.com/repos/symfony/mime/zipball/de97005aef7426ba008c46ba840fc301df577ada", + "reference": "de97005aef7426ba008c46ba840fc301df577ada", "shasum": "" }, "require": { @@ -3584,7 +3593,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.2.0" + "source": "https://github.com/symfony/mime/tree/v5.2.1" }, "funding": [ { @@ -3600,7 +3609,7 @@ "type": "tidelift" } ], - "time": "2020-10-30T14:55:39+00:00" + "time": "2020-12-09T18:54:12+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4333,16 +4342,16 @@ }, { "name": "symfony/process", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "240e74140d4d956265048f3025c0aecbbc302d54" + "reference": "bd8815b8b6705298beaa384f04fabd459c10bedd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/240e74140d4d956265048f3025c0aecbbc302d54", - "reference": "240e74140d4d956265048f3025c0aecbbc302d54", + "url": "https://api.github.com/repos/symfony/process/zipball/bd8815b8b6705298beaa384f04fabd459c10bedd", + "reference": "bd8815b8b6705298beaa384f04fabd459c10bedd", "shasum": "" }, "require": { @@ -4375,7 +4384,7 @@ "description": "Symfony Process Component", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.2.0" + "source": "https://github.com/symfony/process/tree/v5.2.1" }, "funding": [ { @@ -4391,20 +4400,20 @@ "type": "tidelift" } ], - "time": "2020-11-02T15:47:15+00:00" + "time": "2020-12-08T17:03:37+00:00" }, { "name": "symfony/routing", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "130ac5175ad2fd417978baebd8062e2e6b2bc28b" + "reference": "934ac2720dcc878a47a45c986b483a7ee7193620" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/130ac5175ad2fd417978baebd8062e2e6b2bc28b", - "reference": "130ac5175ad2fd417978baebd8062e2e6b2bc28b", + "url": "https://api.github.com/repos/symfony/routing/zipball/934ac2720dcc878a47a45c986b483a7ee7193620", + "reference": "934ac2720dcc878a47a45c986b483a7ee7193620", "shasum": "" }, "require": { @@ -4465,7 +4474,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.2.0" + "source": "https://github.com/symfony/routing/tree/v5.2.1" }, "funding": [ { @@ -4481,7 +4490,7 @@ "type": "tidelift" } ], - "time": "2020-11-27T00:39:34+00:00" + "time": "2020-12-08T17:03:37+00:00" }, { "name": "symfony/service-contracts", @@ -4564,16 +4573,16 @@ }, { "name": "symfony/string", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "40e975edadd4e32cd16f3753b3bad65d9ac48242" + "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/40e975edadd4e32cd16f3753b3bad65d9ac48242", - "reference": "40e975edadd4e32cd16f3753b3bad65d9ac48242", + "url": "https://api.github.com/repos/symfony/string/zipball/5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", + "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", "shasum": "" }, "require": { @@ -4627,7 +4636,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.0" + "source": "https://github.com/symfony/string/tree/v5.2.1" }, "funding": [ { @@ -4643,20 +4652,20 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:08:07+00:00" + "time": "2020-12-05T07:33:16+00:00" }, { "name": "symfony/translation", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "52f486a707510884450df461b5a6429dd7a67379" + "reference": "a04209ba0d1391c828e5b2373181dac63c52ee70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/52f486a707510884450df461b5a6429dd7a67379", - "reference": "52f486a707510884450df461b5a6429dd7a67379", + "url": "https://api.github.com/repos/symfony/translation/zipball/a04209ba0d1391c828e5b2373181dac63c52ee70", + "reference": "a04209ba0d1391c828e5b2373181dac63c52ee70", "shasum": "" }, "require": { @@ -4720,7 +4729,7 @@ "description": "Symfony Translation Component", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.2.0" + "source": "https://github.com/symfony/translation/tree/v5.2.1" }, "funding": [ { @@ -4736,7 +4745,7 @@ "type": "tidelift" } ], - "time": "2020-11-28T11:24:18+00:00" + "time": "2020-12-08T17:03:37+00:00" }, { "name": "symfony/translation-contracts", @@ -4818,16 +4827,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "173a79c462b1c81e1fa26129f71e41333d846b26" + "reference": "13e7e882eaa55863faa7c4ad7c60f12f1a8b5089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/173a79c462b1c81e1fa26129f71e41333d846b26", - "reference": "173a79c462b1c81e1fa26129f71e41333d846b26", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/13e7e882eaa55863faa7c4ad7c60f12f1a8b5089", + "reference": "13e7e882eaa55863faa7c4ad7c60f12f1a8b5089", "shasum": "" }, "require": { @@ -4886,7 +4895,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.2.0" + "source": "https://github.com/symfony/var-dumper/tree/v5.2.1" }, "funding": [ { @@ -4902,7 +4911,7 @@ "type": "tidelift" } ], - "time": "2020-11-27T00:39:34+00:00" + "time": "2020-12-16T17:02:19+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5302,16 +5311,16 @@ }, { "name": "facade/ignition", - "version": "2.5.2", + "version": "2.5.8", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "08668034beb185fa2ac6f09b1034eaa440952ace" + "reference": "8e907d81244649c5ea746e2ec30c32c5f59df472" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/08668034beb185fa2ac6f09b1034eaa440952ace", - "reference": "08668034beb185fa2ac6f09b1034eaa440952ace", + "url": "https://api.github.com/repos/facade/ignition/zipball/8e907d81244649c5ea746e2ec30c32c5f59df472", + "reference": "8e907d81244649c5ea746e2ec30c32c5f59df472", "shasum": "" }, "require": { @@ -5375,7 +5384,7 @@ "issues": "https://github.com/facade/ignition/issues", "source": "https://github.com/facade/ignition" }, - "time": "2020-11-17T09:18:51+00:00" + "time": "2020-12-29T09:12:55+00:00" }, { "name": "facade/ignition-contracts", @@ -5497,16 +5506,16 @@ }, { "name": "fzaninotto/faker", - "version": "v1.9.1", + "version": "v1.9.2", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f" + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f", - "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", "shasum": "" }, "require": { @@ -5545,10 +5554,10 @@ ], "support": { "issues": "https://github.com/fzaninotto/Faker/issues", - "source": "https://github.com/fzaninotto/Faker/tree/v1.9.1" + "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" }, "abandoned": true, - "time": "2019-12-12T13:22:17+00:00" + "time": "2020-12-11T09:56:16+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -5881,16 +5890,16 @@ }, { "name": "phar-io/version", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "726c026815142e4f8677b7cb7f2249c9ffb7ecae" + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/726c026815142e4f8677b7cb7f2249c9ffb7ecae", - "reference": "726c026815142e4f8677b7cb7f2249c9ffb7ecae", + "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", "shasum": "" }, "require": { @@ -5926,9 +5935,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.0.3" + "source": "https://github.com/phar-io/version/tree/3.0.4" }, - "time": "2020-11-30T09:21:21+00:00" + "time": "2020-12-13T23:18:30+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -6090,16 +6099,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.12.1", + "version": "1.12.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" + "reference": "245710e971a030f42e08f4912863805570f23d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", + "reference": "245710e971a030f42e08f4912863805570f23d39", "shasum": "" }, "require": { @@ -6111,7 +6120,7 @@ }, "require-dev": { "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0 <9.3" + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { @@ -6151,9 +6160,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.12.1" + "source": "https://github.com/phpspec/prophecy/tree/1.12.2" }, - "time": "2020-09-29T09:10:42+00:00" + "time": "2020-12-19T10:15:11+00:00" }, { "name": "phpunit/php-code-coverage", @@ -6475,16 +6484,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.4.4", + "version": "9.5.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6535e637961f0829832621dc1b7308c2d24a799e" + "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6535e637961f0829832621dc1b7308c2d24a799e", - "reference": "6535e637961f0829832621dc1b7308c2d24a799e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e16c225d57c3d6808014df6b1dd7598d0a5bbbe", + "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe", "shasum": "" }, "require": { @@ -6500,7 +6509,7 @@ "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2", + "phpunit/php-code-coverage": "^9.2.3", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -6531,7 +6540,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.4-dev" + "dev-master": "9.5-dev" } }, "autoload": { @@ -6562,7 +6571,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.4.4" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.0" }, "funding": [ { @@ -6574,7 +6583,7 @@ "type": "github" } ], - "time": "2020-12-01T04:58:47+00:00" + "time": "2020-12-04T05:05:53+00:00" }, { "name": "sebastian/cli-parser", diff --git a/flexiapi/config/app.php b/flexiapi/config/app.php index 783dd2b..94acec6 100644 --- a/flexiapi/config/app.php +++ b/flexiapi/config/app.php @@ -24,6 +24,13 @@ return [ 'proxy_registrar_address' => env('ACCOUNT_PROXY_REGISTRAR_ADDRESS', 'sip.domain.com'), 'transport_protocol_text' => env('ACCOUNT_TRANSPORT_PROTOCOL_TEXT', 'TLS (recommended), TCP or UDP'), + /** + * Allow any accounts to request the API as an administrator + * This parameter is only the for debug purpose or running the tests + * DO NOT ENABLE IT IN PRODUCTION + */ + 'everyone_is_admin' => env('APP_EVERYONE_IS_ADMIN', false), + /* |-------------------------------------------------------------------------- | Application Environment diff --git a/flexiapi/resources/views/mails/changing_email.blade.php b/flexiapi/resources/views/mails/changing_email.blade.php index e93db46..021a6de 100644 --- a/flexiapi/resources/views/mails/changing_email.blade.php +++ b/flexiapi/resources/views/mails/changing_email.blade.php @@ -5,7 +5,7 @@

Hello,

- You requested to change your email address from {{ $account->email }} to {{ $account->emailChanged->email }} on {{ config('app.name') }}. + You requested to change your email address from {{ $account->email }} to {{ $account->emailChanged->new_email }} on {{ config('app.name') }}.

To confirm this change please click on the following link: diff --git a/flexiapi/resources/views/mails/changing_email_text.blade.php b/flexiapi/resources/views/mails/changing_email_text.blade.php index 89457e0..5b9c046 100644 --- a/flexiapi/resources/views/mails/changing_email_text.blade.php +++ b/flexiapi/resources/views/mails/changing_email_text.blade.php @@ -1,6 +1,6 @@ Hello, -You requested to change your email address from {{ $account->email }} to {{ $account->emailChanged->email }} on {{ config('app.name') }}. +You requested to change your email address from {{ $account->email }} to {{ $account->emailChanged->new_email }} on {{ config('app.name') }}. To confirm this change please click on the following link: {{ route('account.email.request_update', $account->emailChanged->hash) }}. diff --git a/flexiapi/routes/api.php b/flexiapi/routes/api.php index 335028b..12d9286 100644 --- a/flexiapi/routes/api.php +++ b/flexiapi/routes/api.php @@ -25,8 +25,9 @@ Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); }); +Route::get('ping', 'Api\PingController@ping'); + Route::group(['middleware' => ['auth.digest_or_key']], function () { - Route::get('ping', 'Api\PingController@ping'); Route::get('devices', 'Api\DeviceController@index'); Route::delete('devices/{uuid}', 'Api\DeviceController@destroy'); diff --git a/flexiapi/tests/Feature/AccountApiTest.php b/flexiapi/tests/Feature/AccountApiTest.php index bcecb31..76df2cf 100644 --- a/flexiapi/tests/Feature/AccountApiTest.php +++ b/flexiapi/tests/Feature/AccountApiTest.php @@ -51,6 +51,15 @@ class AccountApiTest extends TestCase ->json($this->method, $this->route); $response1->assertStatus(403); + + config()->set('app.everyone_is_admin', true); + + $password = Password::factory()->create(); + $response0 = $this->generateFirstResponse($password); + $response1 = $this->generateSecondResponse($password, $response0) + ->json($this->method, $this->route); + + $response1->assertStatus(422); } public function testAdminOk() diff --git a/flexiapi/tests/Feature/AuthenticateDigestAndKeyTest.php b/flexiapi/tests/Feature/AuthenticateDigestAndKeyTest.php index 82b9271..6f6200a 100644 --- a/flexiapi/tests/Feature/AuthenticateDigestAndKeyTest.php +++ b/flexiapi/tests/Feature/AuthenticateDigestAndKeyTest.php @@ -29,7 +29,7 @@ class AuthenticateDigestAndKeyTest extends TestCase { use RefreshDatabase; - protected $route = '/api/ping'; + protected $route = '/api/accounts/me'; protected $method = 'GET'; public function testMandatoryFrom() diff --git a/flexiapi/tests/TestCase.php b/flexiapi/tests/TestCase.php index 5338a51..51fdf41 100644 --- a/flexiapi/tests/TestCase.php +++ b/flexiapi/tests/TestCase.php @@ -77,7 +77,7 @@ abstract class TestCase extends BaseTestCase $digest = \sprintf( 'username="%s",realm="%s",nonce="%s",nc=%s,cnonce="%s",uri="%s",qop=%s,response="%s",opaque="%s",algorithm=%s', - $password->account->identifier, + \strstr($password->account->identifier, '@', true), $extractedChallenge['realm'], $extractedChallenge['nonce'], $nc, diff --git a/flexisip-account-manager.spec b/flexisip-account-manager.spec index a81e78d..7fae08f 100644 --- a/flexisip-account-manager.spec +++ b/flexisip-account-manager.spec @@ -8,7 +8,7 @@ #%define _datadir %{_datarootdir} #%define _docdir %{_datadir}/doc -%define build_number 38 +%define build_number 39 %define var_dir /var/opt/belledonne-communications %define opt_dir /opt/belledonne-communications/share/flexisip-account-manager %define env_file "$RPM_BUILD_ROOT/etc/flexisip-account-manager/flexiapi.env"