Merge branch 'release/1.4'

This commit is contained in:
Timothée Jaussoin 2023-11-30 17:17:11 +01:00
commit 3e23ebcc70
6 changed files with 70 additions and 56 deletions

View file

@ -74,7 +74,7 @@ deb-only:
fakeroot alien -g -k --scripts $(OUTPUT_DIR)/rpmbuild/tmp.rpm
rm -r $(OUTPUT_DIR)/rpmbuild
rm -rf $(OUTPUT_DIR)/*.orig
sed -i 's/Depends:.*/Depends: $${shlibs:Depends}, php (>= 8.0), php-xml, php-pdo, php-gd, php-redis, php-mysql, php-mbstring, php-sqlite3/g' $(OUTPUT_DIR)/bc-flexisip-account-manager*/debian/control
sed -i 's/Depends:.*/Depends: $${shlibs:Depends}, php (>= 8.2), php8.2-xml, php8.2-pdo, php8.2-gd, php8.2-redis, php8.2-mysql, php8.2-mbstring, php8.2-sqlite3/g' $(OUTPUT_DIR)/bc-flexisip-account-manager*/debian/control
cd `ls -rt $(OUTPUT_DIR) | tail -1` && dpkg-buildpackage --no-sign
@echo "📦✅ DEB Package Created"

View file

@ -30,6 +30,7 @@ ACCOUNT_USERNAME_REGEX="^[a-z0-9+_.-]*$"
# Account provisioning
ACCOUNT_PROVISIONING_RC_FILE=
ACCOUNT_PROVISIONING_OVERWRITE_ALL=
ACCOUNT_PROVISIONING_USE_X_LINPHONE_PROVISIONING_HEADER=true
# Instance specific parameters
INSTANCE_COPYRIGHT= # Simple text displayed in the page footer

View file

@ -124,7 +124,8 @@ class ProvisioningController extends Controller
private function generateProvisioning(Request $request, Account $account = null)
{
if (!$request->hasHeader('x-linphone-provisioning')) {
if (!$request->hasHeader('x-linphone-provisioning')
&& config('app.provisioning_use_x_linphone_provisioning_header')) {
abort(400, 'x-linphone-provisioning header is missing');
}

109
flexiapi/composer.lock generated
View file

@ -461,16 +461,16 @@
},
{
"name": "doctrine/dbal",
"version": "3.7.1",
"version": "3.7.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "5b7bd66c9ff58c04c5474ab85edce442f8081cb2"
"reference": "0ac3c270590e54910715e9a1a044cc368df282b2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/5b7bd66c9ff58c04c5474ab85edce442f8081cb2",
"reference": "5b7bd66c9ff58c04c5474ab85edce442f8081cb2",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/0ac3c270590e54910715e9a1a044cc368df282b2",
"reference": "0ac3c270590e54910715e9a1a044cc368df282b2",
"shasum": ""
},
"require": {
@ -486,7 +486,7 @@
"doctrine/coding-standard": "12.0.0",
"fig/log-test": "^1",
"jetbrains/phpstorm-stubs": "2023.1",
"phpstan/phpstan": "1.10.35",
"phpstan/phpstan": "1.10.42",
"phpstan/phpstan-strict-rules": "^1.5",
"phpunit/phpunit": "9.6.13",
"psalm/plugin-phpunit": "0.18.4",
@ -554,7 +554,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/3.7.1"
"source": "https://github.com/doctrine/dbal/tree/3.7.2"
},
"funding": [
{
@ -570,7 +570,7 @@
"type": "tidelift"
}
],
"time": "2023-10-06T05:06:20+00:00"
"time": "2023-11-19T08:06:58+00:00"
},
{
"name": "doctrine/deprecations",
@ -2056,16 +2056,16 @@
},
{
"name": "laravel/serializable-closure",
"version": "v1.3.2",
"version": "v1.3.3",
"source": {
"type": "git",
"url": "https://github.com/laravel/serializable-closure.git",
"reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c"
"reference": "3dbf8a8e914634c48d389c1234552666b3d43754"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/076fe2cf128bd54b4341cdc6d49b95b34e101e4c",
"reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754",
"reference": "3dbf8a8e914634c48d389c1234552666b3d43754",
"shasum": ""
},
"require": {
@ -2112,7 +2112,7 @@
"issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure"
},
"time": "2023-10-17T13:38:16+00:00"
"time": "2023-11-08T14:08:06+00:00"
},
{
"name": "league/commonmark",
@ -2304,16 +2304,16 @@
},
{
"name": "league/flysystem",
"version": "3.19.0",
"version": "3.21.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "1b2aa10f2326e0351399b8ce68e287d8e9209a83"
"reference": "a326d8a2d007e4ca327a57470846e34363789258"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1b2aa10f2326e0351399b8ce68e287d8e9209a83",
"reference": "1b2aa10f2326e0351399b8ce68e287d8e9209a83",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a326d8a2d007e4ca327a57470846e34363789258",
"reference": "a326d8a2d007e4ca327a57470846e34363789258",
"shasum": ""
},
"require": {
@ -2378,7 +2378,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem/issues",
"source": "https://github.com/thephpleague/flysystem/tree/3.19.0"
"source": "https://github.com/thephpleague/flysystem/tree/3.21.0"
},
"funding": [
{
@ -2390,20 +2390,20 @@
"type": "github"
}
],
"time": "2023-11-07T09:04:28+00:00"
"time": "2023-11-18T13:59:15+00:00"
},
{
"name": "league/flysystem-local",
"version": "3.19.0",
"version": "3.21.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem-local.git",
"reference": "8d868217f9eeb4e9a7320db5ccad825e9a7a4076"
"reference": "470eb1c09eaabd49ebd908ae06f23983ba3ecfe7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/8d868217f9eeb4e9a7320db5ccad825e9a7a4076",
"reference": "8d868217f9eeb4e9a7320db5ccad825e9a7a4076",
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/470eb1c09eaabd49ebd908ae06f23983ba3ecfe7",
"reference": "470eb1c09eaabd49ebd908ae06f23983ba3ecfe7",
"shasum": ""
},
"require": {
@ -2438,7 +2438,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem-local/issues",
"source": "https://github.com/thephpleague/flysystem-local/tree/3.19.0"
"source": "https://github.com/thephpleague/flysystem-local/tree/3.21.0"
},
"funding": [
{
@ -2450,7 +2450,7 @@
"type": "github"
}
],
"time": "2023-11-06T20:35:28+00:00"
"time": "2023-11-18T13:41:42+00:00"
},
{
"name": "league/mime-type-detection",
@ -4606,16 +4606,16 @@
},
{
"name": "react/dns",
"version": "v1.11.0",
"version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/reactphp/dns.git",
"reference": "3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f"
"reference": "c134600642fa615b46b41237ef243daa65bb64ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/reactphp/dns/zipball/3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f",
"reference": "3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f",
"url": "https://api.github.com/repos/reactphp/dns/zipball/c134600642fa615b46b41237ef243daa65bb64ec",
"reference": "c134600642fa615b46b41237ef243daa65bb64ec",
"shasum": ""
},
"require": {
@ -4625,7 +4625,7 @@
"react/promise": "^3.0 || ^2.7 || ^1.2.1"
},
"require-dev": {
"phpunit/phpunit": "^9.5 || ^4.8.35",
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
"react/async": "^4 || ^3 || ^2",
"react/promise-timer": "^1.9"
},
@ -4670,7 +4670,7 @@
],
"support": {
"issues": "https://github.com/reactphp/dns/issues",
"source": "https://github.com/reactphp/dns/tree/v1.11.0"
"source": "https://github.com/reactphp/dns/tree/v1.12.0"
},
"funding": [
{
@ -4678,7 +4678,7 @@
"type": "open_collective"
}
],
"time": "2023-06-02T12:45:26+00:00"
"time": "2023-11-29T12:41:06+00:00"
},
{
"name": "react/event-loop",
@ -4754,24 +4754,24 @@
},
{
"name": "react/promise",
"version": "v3.0.0",
"version": "v3.1.0",
"source": {
"type": "git",
"url": "https://github.com/reactphp/promise.git",
"reference": "c86753c76fd3be465d93b308f18d189f01a22be4"
"reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/reactphp/promise/zipball/c86753c76fd3be465d93b308f18d189f01a22be4",
"reference": "c86753c76fd3be465d93b308f18d189f01a22be4",
"url": "https://api.github.com/repos/reactphp/promise/zipball/e563d55d1641de1dea9f5e84f3cccc66d2bfe02c",
"reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c",
"shasum": ""
},
"require": {
"php": ">=7.1.0"
},
"require-dev": {
"phpstan/phpstan": "1.10.20 || 1.4.10",
"phpunit/phpunit": "^9.5 || ^7.5"
"phpstan/phpstan": "1.10.39 || 1.4.10",
"phpunit/phpunit": "^9.6 || ^7.5"
},
"type": "library",
"autoload": {
@ -4815,7 +4815,7 @@
],
"support": {
"issues": "https://github.com/reactphp/promise/issues",
"source": "https://github.com/reactphp/promise/tree/v3.0.0"
"source": "https://github.com/reactphp/promise/tree/v3.1.0"
},
"funding": [
{
@ -4823,7 +4823,7 @@
"type": "open_collective"
}
],
"time": "2023-07-11T16:12:49+00:00"
"time": "2023-11-16T16:21:57+00:00"
},
{
"name": "react/socket",
@ -8319,16 +8319,16 @@
},
{
"name": "theseer/tokenizer",
"version": "1.2.1",
"version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
"reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
"reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
"shasum": ""
},
"require": {
@ -8357,7 +8357,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/1.2.1"
"source": "https://github.com/theseer/tokenizer/tree/1.2.2"
},
"funding": [
{
@ -8365,7 +8365,7 @@
"type": "github"
}
],
"time": "2021-07-28T10:34:58+00:00"
"time": "2023-11-20T00:12:19+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
@ -9222,23 +9222,24 @@
},
{
"name": "pdepend/pdepend",
"version": "2.15.1",
"version": "2.16.0",
"source": {
"type": "git",
"url": "https://github.com/pdepend/pdepend.git",
"reference": "d12f25bcdfb7754bea458a4a5cb159d55e9950d0"
"reference": "8dfc0c46529e2073fa97986552f80646eedac562"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pdepend/pdepend/zipball/d12f25bcdfb7754bea458a4a5cb159d55e9950d0",
"reference": "d12f25bcdfb7754bea458a4a5cb159d55e9950d0",
"url": "https://api.github.com/repos/pdepend/pdepend/zipball/8dfc0c46529e2073fa97986552f80646eedac562",
"reference": "8dfc0c46529e2073fa97986552f80646eedac562",
"shasum": ""
},
"require": {
"php": ">=5.3.7",
"symfony/config": "^2.3.0|^3|^4|^5|^6.0",
"symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0",
"symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0"
"symfony/config": "^2.3.0|^3|^4|^5|^6.0|^7.0",
"symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0|^7.0",
"symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0|^7.0",
"symfony/polyfill-mbstring": "^1.19"
},
"require-dev": {
"easy-doc/easy-doc": "0.0.0|^1.2.3",
@ -9273,7 +9274,7 @@
],
"support": {
"issues": "https://github.com/pdepend/pdepend/issues",
"source": "https://github.com/pdepend/pdepend/tree/2.15.1"
"source": "https://github.com/pdepend/pdepend/tree/2.16.0"
},
"funding": [
{
@ -9281,7 +9282,7 @@
"type": "tidelift"
}
],
"time": "2023-09-28T12:00:56+00:00"
"time": "2023-11-29T08:52:35+00:00"
},
{
"name": "phpmd/phpmd",

View file

@ -55,6 +55,7 @@ return [
*/
'provisioning_rc_file' => env('ACCOUNT_PROVISIONING_RC_FILE', ''),
'provisioning_overwrite_all' => env('ACCOUNT_PROVISIONING_OVERWRITE_ALL', false),
'provisioning_use_x_linphone_provisioning_header' => env('ACCOUNT_PROVISIONING_USE_X_LINPHONE_PROVISIONING_HEADER', true),
/**
* Set a global realm for all the accounts, if not set, the account domain

View file

@ -51,6 +51,16 @@ class AccountProvisioningTest extends TestCase
->assertDontSee('ha1');
}
public function testDisabledProvisioningHeader()
{
config()->set('app.provisioning_use_x_linphone_provisioning_header', false);
$this->get($this->route)
->assertStatus(200)
->assertHeader('Content-Type', 'application/xml')
->assertDontSee('ha1');
}
public function testXLinphoneProvisioningHeader()
{
$this->withHeaders([