diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 3a8c3cca18..8a4090727b 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -23,7 +23,7 @@ jobs: fetch-depth: 0 - name: Lint Code Base - uses: super-linter/super-linter/slim@v6 + uses: super-linter/super-linter/slim@v7 env: # To report GitHub Actions status checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -272,3 +272,17 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true verbose: true + + cleanup: + name: Cleanup artifacts + needs: [unit-tests-linux, coverage] + runs-on: [ubuntu-latest] + if: | + always() && + needs.coverage.result == 'success' || + (needs.unit-tests-linux.result == 'success' && needs.coverage.result == 'skipped') + + steps: + - uses: geekyeggo/delete-artifact@v5 + with: + name: coverage-data diff --git a/bin/convertTranslations.php b/bin/convertTranslations.php index 87743e20ff..4c33d864ab 100755 --- a/bin/convertTranslations.php +++ b/bin/convertTranslations.php @@ -120,7 +120,7 @@ function dissectFile(array $fileInputRaw): array STDERR, "Merging (for nullify) " . count($sourcePairs) . " entries from source language (destination language has " . - count($destPairs) . " already.\n" + count($destPairs) . " already.\n", ); $outputPairs = mergeWithSource($sourcePairs, $destPairs); foreach ($outputPairs as $key => $value) { @@ -132,7 +132,7 @@ function dissectFile(array $fileInputRaw): array STDERR, "Merging " . count($sourcePairs) . " entries from source language (destination language has " . - count($destPairs) . " already.\n" + count($destPairs) . " already.\n", ); $outputPairs = mergeWithSource($sourcePairs, $destPairs); break; @@ -141,7 +141,7 @@ function dissectFile(array $fileInputRaw): array STDERR, "Codifying " . count($sourcePairs) . " entries from destination language (pool has " . - count($destPairs) . " candidates).\n" + count($destPairs) . " candidates).\n", ); $outputPairs = codifyWithSource($sourcePairs, $destPairs); break; diff --git a/bin/translateAttributes.php b/bin/translateAttributes.php index fadd4efa42..b559fe190d 100755 --- a/bin/translateAttributes.php +++ b/bin/translateAttributes.php @@ -61,7 +61,7 @@ [ 'en' => $defs['attribute_' . $lower]['en'], ], - $trans['attribute_' . $lower] + $trans['attribute_' . $lower], ), ]; } diff --git a/composer.json b/composer.json index 520fea0e36..9b2fafa715 100644 --- a/composer.json +++ b/composer.json @@ -114,7 +114,9 @@ "composer/package-versions-deprecated": true, "simplesamlphp/composer-module-installer": true, "muglug/package-versions-56": true, - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "simplesamlphp/composer-xmlprovider-installer": true, + "phpstan/extension-installer": true } }, "extra": { @@ -133,5 +135,5 @@ "php bin/translations translations:update:binary" ] }, - "version": "v2.1.6" + "version": "v2.1.7" } diff --git a/composer.lock b/composer.lock index ce879f1c88..fc3e86786d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6cef0a79f97da63559e49810870d7dde", + "content-hash": "ebb10c29c4d82d08d8d26b8cc65c37b8", "packages": [ { "name": "gettext/gettext", - "version": "v5.7.0", + "version": "v5.7.3", "source": { "type": "git", "url": "https://github.com/php-gettext/Gettext.git", - "reference": "8657e580747bb3baacccdcebe69cac094661e404" + "reference": "95820f020e4f2f05e0bbaa5603e4c6ec3edc50f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/8657e580747bb3baacccdcebe69cac094661e404", - "reference": "8657e580747bb3baacccdcebe69cac094661e404", + "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/95820f020e4f2f05e0bbaa5603e4c6ec3edc50f1", + "reference": "95820f020e4f2f05e0bbaa5603e4c6ec3edc50f1", "shasum": "" }, "require": { @@ -62,7 +62,7 @@ "support": { "email": "oom@oscarotero.com", "issues": "https://github.com/php-gettext/Gettext/issues", - "source": "https://github.com/php-gettext/Gettext/tree/v5.7.0" + "source": "https://github.com/php-gettext/Gettext/tree/v5.7.3" }, "funding": [ { @@ -78,7 +78,7 @@ "type": "patreon" } ], - "time": "2022-07-27T19:54:55+00:00" + "time": "2024-12-01T10:18:08+00:00" }, { "name": "gettext/languages", @@ -230,16 +230,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.9.1", + "version": "v6.9.3", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "039de174cd9c17a8389754d3b877a2ed22743e18" + "reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", - "reference": "039de174cd9c17a8389754d3b877a2ed22743e18", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2f5c94fe7493efc213f643c23b1b1c249d40f47e", + "reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e", "shasum": "" }, "require": { @@ -299,7 +299,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.3" }, "funding": [ { @@ -307,7 +307,7 @@ "type": "github" } ], - "time": "2023-11-25T22:23:28+00:00" + "time": "2024-11-24T18:04:13+00:00" }, { "name": "psr/cache", @@ -463,16 +463,16 @@ }, { "name": "psr/log", - "version": "3.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { @@ -507,22 +507,22 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "robrichards/xmlseclibs", - "version": "3.1.1", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/robrichards/xmlseclibs.git", - "reference": "f8f19e58f26cdb42c54b214ff8a820760292f8df" + "reference": "2bdfd742624d739dfadbd415f00181b4a77aaf07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/robrichards/xmlseclibs/zipball/f8f19e58f26cdb42c54b214ff8a820760292f8df", - "reference": "f8f19e58f26cdb42c54b214ff8a820760292f8df", + "url": "https://api.github.com/repos/robrichards/xmlseclibs/zipball/2bdfd742624d739dfadbd415f00181b4a77aaf07", + "reference": "2bdfd742624d739dfadbd415f00181b4a77aaf07", "shasum": "" }, "require": { @@ -549,9 +549,9 @@ ], "support": { "issues": "https://github.com/robrichards/xmlseclibs/issues", - "source": "https://github.com/robrichards/xmlseclibs/tree/3.1.1" + "source": "https://github.com/robrichards/xmlseclibs/tree/3.1.3" }, - "time": "2020-09-05T13:00:25+00:00" + "time": "2024-11-20T21:13:56+00:00" }, { "name": "simplesamlphp/assert", @@ -612,16 +612,16 @@ }, { "name": "simplesamlphp/composer-module-installer", - "version": "v1.3.4", + "version": "v1.3.5", "source": { "type": "git", "url": "https://github.com/simplesamlphp/composer-module-installer.git", - "reference": "36508ed9580a30c4d5ab0bb3c25c00d0b5d42946" + "reference": "7bf413c2d28e48dff6755d74a7e45087cf144604" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/simplesamlphp/composer-module-installer/zipball/36508ed9580a30c4d5ab0bb3c25c00d0b5d42946", - "reference": "36508ed9580a30c4d5ab0bb3c25c00d0b5d42946", + "url": "https://api.github.com/repos/simplesamlphp/composer-module-installer/zipball/7bf413c2d28e48dff6755d74a7e45087cf144604", + "reference": "7bf413c2d28e48dff6755d74a7e45087cf144604", "shasum": "" }, "require": { @@ -649,22 +649,22 @@ "description": "A Composer plugin that allows installing SimpleSAMLphp modules through Composer.", "support": { "issues": "https://github.com/simplesamlphp/composer-module-installer/issues", - "source": "https://github.com/simplesamlphp/composer-module-installer/tree/v1.3.4" + "source": "https://github.com/simplesamlphp/composer-module-installer/tree/v1.3.5" }, - "time": "2023-03-08T20:58:22+00:00" + "time": "2024-11-16T09:42:27+00:00" }, { "name": "simplesamlphp/saml2", - "version": "v4.6.12", + "version": "v4.16.14", "source": { "type": "git", "url": "https://github.com/simplesamlphp/saml2.git", - "reference": "9545abd0d9d48388f2fa00469c5c1e0294f0303e" + "reference": "fe6c7bdda5e166e326d19d78f230d959ab51d01d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/simplesamlphp/saml2/zipball/9545abd0d9d48388f2fa00469c5c1e0294f0303e", - "reference": "9545abd0d9d48388f2fa00469c5c1e0294f0303e", + "url": "https://api.github.com/repos/simplesamlphp/saml2/zipball/fe6c7bdda5e166e326d19d78f230d959ab51d01d", + "reference": "fe6c7bdda5e166e326d19d78f230d959ab51d01d", "shasum": "" }, "require": { @@ -676,6 +676,9 @@ "robrichards/xmlseclibs": "^3.1.1", "webmozart/assert": "^1.9" }, + "conflict": { + "robrichards/xmlseclibs": "3.1.2" + }, "require-dev": { "mockery/mockery": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", @@ -707,22 +710,22 @@ "description": "SAML2 PHP library from SimpleSAMLphp", "support": { "issues": "https://github.com/simplesamlphp/saml2/issues", - "source": "https://github.com/simplesamlphp/saml2/tree/v4.6.12" + "source": "https://github.com/simplesamlphp/saml2/tree/v4.16.14" }, - "time": "2024-04-25T14:10:08+00:00" + "time": "2024-12-01T22:26:30+00:00" }, { "name": "simplesamlphp/simplesamlphp-assets-base", - "version": "v2.1.13", + "version": "v2.1.19", "source": { "type": "git", "url": "https://github.com/simplesamlphp/simplesamlphp-assets-base.git", - "reference": "d450349ba524ffcf606da53937a2f038405fea4a" + "reference": "4918eb32472bbb30b7a5ece30451ba0984b75f55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/simplesamlphp/simplesamlphp-assets-base/zipball/d450349ba524ffcf606da53937a2f038405fea4a", - "reference": "d450349ba524ffcf606da53937a2f038405fea4a", + "url": "https://api.github.com/repos/simplesamlphp/simplesamlphp-assets-base/zipball/4918eb32472bbb30b7a5ece30451ba0984b75f55", + "reference": "4918eb32472bbb30b7a5ece30451ba0984b75f55", "shasum": "" }, "require": { @@ -743,9 +746,9 @@ "description": "Assets for the SimpleSAMLphp main repository", "support": { "issues": "https://github.com/simplesamlphp/simplesamlphp-assets-base/issues", - "source": "https://github.com/simplesamlphp/simplesamlphp-assets-base/tree/v2.1.13" + "source": "https://github.com/simplesamlphp/simplesamlphp-assets-base/tree/v2.1.19" }, - "time": "2024-04-01T18:22:47+00:00" + "time": "2024-12-01T01:27:14+00:00" }, { "name": "symfony/cache", @@ -2018,20 +2021,20 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -2077,7 +2080,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -2093,24 +2096,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -2155,7 +2158,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -2171,24 +2174,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-icu", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "07094a28851a49107f3ab4f9120ca2975a64b6e1" + "reference": "d80a05e9904d2c2b9b95929f3e4b5d3a8f418d78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/07094a28851a49107f3ab4f9120ca2975a64b6e1", - "reference": "07094a28851a49107f3ab4f9120ca2975a64b6e1", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/d80a05e9904d2c2b9b95929f3e4b5d3a8f418d78", + "reference": "d80a05e9904d2c2b9b95929f3e4b5d3a8f418d78", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance and support of other locales than \"en\"" @@ -2239,7 +2242,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.31.0" }, "funding": [ { @@ -2255,24 +2258,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:12:16+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -2320,7 +2323,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -2336,24 +2339,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -2400,7 +2403,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -2416,104 +2419,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -2556,7 +2479,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -2572,7 +2495,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/routing", @@ -3313,26 +3236,27 @@ }, { "name": "twig/twig", - "version": "v3.9.3", + "version": "v3.16.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58" + "reference": "475ad2dc97d65d8631393e721e7e44fb544f0561" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58", - "reference": "a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/475ad2dc97d65d8631393e721e7e44fb544f0561", + "reference": "475ad2dc97d65d8631393e721e7e44fb544f0561", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php80": "^1.22" + "symfony/polyfill-php81": "^1.29" }, "require-dev": { + "phpstan/phpstan": "^2.0", "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, @@ -3376,7 +3300,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.9.3" + "source": "https://github.com/twigphp/Twig/tree/v3.16.0" }, "funding": [ { @@ -3388,7 +3312,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T11:59:33+00:00" + "time": "2024-11-29T08:27:05+00:00" }, { "name": "webmozart/assert", @@ -3659,23 +3583,24 @@ }, { "name": "mikey179/vfsstream", - "version": "v1.6.11", + "version": "v1.6.12", "source": { "type": "git", "url": "https://github.com/bovigo/vfsStream.git", - "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f" + "reference": "fe695ec993e0a55c3abdda10a9364eb31c6f1bf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", - "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/fe695ec993e0a55c3abdda10a9364eb31c6f1bf0", + "reference": "fe695ec993e0a55c3abdda10a9364eb31c6f1bf0", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.1.0" }, "require-dev": { - "phpunit/phpunit": "^4.5|^5.0" + "phpunit/phpunit": "^7.5||^8.5||^9.6", + "yoast/phpunit-polyfills": "^2.0" }, "type": "library", "extra": { @@ -3706,20 +3631,20 @@ "source": "https://github.com/bovigo/vfsStream/tree/master", "wiki": "https://github.com/bovigo/vfsStream/wiki" }, - "time": "2022-02-23T02:02:42+00:00" + "time": "2024-08-29T18:43:31+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -3727,11 +3652,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -3757,7 +3683,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -3765,20 +3691,20 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "nikic/php-parser", - "version": "v4.19.1", + "version": "v4.19.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b" + "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4e1b88d21c69391150ace211e9eaf05810858d0b", - "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/715f4d25e225bc47b293a8b997fe6ce99bf987d2", + "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2", "shasum": "" }, "require": { @@ -3787,7 +3713,7 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -3819,9 +3745,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.4" }, - "time": "2024-03-17T08:10:35+00:00" + "time": "2024-09-29T15:01:53+00:00" }, { "name": "phar-io/manifest", @@ -3943,16 +3869,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.28.0", + "version": "1.33.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb" + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140", + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140", "shasum": "" }, "require": { @@ -3984,41 +3910,41 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.28.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.33.0" }, - "time": "2024-04-03T18:51:33+00:00" + "time": "2024-10-13T11:25:22+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -4027,7 +3953,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -4056,7 +3982,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -4064,7 +3990,7 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4309,45 +4235,45 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.19", + "version": "9.6.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", + "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", "sebastian/version": "^3.0.2" }, "suggest": { @@ -4392,7 +4318,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" }, "funding": [ { @@ -4408,7 +4334,7 @@ "type": "tidelift" } ], - "time": "2024-04-05T04:35:58+00:00" + "time": "2024-09-19T10:50:18+00:00" }, { "name": "sebastian/cli-parser", @@ -5375,16 +5301,16 @@ }, { "name": "simplesamlphp/simplesamlphp-module-adfs", - "version": "v2.1.3", + "version": "v2.1.5", "source": { "type": "git", "url": "https://github.com/simplesamlphp/simplesamlphp-module-adfs.git", - "reference": "59368e58fc5548e8b6bb75c102c5a3242722e22b" + "reference": "f2202b9d8d4c14f09690f4781988e435f7dfd405" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/simplesamlphp/simplesamlphp-module-adfs/zipball/59368e58fc5548e8b6bb75c102c5a3242722e22b", - "reference": "59368e58fc5548e8b6bb75c102c5a3242722e22b", + "url": "https://api.github.com/repos/simplesamlphp/simplesamlphp-module-adfs/zipball/f2202b9d8d4c14f09690f4781988e435f7dfd405", + "reference": "f2202b9d8d4c14f09690f4781988e435f7dfd405", "shasum": "" }, "require": { @@ -5427,7 +5353,7 @@ "issues": "https://github.com/simplesamlphp/simplesamlphp-module-adfs/issues", "source": "https://github.com/simplesamlphp/simplesamlphp-module-adfs" }, - "time": "2023-11-26T09:54:31+00:00" + "time": "2024-05-27T12:30:45+00:00" }, { "name": "simplesamlphp/simplesamlphp-test-framework", @@ -5669,16 +5595,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.2", + "version": "3.11.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480" + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/aac1f6f347a5c5ac6bc98ad395007df00990f480", - "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", "shasum": "" }, "require": { @@ -5745,20 +5671,20 @@ "type": "open_collective" } ], - "time": "2024-04-23T20:25:34+00:00" + "time": "2024-11-16T12:02:36+00:00" }, { "name": "symfony/phpunit-bridge", - "version": "v7.0.7", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "0a0b90ba08b9a03e09ad49f8d613bdf3eca3a7a9" + "reference": "2bbde92ab25a0e2c88160857af7be9db5da0d145" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/0a0b90ba08b9a03e09ad49f8d613bdf3eca3a7a9", - "reference": "0a0b90ba08b9a03e09ad49f8d613bdf3eca3a7a9", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/2bbde92ab25a0e2c88160857af7be9db5da0d145", + "reference": "2bbde92ab25a0e2c88160857af7be9db5da0d145", "shasum": "" }, "require": { @@ -5778,8 +5704,8 @@ "type": "symfony-bridge", "extra": { "thanks": { - "name": "phpunit/phpunit", - "url": "https://github.com/sebastianbergmann/phpunit" + "url": "https://github.com/sebastianbergmann/phpunit", + "name": "phpunit/phpunit" } }, "autoload": { @@ -5790,7 +5716,8 @@ "Symfony\\Bridge\\PhpUnit\\": "" }, "exclude-from-classmap": [ - "/Tests/" + "/Tests/", + "/bin/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -5810,7 +5737,7 @@ "description": "Provides utilities for PHPUnit, especially user deprecation notices management", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v7.0.7" + "source": "https://github.com/symfony/phpunit-bridge/tree/v7.2.0" }, "funding": [ { @@ -5826,7 +5753,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:29:19+00:00" + "time": "2024-11-13T16:15:23+00:00" }, { "name": "symfony/translation", diff --git a/docs/simplesamlphp-changelog.md b/docs/simplesamlphp-changelog.md index eb8a653992..4d8b9a6bc3 100644 --- a/docs/simplesamlphp-changelog.md +++ b/docs/simplesamlphp-changelog.md @@ -3,7 +3,7 @@ [TOC] This document lists the changes between versions of SimpleSAMLphp. -See the upgrade notes for specific information about upgrading. +See the [upgrade notes](https://simplesamlphp.org/docs/stable/simplesamlphp-upgrade-notes.html) for specific information about upgrading. ## Version 2.1.7 @@ -11,6 +11,40 @@ Released TBD ## Version 2.1.6 +Released 2024-12-02 + +`Security` + +* A security bug was patched in the `saml2-library` that allowed for XXE during the parsing + of SAML2-messages (CVE-2024-52596) + +`Other fixes` + +* Added a missing use-statement that would cause a 'class not found' exception. +* Restore the possibility to set `trusted.url.domains` to null +* Fix typo that caused the metadata file-upload to be hidden (#2271) + +`adfs` + +* Fixed metadata download to become a proper xml-file +* Prevent metadata-download from ever being cached + +`admin` + +* Fix metadata-viewer to output a valid PHP array + +`ldap` + +* Fixed a bug that would throw an unhandled exception to the user if they would enter + a non-existing organization and `username_organization_method` is set to `allow` or `force` (v2.3.6). + +## Version 2.1.6 + +:warning: IMPORTANT NOTE :warning: + +Due to a mistake, this bugfix-release can turn out to become a backwards-incompatibility for those who override the loginuserpass.twig in their custom theme. +Please update your theme to reflect the changes in [this commit](https://github.com/simplesamlphp/simplesamlphp/pull/2022/commits/691199e9b963a2861d731e6583555c7a8df39992) before updating. + Released 30-04-2024 * Fix posting the form to the incorrect endpoint when using an authsource based on UserPassOrgBase (#2022) @@ -23,7 +57,7 @@ Released 30-04-2024 `admin` * Set custom security header to properly display phpinfo-page -* Hide file-upload button for metadata-converter is uploads are disabled at PHP-level +* Hide file-upload button for metadata-converter if uploads are disabled at PHP-level `exampleauth` diff --git a/docs/simplesamlphp-install.md b/docs/simplesamlphp-install.md index 81b68824b9..8d6efd30b6 100644 --- a/docs/simplesamlphp-install.md +++ b/docs/simplesamlphp-install.md @@ -181,6 +181,7 @@ look like this: server { listen 443 ssl; server_name idp.example.com; + index index.php; ssl_certificate /etc/pki/tls/certs/idp.example.com.crt; ssl_certificate_key /etc/pki/tls/private/idp.example.com.key; diff --git a/docs/simplesamlphp-metadata-extensions-attributes.md b/docs/simplesamlphp-metadata-extensions-attributes.md index 4e75bbd3b3..82a9fa0599 100644 --- a/docs/simplesamlphp-metadata-extensions-attributes.md +++ b/docs/simplesamlphp-metadata-extensions-attributes.md @@ -111,7 +111,7 @@ entity category support for a service provider in `authsources.php`: ... 'EntityAttributes' => [ 'http://macedir.org/entity-category' => [ - '{urn:oasis:names:tc:SAML:2.0:attrname-format:uri}http://www.geant.net/uri/dataprotection-code-of-conduct/v1' + 'http://www.geant.net/uri/dataprotection-code-of-conduct/v1' ] ], 'UIInfo' =>[ diff --git a/extra/simplesamlphp.spec b/extra/simplesamlphp.spec index bfdc198f73..e6a5edf88f 100644 --- a/extra/simplesamlphp.spec +++ b/extra/simplesamlphp.spec @@ -1,6 +1,6 @@ %define name simplesamlphp %define summary SAML IDP/SP written in PHP -%define version 2.1.6 +%define version 2.1.7 %define release 1 %define license LGPL 2.1 %define group Networking/WWW diff --git a/locales/lb/LC_MESSAGES/messages.po b/locales/lb/LC_MESSAGES/messages.po index b1f40024fa..bb2557ca1b 100644 --- a/locales/lb/LC_MESSAGES/messages.po +++ b/locales/lb/LC_MESSAGES/messages.po @@ -60,7 +60,7 @@ msgid "E-mail address:" msgstr "E-mail Adress" msgid "Enter your username and password" -msgstr "Gid w.e.g Aeren Benotzernumm an d Passwuert an" +msgstr "Gid w.e.g Aeren Benotzernumm an d'Passwuert an" msgid "Entitlement regarding the service" msgstr "Berechtegung" diff --git a/modules/admin/locales/af/LC_MESSAGES/admin.po b/modules/admin/locales/af/LC_MESSAGES/admin.po index a02fbef541..e8b8c0bfe0 100644 --- a/modules/admin/locales/af/LC_MESSAGES/admin.po +++ b/modules/admin/locales/af/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/ar/LC_MESSAGES/admin.po b/modules/admin/locales/ar/LC_MESSAGES/admin.po index c2cfd63066..749512f0c7 100644 --- a/modules/admin/locales/ar/LC_MESSAGES/admin.po +++ b/modules/admin/locales/ar/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/cs/LC_MESSAGES/admin.po b/modules/admin/locales/cs/LC_MESSAGES/admin.po index c6ae2ecf75..5dc9bc25d7 100644 --- a/modules/admin/locales/cs/LC_MESSAGES/admin.po +++ b/modules/admin/locales/cs/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/da/LC_MESSAGES/admin.po b/modules/admin/locales/da/LC_MESSAGES/admin.po index 35297db1dd..409196d6fe 100644 --- a/modules/admin/locales/da/LC_MESSAGES/admin.po +++ b/modules/admin/locales/da/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/de/LC_MESSAGES/admin.po b/modules/admin/locales/de/LC_MESSAGES/admin.po index 72046974c0..37faaf63b1 100644 --- a/modules/admin/locales/de/LC_MESSAGES/admin.po +++ b/modules/admin/locales/de/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/el/LC_MESSAGES/admin.po b/modules/admin/locales/el/LC_MESSAGES/admin.po index a9acdc5fb9..483905710c 100644 --- a/modules/admin/locales/el/LC_MESSAGES/admin.po +++ b/modules/admin/locales/el/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/en/LC_MESSAGES/admin.po b/modules/admin/locales/en/LC_MESSAGES/admin.po index 55be8c4c95..e92beaa37f 100644 --- a/modules/admin/locales/en/LC_MESSAGES/admin.po +++ b/modules/admin/locales/en/LC_MESSAGES/admin.po @@ -110,10 +110,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/es/LC_MESSAGES/admin.po b/modules/admin/locales/es/LC_MESSAGES/admin.po index 948e93e532..1c1b50bad4 100644 --- a/modules/admin/locales/es/LC_MESSAGES/admin.po +++ b/modules/admin/locales/es/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/et/LC_MESSAGES/admin.po b/modules/admin/locales/et/LC_MESSAGES/admin.po index f01c748077..687ad047bf 100644 --- a/modules/admin/locales/et/LC_MESSAGES/admin.po +++ b/modules/admin/locales/et/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/eu/LC_MESSAGES/admin.po b/modules/admin/locales/eu/LC_MESSAGES/admin.po index d01cf9bf2d..9cfb030959 100644 --- a/modules/admin/locales/eu/LC_MESSAGES/admin.po +++ b/modules/admin/locales/eu/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/fi/LC_MESSAGES/admin.po b/modules/admin/locales/fi/LC_MESSAGES/admin.po index 8a8ad3a9c2..25fbd2fb21 100644 --- a/modules/admin/locales/fi/LC_MESSAGES/admin.po +++ b/modules/admin/locales/fi/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/fr/LC_MESSAGES/admin.po b/modules/admin/locales/fr/LC_MESSAGES/admin.po index 7f16fd2690..d5c1f8edec 100644 --- a/modules/admin/locales/fr/LC_MESSAGES/admin.po +++ b/modules/admin/locales/fr/LC_MESSAGES/admin.po @@ -106,10 +106,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "Extension LDAP (nécessaire si un backend LDAP est utilisé)" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "Déconnexion" diff --git a/modules/admin/locales/he/LC_MESSAGES/admin.po b/modules/admin/locales/he/LC_MESSAGES/admin.po index f2da71b011..76b9e3aad2 100644 --- a/modules/admin/locales/he/LC_MESSAGES/admin.po +++ b/modules/admin/locales/he/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/hr/LC_MESSAGES/admin.po b/modules/admin/locales/hr/LC_MESSAGES/admin.po index 7ea2846242..d7d3b838ad 100644 --- a/modules/admin/locales/hr/LC_MESSAGES/admin.po +++ b/modules/admin/locales/hr/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/hu/LC_MESSAGES/admin.po b/modules/admin/locales/hu/LC_MESSAGES/admin.po index 0b60d6077e..60d9552bb2 100644 --- a/modules/admin/locales/hu/LC_MESSAGES/admin.po +++ b/modules/admin/locales/hu/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/id/LC_MESSAGES/admin.po b/modules/admin/locales/id/LC_MESSAGES/admin.po index ff0facc864..8bf7ec1fcd 100644 --- a/modules/admin/locales/id/LC_MESSAGES/admin.po +++ b/modules/admin/locales/id/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/it/LC_MESSAGES/admin.po b/modules/admin/locales/it/LC_MESSAGES/admin.po index f00674fbef..66b240e28b 100644 --- a/modules/admin/locales/it/LC_MESSAGES/admin.po +++ b/modules/admin/locales/it/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/ja/LC_MESSAGES/admin.po b/modules/admin/locales/ja/LC_MESSAGES/admin.po index 282ccbb2e4..8ca1f66cd4 100644 --- a/modules/admin/locales/ja/LC_MESSAGES/admin.po +++ b/modules/admin/locales/ja/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/lb/LC_MESSAGES/admin.po b/modules/admin/locales/lb/LC_MESSAGES/admin.po index ded831517b..1231e6004c 100644 --- a/modules/admin/locales/lb/LC_MESSAGES/admin.po +++ b/modules/admin/locales/lb/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/lt/LC_MESSAGES/admin.po b/modules/admin/locales/lt/LC_MESSAGES/admin.po index e94e36d4b9..22746eeb23 100644 --- a/modules/admin/locales/lt/LC_MESSAGES/admin.po +++ b/modules/admin/locales/lt/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/lv/LC_MESSAGES/admin.po b/modules/admin/locales/lv/LC_MESSAGES/admin.po index 35ed22bf85..478065b4bb 100644 --- a/modules/admin/locales/lv/LC_MESSAGES/admin.po +++ b/modules/admin/locales/lv/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/nb/LC_MESSAGES/admin.po b/modules/admin/locales/nb/LC_MESSAGES/admin.po index 8e86c8afc9..f9ba46aa0a 100644 --- a/modules/admin/locales/nb/LC_MESSAGES/admin.po +++ b/modules/admin/locales/nb/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/nl/LC_MESSAGES/admin.po b/modules/admin/locales/nl/LC_MESSAGES/admin.po index b3c2d2baa1..da4392f7b4 100644 --- a/modules/admin/locales/nl/LC_MESSAGES/admin.po +++ b/modules/admin/locales/nl/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "LDAP-extensie (vereist als een LDAP-backend wordt gebruikt)" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "Log uit" diff --git a/modules/admin/locales/nn/LC_MESSAGES/admin.po b/modules/admin/locales/nn/LC_MESSAGES/admin.po index 1bbb976953..10984d88d1 100644 --- a/modules/admin/locales/nn/LC_MESSAGES/admin.po +++ b/modules/admin/locales/nn/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/no/LC_MESSAGES/admin.po b/modules/admin/locales/no/LC_MESSAGES/admin.po index 8e86c8afc9..f9ba46aa0a 100644 --- a/modules/admin/locales/no/LC_MESSAGES/admin.po +++ b/modules/admin/locales/no/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/pl/LC_MESSAGES/admin.po b/modules/admin/locales/pl/LC_MESSAGES/admin.po index 50f4afe6ea..6a719e6fdc 100644 --- a/modules/admin/locales/pl/LC_MESSAGES/admin.po +++ b/modules/admin/locales/pl/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/pt-br/LC_MESSAGES/admin.po b/modules/admin/locales/pt-br/LC_MESSAGES/admin.po index 2f0cade535..5674d316af 100644 --- a/modules/admin/locales/pt-br/LC_MESSAGES/admin.po +++ b/modules/admin/locales/pt-br/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/pt/LC_MESSAGES/admin.po b/modules/admin/locales/pt/LC_MESSAGES/admin.po index 13fe45441f..7f951be672 100644 --- a/modules/admin/locales/pt/LC_MESSAGES/admin.po +++ b/modules/admin/locales/pt/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/ro/LC_MESSAGES/admin.po b/modules/admin/locales/ro/LC_MESSAGES/admin.po index 48c6afe39d..c60df61ade 100644 --- a/modules/admin/locales/ro/LC_MESSAGES/admin.po +++ b/modules/admin/locales/ro/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/ru/LC_MESSAGES/admin.po b/modules/admin/locales/ru/LC_MESSAGES/admin.po index 1eae7c49f2..cb7a26efd2 100644 --- a/modules/admin/locales/ru/LC_MESSAGES/admin.po +++ b/modules/admin/locales/ru/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/sk/LC_MESSAGES/admin.po b/modules/admin/locales/sk/LC_MESSAGES/admin.po index af4be070c7..827cb596b5 100644 --- a/modules/admin/locales/sk/LC_MESSAGES/admin.po +++ b/modules/admin/locales/sk/LC_MESSAGES/admin.po @@ -110,10 +110,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "rozšírenie LDAP (vyžadované, ak je využívaný LDAP backend)" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "Odhlásiť sa" diff --git a/modules/admin/locales/sl/LC_MESSAGES/admin.po b/modules/admin/locales/sl/LC_MESSAGES/admin.po index a50375a7c0..ce14bd232c 100644 --- a/modules/admin/locales/sl/LC_MESSAGES/admin.po +++ b/modules/admin/locales/sl/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/sr/LC_MESSAGES/admin.po b/modules/admin/locales/sr/LC_MESSAGES/admin.po index 1d1499e688..9598a79f36 100644 --- a/modules/admin/locales/sr/LC_MESSAGES/admin.po +++ b/modules/admin/locales/sr/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/st/LC_MESSAGES/admin.po b/modules/admin/locales/st/LC_MESSAGES/admin.po index 51a253b372..22663e0b86 100644 --- a/modules/admin/locales/st/LC_MESSAGES/admin.po +++ b/modules/admin/locales/st/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/sv/LC_MESSAGES/admin.po b/modules/admin/locales/sv/LC_MESSAGES/admin.po index 40b8ff3b3c..1b5ee66aa6 100644 --- a/modules/admin/locales/sv/LC_MESSAGES/admin.po +++ b/modules/admin/locales/sv/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/tr/LC_MESSAGES/admin.po b/modules/admin/locales/tr/LC_MESSAGES/admin.po index ba3e1b0b39..52b233d23f 100644 --- a/modules/admin/locales/tr/LC_MESSAGES/admin.po +++ b/modules/admin/locales/tr/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/xh/LC_MESSAGES/admin.po b/modules/admin/locales/xh/LC_MESSAGES/admin.po index a02fbef541..e8b8c0bfe0 100644 --- a/modules/admin/locales/xh/LC_MESSAGES/admin.po +++ b/modules/admin/locales/xh/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/zh-tw/LC_MESSAGES/admin.po b/modules/admin/locales/zh-tw/LC_MESSAGES/admin.po index c33d3f832d..cbc9cd0464 100644 --- a/modules/admin/locales/zh-tw/LC_MESSAGES/admin.po +++ b/modules/admin/locales/zh-tw/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/zh/LC_MESSAGES/admin.po b/modules/admin/locales/zh/LC_MESSAGES/admin.po index 07f4f222cf..9143b91504 100644 --- a/modules/admin/locales/zh/LC_MESSAGES/admin.po +++ b/modules/admin/locales/zh/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/locales/zu/LC_MESSAGES/admin.po b/modules/admin/locales/zu/LC_MESSAGES/admin.po index 1820c4c155..7593f5e74c 100644 --- a/modules/admin/locales/zu/LC_MESSAGES/admin.po +++ b/modules/admin/locales/zu/LC_MESSAGES/admin.po @@ -104,10 +104,10 @@ msgid "LDAP extension (required if an LDAP backend is used)" msgstr "" #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Test.php:153 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 -#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:106 #: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Config.php:146 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:187 +#: /home/runner/work/simplesamlphp/simplesamlphp/modules/admin/src/Controller/Federation.php:487 msgid "Log out" msgstr "" diff --git a/modules/admin/src/Controller/Config.php b/modules/admin/src/Controller/Config.php index e165f6f5ef..0c42b13adb 100644 --- a/modules/admin/src/Controller/Config.php +++ b/modules/admin/src/Controller/Config.php @@ -55,7 +55,7 @@ class Config */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { $this->menu = new Menu(); $this->authUtils = new Utils\Auth(); @@ -127,12 +127,12 @@ public function main(/** @scrutinizer ignore-unused */ Request $request): Templa 'links' => [ [ 'href' => Module::getModuleURL('admin/diagnostics'), - 'text' => Translate::noop('Diagnostics on hostname, port and protocol') + 'text' => Translate::noop('Diagnostics on hostname, port and protocol'), ], [ 'href' => Module::getModuleURL('admin/phpinfo'), - 'text' => Translate::noop('Information on your PHP installation') - ] + 'text' => Translate::noop('Information on your PHP installation'), + ], ], 'enablematrix' => [ 'saml20idp' => $this->config->getOptionalBoolean('enable.saml20-idp', false), @@ -206,11 +206,11 @@ protected function getPrerequisiteChecks(): array Translate::noop('PHP %minimum% or newer is needed. You are running: %current%'), [ '%minimum%' => '8.0', - '%current%' => explode('-', phpversion())[0] - ] + '%current%' => explode('-', phpversion())[0], + ], ], - 'enabled' => version_compare(phpversion(), '8.0', '>=') - ] + 'enabled' => version_compare(phpversion(), '8.0', '>='), + ], ]; $store = $this->config->getOptionalString('store.type', null); $checkforupdates = $this->config->getOptionalBoolean('admin.checkforupdates', true); @@ -221,93 +221,93 @@ protected function getPrerequisiteChecks(): array 'required' => 'required', 'descr' => [ 'required' => Translate::noop('Date/Time Extension'), - ] + ], ], 'hash' => [ 'required' => 'required', 'descr' => [ 'required' => Translate::noop('Hashing function'), - ] + ], ], 'gzinflate' => [ 'required' => 'required', 'descr' => [ 'required' => Translate::noop('ZLib'), - ] + ], ], 'openssl_sign' => [ 'required' => 'required', 'descr' => [ 'required' => Translate::noop('OpenSSL'), - ] + ], ], 'dom_import_simplexml' => [ 'required' => 'required', 'descr' => [ 'required' => Translate::noop('XML DOM'), - ] + ], ], 'preg_match' => [ 'required' => 'required', 'descr' => [ 'required' => Translate::noop('Regular expression support'), - ] + ], ], 'intl_get_error_code' => [ 'required' => 'optional', 'descr' => [ 'optional' => Translate::noop('PHP intl extension'), - ] + ], ], 'json_decode' => [ 'required' => 'required', 'descr' => [ 'required' => Translate::noop('JSON support'), - ] + ], ], 'class_implements' => [ 'required' => 'required', 'descr' => [ 'required' => Translate::noop('Standard PHP library (SPL)'), - ] + ], ], 'mb_strlen' => [ 'required' => 'required', 'descr' => [ 'required' => Translate::noop('Multibyte String extension'), - ] + ], ], 'curl_init' => [ 'required' => ($checkforupdates === true) ? 'required' : 'optional', 'descr' => [ 'optional' => Translate::noop( - 'cURL (might be required by some modules)' + 'cURL (might be required by some modules)', ), 'required' => Translate::noop( - 'cURL (required if automatic version checks are used, also by some modules)' + 'cURL (required if automatic version checks are used, also by some modules)', ), - ] + ], ], 'session_start' => [ 'required' => $store === 'phpsession' ? 'required' : 'optional', 'descr' => [ 'optional' => Translate::noop('Session extension (required if PHP sessions are used)'), 'required' => Translate::noop('Session extension'), - ] + ], ], 'pdo_drivers' => [ 'required' => $store === 'sql' ? 'required' : 'optional', 'descr' => [ 'optional' => Translate::noop('PDO Extension (required if a database backend is used)'), 'required' => Translate::noop('PDO extension'), - ] + ], ], 'ldap_bind' => [ 'required' => Module::isModuleEnabled('ldap') ? 'required' : 'optional', 'descr' => [ 'optional' => Translate::noop('LDAP extension (required if an LDAP backend is used)'), 'required' => Translate::noop('LDAP extension'), - ] + ], ], ]; @@ -327,18 +327,18 @@ protected function getPrerequisiteChecks(): array 'descr' => [ 'optional' => Translate::noop('predis/predis (required if the redis data store is used)'), 'required' => Translate::noop('predis/predis library'), - ] + ], ], [ 'classes' => ['\Memcache', '\Memcached'], 'required' => $store === 'memcache' ? 'required' : 'optional', 'descr' => [ 'optional' => Translate::noop( - 'Memcache or Memcached extension (required if the memcache backend is used)' + 'Memcache or Memcached extension (required if the memcache backend is used)', ), 'required' => Translate::noop('Memcache or Memcached extension'), - ] - ] + ], + ], ]; foreach ($libs as $lib) { @@ -408,7 +408,7 @@ protected function getWarnings(): array 'You are not using HTTPS to protect communications with your users. HTTP works fine ' . 'for testing purposes, but in a production environment you should use HTTPS. Read more about the ' . - 'maintenance of SimpleSAMLphp.' + 'maintenance of SimpleSAMLphp.', ); } @@ -419,7 +419,7 @@ protected function getWarnings(): array 'The configuration uses the default secret salt. Make sure to modify the ' . 'secretsalt option in the SimpleSAMLphp configuration in production environments. Read more about the ' . - 'maintenance of SimpleSAMLphp.' + 'maintenance of SimpleSAMLphp.', ); } elseif (str_contains($secretSalt, '%')) { $warnings[] = Translate::noop( @@ -435,7 +435,7 @@ protected function getWarnings(): array if (($checkforupdates === true) && $this->config->getVersion() !== 'master') { if (!function_exists('curl_init')) { $warnings[] = Translate::noop( - 'The cURL PHP extension is missing. Cannot check for SimpleSAMLphp updates.' + 'The cURL PHP extension is missing. Cannot check for SimpleSAMLphp updates.', ); } else { $latest = $this->session->getData(self::LATEST_VERSION_STATE_KEY, "version"); @@ -461,7 +461,7 @@ protected function getWarnings(): array $warnings[] = [ Translate::noop( 'You are running an outdated version of SimpleSAMLphp. Please update to the latest version as soon as possible.' + '%latest%">the latest version as soon as possible.', ), [ '%latest%' => $latest['html_url'], diff --git a/modules/admin/src/Controller/Federation.php b/modules/admin/src/Controller/Federation.php index 1ec1172205..ee58d9eb52 100644 --- a/modules/admin/src/Controller/Federation.php +++ b/modules/admin/src/Controller/Federation.php @@ -72,7 +72,7 @@ class Federation * @param \SimpleSAML\Configuration $config The configuration to use. */ public function __construct( - protected Configuration $config + protected Configuration $config, ) { $this->menu = new Menu(); $this->mdHandler = MetaDataStorageHandler::getMetadataHandler(); @@ -165,7 +165,7 @@ public function main(/** @scrutinizer ignore-unused */ Request $request): Templa [ 'href' => Module::getModuleURL('admin/federation/metadata-converter'), 'text' => Translate::noop('XML to SimpleSAMLphp metadata converter'), - ] + ], ], 'entries' => $entries, 'mdtype' => [ @@ -225,7 +225,7 @@ private function getHostedIdP(): array $saml2entities['saml20-idp'] = $this->mdHandler->getMetaDataCurrent('saml20-idp-hosted'); $saml2entities['saml20-idp']['url'] = $metadataBase; $saml2entities['saml20-idp']['metadata_array'] = SAML2_IdP::getHostedMetadata( - $this->mdHandler->getMetaDataCurrentEntityID('saml20-idp-hosted') + $this->mdHandler->getMetaDataCurrentEntityID('saml20-idp-hosted'), ); } @@ -234,7 +234,7 @@ private function getHostedIdP(): array Assert::maxLength( $entity['entityid'], C::SAML2INT_ENTITYID_MAX_LENGTH, - sprintf('The entityID cannot be longer than %d characters.', C::SAML2INT_ENTITYID_MAX_LENGTH) + sprintf('The entityID cannot be longer than %d characters.', C::SAML2INT_ENTITYID_MAX_LENGTH), ); $builder = new SAMLBuilder($entity['entityid']); @@ -244,7 +244,7 @@ private function getHostedIdP(): array $entity['metadata'] = Signer::sign( $builder->getEntityDescriptorText(), $entity['metadata_array'], - 'SAML 2 IdP' + 'SAML 2 IdP', ); $entities[$index] = $entity; } @@ -271,7 +271,7 @@ private function getHostedIdP(): array $adfsentities['adfs-idp'] = $this->mdHandler->getMetaDataCurrent('adfs-idp-hosted'); $adfsentities['adfs-idp']['url'] = Module::getModuleURL('adfs/idp/metadata.php'); $adfsentities['adfs-idp']['metadata_array'] = ADFS_IdP::getHostedMetadata( - $this->mdHandler->getMetaDataCurrentEntityID('adfs-idp-hosted') + $this->mdHandler->getMetaDataCurrentEntityID('adfs-idp-hosted'), ); } @@ -280,7 +280,7 @@ private function getHostedIdP(): array Assert::maxLength( $entity['entityid'], C::SAML2INT_ENTITYID_MAX_LENGTH, - sprintf('The entityID cannot be longer than %d characters.', C::SAML2INT_ENTITYID_MAX_LENGTH) + sprintf('The entityID cannot be longer than %d characters.', C::SAML2INT_ENTITYID_MAX_LENGTH), ); $builder = new SAMLBuilder($entity['entityid']); @@ -295,7 +295,7 @@ private function getHostedIdP(): array $entity['metadata'] = Signer::sign( $builder->getEntityDescriptorText(), $entity['metadata_array'], - 'ADFS IdP' + 'ADFS IdP', ); $entities[$index] = $entity; } @@ -364,8 +364,8 @@ private function getHostedSP(): array 'name', $source->getMetadata()->getOptionalLocalizedString( 'OrganizationDisplayName', - ['en' => $source->getAuthId()] - ) + ['en' => $source->getAuthId()], + ), ); $builder = new SAMLBuilder($source->getEntityId()); @@ -481,7 +481,7 @@ public function metadataConverter(Request $request): Template 'xmldata' => $xmldata, 'output' => $output, 'error' => $error, - 'upload' => boolval(ini_get('file_upload')), + 'upload' => boolval(ini_get('file_uploads')), ]; $this->menu->addOption('logout', $t->data['logouturl'], Translate::noop('Log out')); @@ -522,7 +522,7 @@ public function downloadCert(Request $request): Response $response = new Response($certInfo['PEM']); $disposition = $response->headers->makeDisposition( ResponseHeaderBag::DISPOSITION_ATTACHMENT, - 'cert.pem' + 'cert.pem', ); $response->headers->set('Content-Disposition', $disposition); diff --git a/modules/admin/src/Controller/Menu.php b/modules/admin/src/Controller/Menu.php index 7e6345f11b..084ee6c33b 100644 --- a/modules/admin/src/Controller/Menu.php +++ b/modules/admin/src/Controller/Menu.php @@ -38,8 +38,8 @@ public function __construct() ], 'federation' => [ 'url' => Module::getModuleURL('admin/federation'), - 'name' => Translate::noop('Federation') - ] + 'name' => Translate::noop('Federation'), + ], ]; } diff --git a/modules/admin/src/Controller/Sandbox.php b/modules/admin/src/Controller/Sandbox.php index 84d588d9d9..3dae7daa25 100644 --- a/modules/admin/src/Controller/Sandbox.php +++ b/modules/admin/src/Controller/Sandbox.php @@ -25,7 +25,7 @@ class Sandbox */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { } diff --git a/modules/admin/src/Controller/Test.php b/modules/admin/src/Controller/Test.php index f180fb1b18..745bd77b8a 100644 --- a/modules/admin/src/Controller/Test.php +++ b/modules/admin/src/Controller/Test.php @@ -54,7 +54,7 @@ class Test */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { $this->menu = new Menu(); $this->authUtils = new Utils\Auth(); diff --git a/modules/admin/templates/metadata_converter.twig b/modules/admin/templates/metadata_converter.twig index 9881e4272f..9423807280 100644 --- a/modules/admin/templates/metadata_converter.twig +++ b/modules/admin/templates/metadata_converter.twig @@ -33,8 +33,6 @@

{{ 'Converted metadata'|trans }}

{% for type, text in output -%} {%- if text -%} -{# spaceless is to work around a clipboard.js bug that would add extra whitespace #} -{% apply spaceless %}

{{ type }}

@@ -42,11 +40,10 @@
-
-
{{ text|escape }}
+
+ {{- text|escape -}}
-{% endapply %}

{%- set i=i+1 %} {%- endif -%} diff --git a/modules/admin/templates/show_metadata.twig b/modules/admin/templates/show_metadata.twig index 24fdc3ea92..a28b0c90b7 100644 --- a/modules/admin/templates/show_metadata.twig +++ b/modules/admin/templates/show_metadata.twig @@ -9,7 +9,7 @@ title="{% trans %}Copy to clipboard{% endtrans %}">
- {#- #}$metadata["{{ entityid }}"] => {{ metadata|escape }};{# -#} + {#- #}$metadata["{{ entityid }}"] = {{ metadata|escape }};{# -#}
diff --git a/modules/core/src/Auth/Process/AttributeAdd.php b/modules/core/src/Auth/Process/AttributeAdd.php index 54439e9017..62e576df83 100644 --- a/modules/core/src/Auth/Process/AttributeAdd.php +++ b/modules/core/src/Auth/Process/AttributeAdd.php @@ -58,7 +58,7 @@ public function __construct(array &$config, $reserved) foreach ($values as $value) { if (!is_string($value)) { throw new Exception( - 'Invalid value for attribute ' . $name . ': ' . var_export($values, true) + 'Invalid value for attribute ' . $name . ': ' . var_export($values, true), ); } } diff --git a/modules/core/src/Auth/Process/AttributeAlter.php b/modules/core/src/Auth/Process/AttributeAlter.php index 87f5a61f3b..2d46ee5e83 100644 --- a/modules/core/src/Auth/Process/AttributeAlter.php +++ b/modules/core/src/Auth/Process/AttributeAlter.php @@ -124,7 +124,7 @@ public function process(array &$state): void if (!$this->replace && !$this->remove && $this->replacement === false) { throw new Error\Exception( - "'replacement' must be set if neither '%replace' nor " . "'%remove' are set." + "'replacement' must be set if neither '%replace' nor " . "'%remove' are set.", ); } @@ -165,7 +165,7 @@ public function process(array &$state): void $value = $new_value; } elseif ($this->merge === true) { $attributes[$this->target] = array_values( - array_diff($attributes[$this->target], [$value]) + array_diff($attributes[$this->target], [$value]), ); $attributes[$this->target][] = $new_value; } else { @@ -193,16 +193,16 @@ public function process(array &$state): void $attributes[$this->target] = preg_replace( $this->pattern, $this->replacement, - $attributes[$this->subject] + $attributes[$this->subject], ); } else { $diff = array_diff( preg_replace( $this->pattern, $this->replacement, - $attributes[$this->subject] + $attributes[$this->subject], ), - $attributes[$this->subject] + $attributes[$this->subject], ); if ($this->merge === true) { diff --git a/modules/core/src/Auth/Process/AttributeValueMap.php b/modules/core/src/Auth/Process/AttributeValueMap.php index e4457633b0..6c635ea56f 100644 --- a/modules/core/src/Auth/Process/AttributeValueMap.php +++ b/modules/core/src/Auth/Process/AttributeValueMap.php @@ -69,7 +69,7 @@ public function __construct(array &$config, $reserved) } else { // unknown configuration option, log it and ignore the error Logger::warning( - "AttributeValueMap: unknown configuration flag '" . var_export($value, true) . "'" + "AttributeValueMap: unknown configuration flag '" . var_export($value, true) . "'", ); } continue; @@ -142,7 +142,7 @@ public function process(array &$state): void } else { $attributes[$this->targetattribute] = array_unique(array_merge( $attributes[$this->targetattribute], - $targetvalues + $targetvalues, )); } } diff --git a/modules/core/src/Auth/Process/Cardinality.php b/modules/core/src/Auth/Process/Cardinality.php index 0ad1c1ec97..160261d07e 100644 --- a/modules/core/src/Auth/Process/Cardinality.php +++ b/modules/core/src/Auth/Process/Cardinality.php @@ -138,13 +138,13 @@ public function process(array &$state): void $k, $entityid, $this->cardinality[$k]['min'], - count($v) - ) + count($v), + ), ); } else { $state['core:cardinality:errorAttributes'][$k] = [ count($v), - $this->cardinality[$k]['_expr'] + $this->cardinality[$k]['_expr'], ]; } continue; @@ -159,13 +159,13 @@ public function process(array &$state): void $k, $entityid, $this->cardinality[$k]['max'], - count($v) - ) + count($v), + ), ); } else { $state['core:cardinality:errorAttributes'][$k] = [ count($v), - $this->cardinality[$k]['_expr'] + $this->cardinality[$k]['_expr'], ]; } continue; @@ -181,12 +181,12 @@ public function process(array &$state): void Logger::warning(sprintf( 'Cardinality: attribute %s from %s is missing', $k, - $entityid + $entityid, )); } else { $state['core:cardinality:errorAttributes'][$k] = [ 0, - $this->cardinality[$k]['_expr'] + $this->cardinality[$k]['_expr'], ]; } } diff --git a/modules/core/src/Auth/Process/GenerateGroups.php b/modules/core/src/Auth/Process/GenerateGroups.php index 89e8b4c21c..503dd1cfdc 100644 --- a/modules/core/src/Auth/Process/GenerateGroups.php +++ b/modules/core/src/Auth/Process/GenerateGroups.php @@ -145,7 +145,7 @@ private static function escapeIllegalChars(string $string): string function ($m) { return sprintf("%%%02x", ord($m[1])); }, - $string + $string, ); } } diff --git a/modules/core/src/Auth/Process/PHP.php b/modules/core/src/Auth/Process/PHP.php index b6706c4a07..d63a369049 100644 --- a/modules/core/src/Auth/Process/PHP.php +++ b/modules/core/src/Auth/Process/PHP.php @@ -58,7 +58,7 @@ public function process(array &$state): void */ $function = function ( /** @scrutinizer ignore-unused */ array &$attributes, - /** @scrutinizer ignore-unused */ array &$state + /** @scrutinizer ignore-unused */ array &$state, ): void { eval($this->code); }; diff --git a/modules/core/src/Auth/Process/ScopeFromAttribute.php b/modules/core/src/Auth/Process/ScopeFromAttribute.php index be54edaea6..07e7758773 100644 --- a/modules/core/src/Auth/Process/ScopeFromAttribute.php +++ b/modules/core/src/Auth/Process/ScopeFromAttribute.php @@ -89,7 +89,7 @@ public function process(array &$state): void $scope = substr($sourceAttrVal, $scopeIndex + 1); $attributes[$this->targetAttribute][] = $scope; Logger::debug( - 'ScopeFromAttribute: Inserted new attribute ' . $this->targetAttribute . ', with scope ' . $scope + 'ScopeFromAttribute: Inserted new attribute ' . $this->targetAttribute . ', with scope ' . $scope, ); } else { Logger::warning('ScopeFromAttribute: The configured source attribute ' . $this->sourceAttribute diff --git a/modules/core/src/Auth/Process/TargetedID.php b/modules/core/src/Auth/Process/TargetedID.php index 3a828b6b2b..1bfb81c96d 100644 --- a/modules/core/src/Auth/Process/TargetedID.php +++ b/modules/core/src/Auth/Process/TargetedID.php @@ -66,7 +66,7 @@ public function __construct(array &$config, $reserved) Assert::keyExists($config, 'identifyingAttribute', "Missing mandatory 'identifyingAttribute' config setting."); Assert::stringNotEmpty( $config['identifyingAttribute'], - "TargetedID: 'identifyingAttribute' must be a non-empty string." + "TargetedID: 'identifyingAttribute' must be a non-empty string.", ); $this->identifyingAttribute = $config['identifyingAttribute']; @@ -105,8 +105,8 @@ public function process(array &$state): void Logger::warning( sprintf( "core:TargetedID: Missing attribute '%s', which is needed to generate the TargetedID.", - $this->identifyingAttribute - ) + $this->identifyingAttribute, + ), ); return; diff --git a/modules/core/src/Auth/Source/RequestedAuthnContextSelector.php b/modules/core/src/Auth/Source/RequestedAuthnContextSelector.php index d1dd325e81..b0262fe04d 100644 --- a/modules/core/src/Auth/Source/RequestedAuthnContextSelector.php +++ b/modules/core/src/Auth/Source/RequestedAuthnContextSelector.php @@ -113,7 +113,7 @@ protected function selectAuthSource(array &$state): string || $requestedContexts['AuthnContextClassRef'] === null ) { Logger::info( - "core:RequestedAuthnContextSelector: no RequestedAuthnContext provided; selecting default authsource" + "core:RequestedAuthnContextSelector: no RequestedAuthnContext provided; selecting default authsource", ); if (array_key_exists('default', $this->contexts)) { diff --git a/modules/core/src/Auth/Source/SourceIPSelector.php b/modules/core/src/Auth/Source/SourceIPSelector.php index 84b3f3cd70..532159aed7 100644 --- a/modules/core/src/Auth/Source/SourceIPSelector.php +++ b/modules/core/src/Auth/Source/SourceIPSelector.php @@ -70,11 +70,11 @@ public function __construct(array $info, array $config) foreach ($zones as $key => $zone) { if (!array_key_exists('source', $zone)) { throw new Error\Exception( - sprintf("Incomplete zone-configuration '%s' due to missing `source` key.", $key) + sprintf("Incomplete zone-configuration '%s' due to missing `source` key.", $key), ); } elseif (!array_key_exists('subnet', $zone)) { throw new Error\Exception( - sprintf("Incomplete zone-configuration '%s' due to missing `subnet` key.", $key) + sprintf("Incomplete zone-configuration '%s' due to missing `subnet` key.", $key), ); } else { $this->zones[$key] = $zone; diff --git a/modules/core/src/Auth/UserPassOrgBase.php b/modules/core/src/Auth/UserPassOrgBase.php index e1258039ab..ef4b4ed75e 100644 --- a/modules/core/src/Auth/UserPassOrgBase.php +++ b/modules/core/src/Auth/UserPassOrgBase.php @@ -267,7 +267,7 @@ public static function handleLogin( string $authStateId, string $username, string $password, - string $organization + string $organization, ): void { /* Retrieve the authentication state. */ $state = Auth\State::loadState($authStateId, self::STAGEID); @@ -305,7 +305,7 @@ public static function handleLogin( Logger::stats( 'User \'' . $username . '\' at \'' . $organization - . '\' successfully authenticated from ' . $_SERVER['REMOTE_ADDR'] + . '\' successfully authenticated from ' . $_SERVER['REMOTE_ADDR'], ); // Add the selected Org to the state diff --git a/modules/core/src/Controller/ErrorReport.php b/modules/core/src/Controller/ErrorReport.php index cca4aa75d3..94afb78c4e 100644 --- a/modules/core/src/Controller/ErrorReport.php +++ b/modules/core/src/Controller/ErrorReport.php @@ -34,7 +34,7 @@ class ErrorReport */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { } diff --git a/modules/core/src/Controller/Exception.php b/modules/core/src/Controller/Exception.php index c1862d7c75..385799bca8 100644 --- a/modules/core/src/Controller/Exception.php +++ b/modules/core/src/Controller/Exception.php @@ -41,7 +41,7 @@ class Exception */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { } @@ -123,14 +123,14 @@ public function cardinality(Request $request): Response $state = Auth\State::loadState($stateId, 'core:cardinality'); Logger::stats( 'core:cardinality:error ' . $state['Destination']['entityid'] . ' ' . $state['saml:sp:IdP'] . - ' ' . implode(',', array_keys($state['core:cardinality:errorAttributes'])) + ' ' . implode(',', array_keys($state['core:cardinality:errorAttributes'])), ); $t = new Template($this->config, 'core:cardinality_error.twig'); $t->data['cardinalityErrorAttributes'] = $state['core:cardinality:errorAttributes']; if (isset($state['Source']['auth'])) { $t->data['LogoutURL'] = Module::getModuleURL( - 'saml/sp/login/' . urlencode($state['Source']['auth']) + 'saml/sp/login/' . urlencode($state['Source']['auth']), ); } diff --git a/modules/core/src/Controller/Login.php b/modules/core/src/Controller/Login.php index 46cb9dedd1..3d9ce939d6 100644 --- a/modules/core/src/Controller/Login.php +++ b/modules/core/src/Controller/Login.php @@ -49,7 +49,7 @@ class Login * @throws \Exception */ public function __construct( - protected Configuration $config + protected Configuration $config, ) { } @@ -107,7 +107,7 @@ public function loginuserpass(Request $request): Response $source = $this->authSource::getById($state[UserPassBase::AUTHID]); if ($source === null) { throw new BuiltinException( - 'Could not find authentication source with id ' . $state[UserPassBase::AUTHID] + 'Could not find authentication source with id ' . $state[UserPassBase::AUTHID], ); } @@ -220,7 +220,7 @@ private function handleLogin(Request $request, UserPassBase|UserPassOrgBase $sou $errorParams = $e->getParameters(); $state['error'] = [ 'code' => $errorCode, - 'params' => $errorParams + 'params' => $errorParams, ]; $authStateId = Auth\State::saveState($state, $source::STAGEID); } @@ -322,7 +322,7 @@ public function loginuserpassorg(Request $request): Response $source = $this->authSource::getById($state[UserPassOrgBase::AUTHID]); if ($source === null) { throw new BuiltinException( - 'Could not find authentication source with id ' . $state[UserPassOrgBase::AUTHID] + 'Could not find authentication source with id ' . $state[UserPassOrgBase::AUTHID], ); } @@ -351,7 +351,7 @@ private function renderCookie( ?bool $secure = null, bool $httponly = true, bool $raw = false, - ?string $sameSite = 'none' + ?string $sameSite = 'none', ): Cookie { return new Cookie($name, $value, $expire, $path, $domain, $secure, $httponly, $raw, $sameSite); } diff --git a/modules/core/src/Controller/Logout.php b/modules/core/src/Controller/Logout.php index a7ac4c1bbc..336c8ebba7 100644 --- a/modules/core/src/Controller/Logout.php +++ b/modules/core/src/Controller/Logout.php @@ -47,7 +47,7 @@ class Logout * @param \SimpleSAML\Configuration $config The configuration to use by the controllers. */ public function __construct( - protected Configuration $config + protected Configuration $config, ) { } diff --git a/modules/core/src/Controller/Redirection.php b/modules/core/src/Controller/Redirection.php index 77150bb4fc..8bbee9da69 100644 --- a/modules/core/src/Controller/Redirection.php +++ b/modules/core/src/Controller/Redirection.php @@ -38,7 +38,7 @@ class Redirection */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { $this->cryptoUtils = new Utils\Crypto(); } diff --git a/modules/core/src/Storage/SQLPermanentStorage.php b/modules/core/src/Storage/SQLPermanentStorage.php index 6d046f3390..5ba08cffdb 100644 --- a/modules/core/src/Storage/SQLPermanentStorage.php +++ b/modules/core/src/Storage/SQLPermanentStorage.php @@ -109,7 +109,7 @@ private function insert(string $type, string $key1, string $key2, string $value, $data = [':key1' => $key1, ':key2' => $key2, ':type' => $type, ':created' => time(), ':updated' => time(), ':expire' => $expire, - ':value' => serialize($value) + ':value' => serialize($value), ]; $prepared->execute($data); $results = $prepared->fetchAll(PDO::FETCH_ASSOC); @@ -134,7 +134,7 @@ private function update(string $type, string $key1, string $key2, string $value, $prepared = $this->db->prepare($query); $data = [':key1' => $key1, ':key2' => $key2, ':type' => $type, ':updated' => time(), - ':expire' => $expire, ':value' => serialize($value) + ':expire' => $expire, ':value' => serialize($value), ]; $prepared->execute($data); $results = $prepared->fetchAll(PDO::FETCH_ASSOC); @@ -237,7 +237,7 @@ public function getKeys( string $type = null, string $key1 = null, string $key2 = null, - string $whichKey = 'type' + string $whichKey = 'type', ): ?array { if (!in_array($whichKey, ['key1', 'key2', 'type'], true)) { throw new \Exception('Invalid key type'); diff --git a/modules/cron/src/Controller/Cron.php b/modules/cron/src/Controller/Cron.php index 98894709ce..e23ced10e6 100644 --- a/modules/cron/src/Controller/Cron.php +++ b/modules/cron/src/Controller/Cron.php @@ -44,7 +44,7 @@ class Cron */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { $this->cronconfig = Configuration::getConfig('module_cron.php'); $this->authUtils = new Utils\Auth(); diff --git a/modules/exampleauth/src/Auth/Source/UserPass.php b/modules/exampleauth/src/Auth/Source/UserPass.php index 06d2c75c7b..93249f22f9 100644 --- a/modules/exampleauth/src/Auth/Source/UserPass.php +++ b/modules/exampleauth/src/Auth/Source/UserPass.php @@ -46,14 +46,14 @@ public function __construct(array $info, array $config) foreach ($config as $userpass => $attributes) { if (!is_string($userpass)) { throw new Exception( - 'Invalid : for authentication source ' . $this->authId . ': ' . $userpass + 'Invalid : for authentication source ' . $this->authId . ': ' . $userpass, ); } $userpass = explode(':', $userpass, 2); if (count($userpass) !== 2) { throw new Exception( - 'Invalid : for authentication source ' . $this->authId . ': ' . $userpass[0] + 'Invalid : for authentication source ' . $this->authId . ': ' . $userpass[0], ); } $username = $userpass[0]; diff --git a/modules/exampleauth/src/Controller/ExampleAuth.php b/modules/exampleauth/src/Controller/ExampleAuth.php index 513140e0ad..102e5c92d3 100644 --- a/modules/exampleauth/src/Controller/ExampleAuth.php +++ b/modules/exampleauth/src/Controller/ExampleAuth.php @@ -46,7 +46,7 @@ class ExampleAuth */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { } diff --git a/modules/multiauth/src/Auth/Source/MultiAuth.php b/modules/multiauth/src/Auth/Source/MultiAuth.php index d7f7a948bb..c4cbac0b6f 100644 --- a/modules/multiauth/src/Auth/Source/MultiAuth.php +++ b/modules/multiauth/src/Auth/Source/MultiAuth.php @@ -121,7 +121,7 @@ public function authenticate(array &$state): void $number_of_sources = count($new_sources); if ($number_of_sources === 0) { throw new NoAuthnContextException( - 'No authentication sources exist for the requested AuthnContextClassRefs: ' . implode(', ', $refs) + 'No authentication sources exist for the requested AuthnContextClassRefs: ' . implode(', ', $refs), ); } elseif ($number_of_sources === 1) { MultiAuth::delegateAuthentication(array_key_first($new_sources), $state); @@ -176,7 +176,7 @@ public static function delegateAuthentication(string $authId, array $state): Run self::SESSION_SOURCE, $state[self::AUTHID], $authId, - Session::DATA_TIMEOUT_SESSION_END + Session::DATA_TIMEOUT_SESSION_END, ); return new RunnableResponse([self::class, 'doAuthentication'], [$as, $state]); diff --git a/modules/multiauth/src/Controller/DiscoController.php b/modules/multiauth/src/Controller/DiscoController.php index ff9efcbace..29cf07aaa1 100644 --- a/modules/multiauth/src/Controller/DiscoController.php +++ b/modules/multiauth/src/Controller/DiscoController.php @@ -47,7 +47,7 @@ class DiscoController */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { } diff --git a/modules/saml/src/Auth/Process/AttributeNameID.php b/modules/saml/src/Auth/Process/AttributeNameID.php index dd20bfa56d..abe7ebb504 100644 --- a/modules/saml/src/Auth/Process/AttributeNameID.php +++ b/modules/saml/src/Auth/Process/AttributeNameID.php @@ -62,14 +62,14 @@ protected function getValue(array &$state): ?string ) { Logger::warning( 'Missing attribute ' . var_export($this->identifyingAttribute, true) . - ' on user - not generating attribute NameID.' + ' on user - not generating attribute NameID.', ); return null; } if (count($state['Attributes'][$this->identifyingAttribute]) > 1) { Logger::warning( 'More than one value in attribute ' . var_export($this->identifyingAttribute, true) . - ' on user - not generating attribute NameID.' + ' on user - not generating attribute NameID.', ); return null; } @@ -80,7 +80,7 @@ protected function getValue(array &$state): ?string if (empty($value)) { Logger::warning( 'Empty value in attribute ' . var_export($this->identifyingAttribute, true) . - ' on user - not generating attribute NameID.' + ' on user - not generating attribute NameID.', ); return null; } diff --git a/modules/saml/src/Auth/Process/ExpectedAuthnContextClassRef.php b/modules/saml/src/Auth/Process/ExpectedAuthnContextClassRef.php index c318fa177a..05ded98294 100644 --- a/modules/saml/src/Auth/Process/ExpectedAuthnContextClassRef.php +++ b/modules/saml/src/Auth/Process/ExpectedAuthnContextClassRef.php @@ -58,10 +58,10 @@ public function __construct(array $config, $reserved) if (empty($config['accepted'])) { Logger::error( - 'ExpectedAuthnContextClassRef: Configuration error. There is no accepted AuthnContextClassRef.' + 'ExpectedAuthnContextClassRef: Configuration error. There is no accepted AuthnContextClassRef.', ); throw new Error\Exception( - 'ExpectedAuthnContextClassRef: Configuration error. There is no accepted AuthnContextClassRef.' + 'ExpectedAuthnContextClassRef: Configuration error. There is no accepted AuthnContextClassRef.', ); } $this->accepted = $config['accepted']; @@ -99,12 +99,12 @@ protected function unauthorized(array &$state): void { Logger::error( 'ExpectedAuthnContextClassRef: Invalid authentication context: ' . strval($this->AuthnContextClassRef) . - '. Accepted values are: ' . var_export($this->accepted, true) + '. Accepted values are: ' . var_export($this->accepted, true), ); $id = Auth\State::saveState($state, 'saml:ExpectedAuthnContextClassRef:unauthorized'); $url = Module::getModuleURL( - 'saml/sp/wrongAuthnContextClassRef' + 'saml/sp/wrongAuthnContextClassRef', ); $httpUtils = new Utils\HTTP(); diff --git a/modules/saml/src/Auth/Process/FilterScopes.php b/modules/saml/src/Auth/Process/FilterScopes.php index 8ddb0ddce5..4d4222c89a 100644 --- a/modules/saml/src/Auth/Process/FilterScopes.php +++ b/modules/saml/src/Auth/Process/FilterScopes.php @@ -21,7 +21,7 @@ class FilterScopes extends ProcessingFilter */ private array $scopedAttributes = [ 'eduPersonScopedAffiliation', - 'eduPersonPrincipalName' + 'eduPersonPrincipalName', ]; /** diff --git a/modules/saml/src/Auth/Process/PersistentNameID.php b/modules/saml/src/Auth/Process/PersistentNameID.php index 6a7e8c4668..e6f6158d78 100644 --- a/modules/saml/src/Auth/Process/PersistentNameID.php +++ b/modules/saml/src/Auth/Process/PersistentNameID.php @@ -73,14 +73,14 @@ protected function getValue(array &$state): ?string ) { Logger::warning( 'Missing attribute ' . var_export($this->identifyingAttribute, true) . - ' on user - not generating persistent NameID.' + ' on user - not generating persistent NameID.', ); return null; } if (count($state['Attributes'][$this->identifyingAttribute]) > 1) { Logger::warning( 'More than one value in attribute ' . var_export($this->identifyingAttribute, true) . - ' on user - not generating persistent NameID.' + ' on user - not generating persistent NameID.', ); return null; } @@ -91,7 +91,7 @@ protected function getValue(array &$state): ?string if (empty($uid)) { Logger::warning( 'Empty value in attribute ' . var_export($this->identifyingAttribute, true) . - ' on user - not generating persistent NameID.' + ' on user - not generating persistent NameID.', ); return null; } diff --git a/modules/saml/src/Auth/Process/PersistentNameID2TargetedID.php b/modules/saml/src/Auth/Process/PersistentNameID2TargetedID.php index 959e6c2482..03bbf0e397 100644 --- a/modules/saml/src/Auth/Process/PersistentNameID2TargetedID.php +++ b/modules/saml/src/Auth/Process/PersistentNameID2TargetedID.php @@ -65,7 +65,7 @@ public function process(array &$state): void { if (!isset($state['saml:NameID'][Constants::NAMEID_PERSISTENT])) { Logger::warning( - 'Unable to generate eduPersonTargetedID because no persistent NameID was available.' + 'Unable to generate eduPersonTargetedID because no persistent NameID was available.', ); return; } diff --git a/modules/saml/src/Auth/Process/SQLPersistentNameID.php b/modules/saml/src/Auth/Process/SQLPersistentNameID.php index 37b4579249..497bd5bdce 100644 --- a/modules/saml/src/Auth/Process/SQLPersistentNameID.php +++ b/modules/saml/src/Auth/Process/SQLPersistentNameID.php @@ -4,10 +4,11 @@ namespace SimpleSAML\Module\saml\Auth\Process; -use SAML2\Constants; +use SAML2\Constants as C; use SimpleSAML\Error; use SimpleSAML\Logger; use SimpleSAML\Module\saml\BaseNameIDGenerator; +use SimpleSAML\Module\saml\Error as SAMLError; use SimpleSAML\Module\saml\IdP\SQLNameID; /** @@ -66,7 +67,7 @@ public function __construct(array &$config, $reserved) { parent::__construct($config, $reserved); - $this->format = Constants::NAMEID_PERSISTENT; + $this->format = C::NAMEID_PERSISTENT; if (!isset($config['identifyingAttribute'])) { throw new Error\Exception("PersistentNameID: Missing required option 'identifyingAttribute'."); @@ -104,14 +105,14 @@ protected function getValue(array &$state): ?string if (!isset($state['saml:NameIDFormat']) && !$this->allowUnspecified) { Logger::debug( 'SQLPersistentNameID: Request did not specify persistent NameID format, ' . - 'not generating persistent NameID.' + 'not generating persistent NameID.', ); return null; } $validNameIdFormats = @array_filter([ $state['saml:NameIDFormat'], - $state['SPMetadata']['NameIDFormat'] + $state['SPMetadata']['NameIDFormat'], ]); if ( count($validNameIdFormats) @@ -120,7 +121,7 @@ protected function getValue(array &$state): ?string ) { Logger::debug( 'SQLPersistentNameID: SP expects different NameID format (' . - implode(', ', $validNameIdFormats) . '), not generating persistent NameID.' + implode(', ', $validNameIdFormats) . '), not generating persistent NameID.', ); return null; } @@ -143,7 +144,7 @@ protected function getValue(array &$state): ?string ) { Logger::warning( 'SQLPersistentNameID: Missing attribute ' . var_export($this->identifyingAttribute, true) . - ' on user - not generating persistent NameID.' + ' on user - not generating persistent NameID.', ); return null; } @@ -151,7 +152,7 @@ protected function getValue(array &$state): ?string Logger::warning( 'SQLPersistentNameID: More than one value in attribute ' . var_export($this->identifyingAttribute, true) . - ' on user - not generating persistent NameID.' + ' on user - not generating persistent NameID.', ); return null; } @@ -162,7 +163,7 @@ protected function getValue(array &$state): ?string if (empty($uid)) { Logger::warning( 'Empty value in attribute ' . var_export($this->identifyingAttribute, true) . - ' on user - not generating persistent NameID.' + ' on user - not generating persistent NameID.', ); return null; } @@ -171,25 +172,25 @@ protected function getValue(array &$state): ?string if ($value !== null) { Logger::debug( 'SQLPersistentNameID: Found persistent NameID ' . var_export($value, true) . ' for user ' . - var_export($uid, true) . '.' + var_export($uid, true) . '.', ); return $value; } if ((!isset($state['saml:AllowCreate']) || !$state['saml:AllowCreate']) && !$this->alwaysCreate) { Logger::warning( - 'SQLPersistentNameID: Did not find persistent NameID for user, and not allowed to create new NameID.' + 'SQLPersistentNameID: Did not find persistent NameID for user, and not allowed to create new NameID.', ); - throw new \SimpleSAML\Module\saml\Error( - Constants::STATUS_RESPONDER, - Constants::STATUS_INVALID_NAMEID_POLICY + throw new SAMLError( + C::STATUS_RESPONDER, + C::STATUS_INVALID_NAMEID_POLICY, ); } $value = bin2hex(openssl_random_pseudo_bytes(20)); Logger::debug( 'SQLPersistentNameID: Created persistent NameID ' . var_export($value, true) . ' for user ' . - var_export($uid, true) . '.' + var_export($uid, true) . '.', ); SQLNameID::add($idpEntityId, $spEntityId, $uid, $value, $this->storeConfig); diff --git a/modules/saml/src/Auth/Process/SubjectID.php b/modules/saml/src/Auth/Process/SubjectID.php index 9e0ccd41aa..93cfacd54e 100644 --- a/modules/saml/src/Auth/Process/SubjectID.php +++ b/modules/saml/src/Auth/Process/SubjectID.php @@ -138,12 +138,10 @@ protected function getIdentifyingAttribute(array $state): ?string !array_key_exists('Attributes', $state) || !array_key_exists($this->identifyingAttribute, $state['Attributes']) ) { - $this->logger::warning( - sprintf( - "saml:" . static::NAME . ": Missing attribute '%s', which is needed to generate the ID.", - $this->identifyingAttribute - ) - ); + $this->logger::warning(sprintf( + "saml:" . static::NAME . ": Missing attribute '%s', which is needed to generate the ID.", + $this->identifyingAttribute, + )); return null; } @@ -151,7 +149,7 @@ protected function getIdentifyingAttribute(array $state): ?string $userID = $state['Attributes'][$this->identifyingAttribute][0]; Assert::stringNotEmpty( $userID, - 'saml:' . static::NAME . ': \'identifyingAttribute\' cannot be an empty string.' + 'saml:' . static::NAME . ': \'identifyingAttribute\' cannot be an empty string.', ); return $userID; @@ -169,12 +167,10 @@ protected function getIdentifyingAttribute(array $state): ?string protected function getScopeAttribute(array $state): ?string { if (!array_key_exists('Attributes', $state) || !array_key_exists($this->scopeAttribute, $state['Attributes'])) { - $this->logger::warning( - sprintf( - "saml:" . static::NAME . ": Missing attribute '%s', which is needed to generate the ID.", - $this->scopeAttribute - ) - ); + $this->logger::warning(sprintf( + "saml:" . static::NAME . ": Missing attribute '%s', which is needed to generate the ID.", + $this->scopeAttribute, + )); return null; } @@ -192,7 +188,7 @@ protected function getScopeAttribute(array $state): ?string $scope, self::SCOPE_PATTERN, 'saml:' . static::NAME . ': \'scopeAttribute\' contains illegal characters.', - ProtocolViolationException::class + ProtocolViolationException::class, ); return $scope; } @@ -212,12 +208,12 @@ protected function validateGeneratedIdentifier(string $value): void $value, self::SPEC_PATTERN, 'saml:' . static::NAME . ': Generated ID \'' . $value . '\' contains illegal characters.', - ProtocolViolationException::class + ProtocolViolationException::class, ); if (preg_match(self::WARN_PATTERN, $value) === 0) { $this->logger::warning( - 'saml:' . static::NAME . ': Generated ID \'' . $value . '\' can hardly be considered globally unique.' + 'saml:' . static::NAME . ': Generated ID \'' . $value . '\' can hardly be considered globally unique.', ); } } diff --git a/modules/saml/src/Auth/Source/SP.php b/modules/saml/src/Auth/Source/SP.php index a3b6cda594..95813dd0f2 100644 --- a/modules/saml/src/Auth/Source/SP.php +++ b/modules/saml/src/Auth/Source/SP.php @@ -20,6 +20,7 @@ use SimpleSAML\Logger; use SimpleSAML\Metadata\MetaDataStorageHandler; use SimpleSAML\Module; +use SimpleSAML\Module\saml\Error\ProxyCountExceeded; use SimpleSAML\Session; use SimpleSAML\Store; use SimpleSAML\Store\StoreFactory; @@ -93,7 +94,7 @@ public function __construct(array $info, array $config) $config['entityid'] = $config['entityID']; $this->metadata = Configuration::loadFromArray( $config, - 'authsources[' . var_export($this->authId, true) . ']' + 'authsources[' . var_export($this->authId, true) . ']', ); $entityId = $this->metadata->getString('entityID'); @@ -101,7 +102,7 @@ public function __construct(array $info, array $config) Assert::maxLength( $entityId, Constants::SAML2INT_ENTITYID_MAX_LENGTH, - sprintf('The entityID cannot be longer than %d characters.', Constants::SAML2INT_ENTITYID_MAX_LENGTH) + sprintf('The entityID cannot be longer than %d characters.', Constants::SAML2INT_ENTITYID_MAX_LENGTH), ); Assert::notEq( $entityId, @@ -115,7 +116,7 @@ public function __construct(array $info, array $config) $this->disable_scoping = $this->metadata->getOptionalBoolean('disable_scoping', false); $this->passAuthnContextClassRef = $this->metadata->getOptionalBoolean( 'proxymode.passAuthnContextClassRef', - false + false, ); } @@ -196,12 +197,12 @@ public function getHostedMetadata(): array $metadata['OrganizationName'] = $org; $metadata['OrganizationDisplayName'] = $this->metadata->getOptionalLocalizedString( 'OrganizationDisplayName', - $org + $org, ); $metadata['OrganizationURL'] = $this->metadata->getOptionalLocalizedString('OrganizationURL', null); if ($metadata['OrganizationURL'] === null) { throw new Error\Exception( - 'If OrganizationName is set, OrganizationURL must also be set.' + 'If OrganizationName is set, OrganizationURL must also be set.', ); } } @@ -413,7 +414,7 @@ private function getSLOEndpoints(): array [ Constants::BINDING_HTTP_REDIRECT, Constants::BINDING_SOAP, - ] + ], ); $defaultLocation = Module::getModuleURL('saml/sp/saml2-logout.php/' . $this->getAuthId()); $location = $this->metadata->getOptionalString('SingleLogoutServiceLocation', $defaultLocation); @@ -444,7 +445,7 @@ private function startSSO2(Configuration $idpMetadata, array $state): void if (isset($state['saml:ProxyCount']) && $state['saml:ProxyCount'] < 0) { Auth\State::throwException( $state, - new Module\saml\Error\ProxyCountExceeded(Constants::STATUS_RESPONDER) + new ProxyCountExceeded(Constants::STATUS_RESPONDER), ); } @@ -496,7 +497,7 @@ private function startSSO2(Configuration $idpMetadata, array $state): void Constants::COMPARISON_MAXIMUM, Constants::COMPARISON_BETTER, ], - true + true, ) ) { // RequestedAuthnContext has been set by an SP behind the proxy so pass it to the upper IdP @@ -612,7 +613,7 @@ private function startSSO2(Configuration $idpMetadata, array $state): void $ar->setId($id); Logger::debug( - 'Sending SAML 2 AuthnRequest to ' . var_export($idpMetadata->getString('entityid'), true) + 'Sending SAML 2 AuthnRequest to ' . var_export($idpMetadata->getString('entityid'), true), ); // Select appropriate SSO endpoint @@ -622,7 +623,7 @@ private function startSSO2(Configuration $idpMetadata, array $state): void 'SingleSignOnService', [ Constants::BINDING_HOK_SSO, - ] + ], ); } elseif ($ar->getProtocolBinding() === Constants::BINDING_HTTP_ARTIFACT) { /** @var array $dst */ @@ -630,7 +631,7 @@ private function startSSO2(Configuration $idpMetadata, array $state): void 'SingleSignOnService', [ Constants::BINDING_HTTP_ARTIFACT, - ] + ], ); } else { /** @var array $dst */ @@ -639,7 +640,7 @@ private function startSSO2(Configuration $idpMetadata, array $state): void [ Constants::BINDING_HTTP_REDIRECT, Constants::BINDING_HTTP_POST, - ] + ], ); } $ar->setDestination($dst['Location']); @@ -720,7 +721,7 @@ private function startDisco(array $state): void $params = [ 'entityID' => $this->entityId, 'return' => $returnTo, - 'returnIDParam' => 'idpentityid' + 'returnIDParam' => 'idpentityid', ]; if (isset($state['saml:IDPList'])) { @@ -762,14 +763,14 @@ public function authenticate(array &$state): void if (empty($matchedEntities)) { // all requested IdPs are unknown throw new NoSupportedIDPException( - 'None of the IdPs requested are supported by this proxy.' + 'None of the IdPs requested are supported by this proxy.', ); } if (!is_null($idp) && !array_key_exists($idp, $matchedEntities)) { // the IdP is enforced but not in the IDPList throw new NoAvailableIDPException( - 'None of the IdPs requested are available to this proxy.' + 'None of the IdPs requested are available to this proxy.', ); } @@ -830,7 +831,7 @@ public function reauthenticate(array &$state): void if (empty($intersection)) { // all requested IdPs are unknown throw new NoSupportedIDPException( - 'None of the IdPs requested are supported by this proxy.' + 'None of the IdPs requested are supported by this proxy.', ); } @@ -842,7 +843,7 @@ public function reauthenticate(array &$state): void if (!is_null($this->idp) && !in_array($this->idp, $intersection, true)) { // an IdP is enforced but not requested throw new NoAvailableIDPException( - 'None of the IdPs requested are available to this proxy.' + 'None of the IdPs requested are available to this proxy.', ); } @@ -855,7 +856,7 @@ public function reauthenticate(array &$state): void "Reauthentication after logout is needed. The IdP '%s' is not in the IDPList " . "provided by the Service Provider '%s'.", $state['saml:sp:IdP'], - $state['core:SP'] + $state['core:SP'], )); $state['saml:sp:IdPMetadata'] = $this->getIdPMetadata($state['saml:sp:IdP']); @@ -880,7 +881,7 @@ public function reauthenticate(array &$state): void Logger::warning(sprintf( "Reauthentication requires change in AuthnContext from '%s' to '%s'.", $data['saml:sp:AuthnContext'], - $state['saml:RequestedAuthnContext']['AuthnContextClassRef'][0] + $state['saml:RequestedAuthnContext']['AuthnContextClassRef'][0], )); $state['saml:idp'] = $data['saml:sp:IdP']; $state['saml:sp:AuthId'] = $this->authId; @@ -918,7 +919,7 @@ public static function askForIdPChange(array &$state): void if (isset($state['isPassive']) && (bool) $state['isPassive']) { // passive request, we cannot authenticate the user throw new NoPassiveException( - Constants::STATUS_REQUESTER . ': Reauthentication required' + Constants::STATUS_REQUESTER . ': Reauthentication required', ); } @@ -952,7 +953,7 @@ public static function tryStepUpAuth(array &$state): void if (isset($state['isPassive']) && (bool) $state['isPassive']) { // passive request, we cannot authenticate the user throw new NoPassiveException( - Constants::STATUS_REQUESTER . ': Reauthentication required' + Constants::STATUS_REQUESTER . ': Reauthentication required', ); } @@ -1056,9 +1057,9 @@ public function startSLO2(array &$state): void 'SingleLogoutService', [ Constants::BINDING_HTTP_REDIRECT, - Constants::BINDING_HTTP_POST + Constants::BINDING_HTTP_POST, ], - false + false, ); if ($endpoint === false) { Logger::info('No logout endpoint for IdP ' . var_export($idp, true) . '.'); diff --git a/modules/saml/src/Controller/Disco.php b/modules/saml/src/Controller/Disco.php index 37ca8e2dcb..d3b9ed9d4f 100644 --- a/modules/saml/src/Controller/Disco.php +++ b/modules/saml/src/Controller/Disco.php @@ -25,7 +25,7 @@ class Disco * @param \SimpleSAML\Configuration $config The configuration to use by the controllers. */ public function __construct( - protected Configuration $config + protected Configuration $config, ) { } diff --git a/modules/saml/src/Controller/Metadata.php b/modules/saml/src/Controller/Metadata.php index acd6be1af2..ed4670babc 100644 --- a/modules/saml/src/Controller/Metadata.php +++ b/modules/saml/src/Controller/Metadata.php @@ -39,7 +39,7 @@ class Metadata * @param \SimpleSAML\Configuration $config The configuration to use by the controllers. */ public function __construct( - protected Configuration $config + protected Configuration $config, ) { $this->authUtils = new Utils\Auth(); $this->mdHandler = MetaDataStorageHandler::getMetadataHandler(); diff --git a/modules/saml/src/Controller/Proxy.php b/modules/saml/src/Controller/Proxy.php index df6a38ca65..9b726c907d 100644 --- a/modules/saml/src/Controller/Proxy.php +++ b/modules/saml/src/Controller/Proxy.php @@ -40,7 +40,7 @@ class Proxy * @param \SimpleSAML\Configuration $config The configuration to use by the controllers. */ public function __construct( - protected Configuration $config + protected Configuration $config, ) { } @@ -94,8 +94,8 @@ public function invalidSession(Request $request): Response $state, new NoAvailableIDP( Constants::STATUS_RESPONDER, - 'User refused to reauthenticate with any of the IdPs requested.' - ) + 'User refused to reauthenticate with any of the IdPs requested.', + ), ); } diff --git a/modules/saml/src/Controller/ServiceProvider.php b/modules/saml/src/Controller/ServiceProvider.php index 256e79c2ce..eb4654347f 100644 --- a/modules/saml/src/Controller/ServiceProvider.php +++ b/modules/saml/src/Controller/ServiceProvider.php @@ -70,7 +70,7 @@ class ServiceProvider */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { $this->authUtils = new Utils\Auth(); } @@ -236,7 +236,7 @@ public function assertionConsumerService(string $sourceId): RunnableResponse Logger::info(sprintf( '%s - %s', 'Duplicate SAML 2 response detected', - 'ignoring the response and redirecting the user to the correct page.' + 'ignoring the response and redirecting the user to the correct page.', )); if (isset($prevAuth['redirect'])) { return new RunnableResponse([$httpUtils, 'redirectTrustedURL'], [$prevAuth['redirect']]); @@ -274,7 +274,7 @@ public function assertionConsumerService(string $sourceId): RunnableResponse if ($state['saml:sp:AuthId'] !== $sourceId) { throw new Error\Exception( "The authentication source id in the URL doesn't match the authentication" - . " source that sent the request." + . " source that sent the request.", ); } @@ -285,7 +285,7 @@ public function assertionConsumerService(string $sourceId): RunnableResponse $idplist = $idpMetadata->getOptionalArrayize('IDPList', []); if (!in_array($state['ExpectedIssuer'], $idplist, true)) { Logger::warning( - 'The issuer of the response not match to the identity provider we sent the request to.' + 'The issuer of the response not match to the identity provider we sent the request to.', ); } } @@ -503,7 +503,7 @@ public function singleLogoutService(string $sourceId): RunnableResponse if (!$message->isSuccess()) { Logger::warning( - 'Unsuccessful logout. Status was: ' . Module\saml\Message::getResponseError($message) + 'Unsuccessful logout. Status was: ' . Module\saml\Message::getResponseError($message), ); } @@ -567,8 +567,8 @@ public function singleLogoutService(string $sourceId): RunnableResponse 'SingleLogoutService', [ Constants::BINDING_HTTP_REDIRECT, - Constants::BINDING_HTTP_POST - ] + Constants::BINDING_HTTP_POST, + ], ); if (!($binding instanceof SOAP)) { @@ -626,7 +626,7 @@ public function metadata(Request $request, string $sourceId): Response if (!($source instanceof SP)) { throw new Error\AuthSource( $sourceId, - 'The authentication source is not a SAML Service Provider.' + 'The authentication source is not a SAML Service Provider.', ); } diff --git a/modules/saml/src/Controller/SingleLogout.php b/modules/saml/src/Controller/SingleLogout.php index cebf195190..4c95a405c0 100644 --- a/modules/saml/src/Controller/SingleLogout.php +++ b/modules/saml/src/Controller/SingleLogout.php @@ -42,7 +42,7 @@ class SingleLogout * @param \SimpleSAML\Configuration $config The configuration to use by the controllers. */ public function __construct( - protected Configuration $config + protected Configuration $config, ) { $this->mdHandler = MetaDataStorageHandler::getMetadataHandler(); } @@ -92,11 +92,11 @@ public function singleLogout(Request $request): RunnableResponse if ($request->query->has('ReturnTo')) { return new RunnableResponse( [$idp, 'doLogoutRedirect'], - [$httpUtils->checkURLAllowed($request->query->get('ReturnTo'))] + [$httpUtils->checkURLAllowed($request->query->get('ReturnTo'))], ); } elseif ($request->request->has('ReturnTo')) { return $idp->doLogoutRedirect( - $httpUtils->checkURLAllowed($request->request->get('ReturnTo')) + $httpUtils->checkURLAllowed($request->request->get('ReturnTo')), ); } @@ -132,7 +132,7 @@ public function initSingleLogout(Request $request): RunnableResponse $httpUtils = new Utils\HTTP(); return new RunnableResponse( [$idp, 'doLogoutRedirect'], - [$httpUtils->checkURLAllowed($request->query->get('RelayState'))] + [$httpUtils->checkURLAllowed($request->query->get('RelayState'))], ); } } diff --git a/modules/saml/src/Controller/WebBrowserSingleSignOn.php b/modules/saml/src/Controller/WebBrowserSingleSignOn.php index 427f8d3b00..dfab3ec180 100644 --- a/modules/saml/src/Controller/WebBrowserSingleSignOn.php +++ b/modules/saml/src/Controller/WebBrowserSingleSignOn.php @@ -38,7 +38,7 @@ class WebBrowserSingleSignOn * @param \SimpleSAML\Configuration $config The configuration to use by the controllers. */ public function __construct( - protected Configuration $config + protected Configuration $config, ) { } diff --git a/modules/saml/src/Error.php b/modules/saml/src/Error.php index 77357dacb3..e026f14b9d 100644 --- a/modules/saml/src/Error.php +++ b/modules/saml/src/Error.php @@ -29,7 +29,7 @@ public function __construct( private string $status, private ?string $subStatus = null, private ?string $statusMessage = null, - Throwable $cause = null + Throwable $cause = null, ) { $st = self::shortStatus($status); if ($subStatus !== null) { @@ -94,7 +94,7 @@ public static function fromException(Throwable $e): \SimpleSAML\Error\Exception Constants::STATUS_RESPONDER, null, $e::class . ': ' . $e->getMessage(), - $e + $e, ); } @@ -123,7 +123,7 @@ public function toException(): \SimpleSAML\Error\Exception case Constants::STATUS_NO_PASSIVE: $e = new \SimpleSAML\Module\saml\Error\NoPassive( Constants::STATUS_RESPONDER, - $this->statusMessage + $this->statusMessage, ); break; } diff --git a/modules/saml/src/IdP/SAML2.php b/modules/saml/src/IdP/SAML2.php index 8bc4f6b388..ec1af79c80 100644 --- a/modules/saml/src/IdP/SAML2.php +++ b/modules/saml/src/IdP/SAML2.php @@ -62,7 +62,7 @@ public static function sendResponse(array $state): void $spEntityId = $spMetadata['entityid']; $spMetadata = Configuration::loadFromArray( $spMetadata, - '$metadata[' . var_export($spEntityId, true) . ']' + '$metadata[' . var_export($spEntityId, true) . ']', ); Logger::info('Sending SAML 2.0 Response to ' . var_export($spEntityId, true)); @@ -138,7 +138,7 @@ public static function handleAuthError(Error\Exception $exception, array $state) $spEntityId = $spMetadata['entityid']; $spMetadata = Configuration::loadFromArray( $spMetadata, - '$metadata[' . var_export($spEntityId, true) . ']' + '$metadata[' . var_export($spEntityId, true) . ']', ); $requestId = $state['saml:RequestId']; @@ -201,7 +201,7 @@ private static function getAssertionConsumerService( string $AssertionConsumerServiceURL = null, string $ProtocolBinding = null, int $AssertionConsumerServiceIndex = null, - bool $authnRequestSigned = false + bool $authnRequestSigned = false, ): ?array { /* We want to pick the best matching endpoint in the case where for example * only the ProtocolBinding is given. We therefore pick endpoints with the @@ -258,7 +258,7 @@ private static function getAssertionConsumerService( if ($authnRequestSigned === true) { $skipEndpointValidationWhenSigned = $spMetadata->getOptionalValue( 'skipEndpointValidationWhenSigned', - false + false, ); if (is_bool($skipEndpointValidationWhenSigned) === true) { $skipEndpointValidation = $skipEndpointValidationWhenSigned; @@ -273,7 +273,7 @@ private static function getAssertionConsumerService( if (($AssertionConsumerServiceURL !== null) && ($skipEndpointValidation === true)) { Logger::info( 'AssertionConsumerService specified in AuthnRequest not in metadata, ' . - 'using anyway because AuthnRequest signed and skipEndpointValidationWhenSigned was true' + 'using anyway because AuthnRequest signed and skipEndpointValidationWhenSigned was true', ); return ['Location' => $AssertionConsumerServiceURL, 'Binding' => $ProtocolBinding]; } @@ -287,7 +287,7 @@ private static function getAssertionConsumerService( } if ($AssertionConsumerServiceIndex !== null) { Logger::warning( - 'AssertionConsumerServiceIndex: ' . var_export($AssertionConsumerServiceIndex, true) + 'AssertionConsumerServiceIndex: ' . var_export($AssertionConsumerServiceIndex, true), ); } @@ -381,7 +381,7 @@ public static function receiveAuthnRequest(IdP $idp): void $idpInit = true; Logger::info( - 'SAML2.0 - IdP.SSOService: IdP initiated authentication: ' . var_export($spEntityId, true) + 'SAML2.0 - IdP.SSOService: IdP initiated authentication: ' . var_export($spEntityId, true), ); } else { try { @@ -393,7 +393,7 @@ public static function receiveAuthnRequest(IdP $idp): void if (!($request instanceof AuthnRequest)) { throw new Error\BadRequest( - "Message received on authentication request endpoint wasn't an authentication request." + "Message received on authentication request endpoint wasn't an authentication request.", ); } @@ -404,7 +404,7 @@ public static function receiveAuthnRequest(IdP $idp): void $issuer = $request->getIssuer(); if ($issuer === null) { throw new Error\BadRequest( - 'Received message on authentication request endpoint without issuer.' + 'Received message on authentication request endpoint without issuer.', ); } $spEntityId = $issuer->getValue(); @@ -444,7 +444,7 @@ public static function receiveAuthnRequest(IdP $idp): void $idpInit = false; Logger::info( - 'SAML2.0 - IdP.SSOService: incoming authentication request: ' . var_export($spEntityId, true) + 'SAML2.0 - IdP.SSOService: incoming authentication request: ' . var_export($spEntityId, true), ); } @@ -463,7 +463,7 @@ public static function receiveAuthnRequest(IdP $idp): void $consumerURL, $protocolBinding, $consumerIndex, - $authnRequestSigned + $authnRequestSigned, ); if ($acsEndpoint === null) { throw new Exception('Unable to use any of the ACS endpoints found for SP \'' . $spEntityId . '\''); @@ -492,14 +492,14 @@ public static function receiveAuthnRequest(IdP $idp): void $sessionLostURL = $httpUtils->addURLParameters( $httpUtils->getSelfURLNoQuery(), - $sessionLostParams + $sessionLostParams, ); $state = [ 'Responder' => ['\SimpleSAML\Module\saml\IdP\SAML2', 'sendResponse'], Auth\State::EXCEPTION_HANDLER_FUNC => [ '\SimpleSAML\Module\saml\IdP\SAML2', - 'handleAuthError' + 'handleAuthError', ], Auth\State::RESTART => $sessionLostURL, @@ -550,8 +550,8 @@ public static function sendLogoutRequest(IdP $idp, array $association, string $r 'SingleLogoutService', [ Constants::BINDING_HTTP_REDIRECT, - Constants::BINDING_HTTP_POST - ] + Constants::BINDING_HTTP_POST, + ], ); $binding = Binding::getBinding($dst['Binding']); $lr = self::buildLogoutRequest($idpMetadata, $spMetadata, $association, $relayState); @@ -598,7 +598,7 @@ public static function sendLogoutResponse(IdP $idp, array $state): void Stats::log('saml:idp:LogoutResponse:sent', [ 'spEntityID' => $spEntityId, 'idpEntityID' => $idpMetadata->getString('entityid'), - 'partial' => $partial + 'partial' => $partial, ]); /** @var array $dst */ @@ -606,8 +606,8 @@ public static function sendLogoutResponse(IdP $idp, array $state): void 'SingleLogoutService', [ Constants::BINDING_HTTP_REDIRECT, - Constants::BINDING_HTTP_POST - ] + Constants::BINDING_HTTP_POST, + ], ); $binding = Binding::getBinding($dst['Binding']); if (isset($dst['ResponseLocation'])) { @@ -713,7 +713,7 @@ public static function getLogoutURL(IdP $idp, array $association, string $relayS $bindings = [ Constants::BINDING_HTTP_REDIRECT, - Constants::BINDING_HTTP_POST + Constants::BINDING_HTTP_POST, ]; /** @var array $dst */ @@ -878,7 +878,7 @@ public static function getHostedMetadata(string $entityid, MetaDataStorageHandle 'signing' => true, 'encryption' => false, 'X509Certificate' => $httpsCert['certData'], - 'prefix' => 'https.' + 'prefix' => 'https.', ]; } $metadata['keys'] = $keys; @@ -900,7 +900,7 @@ public static function getHostedMetadata(string $entityid, MetaDataStorageHandle 'hoksso:ProtocolBinding' => Constants::BINDING_HTTP_REDIRECT, 'Binding' => Constants::BINDING_HOK_SSO, 'Location' => Module::getModuleURL('saml/idp/singleSignOnService'), - ] + ], ); } @@ -918,7 +918,7 @@ public static function getHostedMetadata(string $entityid, MetaDataStorageHandle $metadata['OrganizationName'] = $config->getLocalizedString('OrganizationName'); $metadata['OrganizationDisplayName'] = $config->getOptionalLocalizedString( 'OrganizationDisplayName', - $metadata['OrganizationName'] + $metadata['OrganizationName'], ); if (!$config->hasValue('OrganizationURL')) { @@ -1004,7 +1004,7 @@ public static function getHostedMetadata(string $entityid, MetaDataStorageHandle private static function encodeAttributes( Configuration $idpMetadata, Configuration $spMetadata, - array $attributes + array $attributes, ): array { $defaultEncoding = 'string'; @@ -1076,7 +1076,7 @@ private static function encodeAttributes( */ private static function getAttributeNameFormat( Configuration $idpMetadata, - Configuration $spMetadata + Configuration $spMetadata, ): string { // try SP metadata first $attributeNameFormat = $spMetadata->getOptionalString('attributes.NameFormat', null); @@ -1117,7 +1117,7 @@ private static function getAttributeNameFormat( private static function buildAssertion( Configuration $idpMetadata, Configuration $spMetadata, - array &$state + array &$state, ): Assertion { Assert::notNull($state['Attributes']); Assert::notNull($state['saml:ConsumerURL']); @@ -1217,17 +1217,17 @@ private static function buildAssertion( } else { throw new Error\Exception( 'Error creating HoK assertion: No valid client certificate provided during ' - . 'TLS handshake with IdP' + . 'TLS handshake with IdP', ); } } else { throw new Error\Exception( - 'Error creating HoK assertion: No client certificate provided during TLS handshake with IdP' + 'Error creating HoK assertion: No client certificate provided during TLS handshake with IdP', ); } } else { throw new Error\Exception( - 'Error creating HoK assertion: No HTTPS connection to IdP, but required for Holder-of-Key SSO' + 'Error creating HoK assertion: No HTTPS connection to IdP, but required for Holder-of-Key SSO', ); } } else { @@ -1266,7 +1266,7 @@ private static function buildAssertion( private static function generateNameId( Configuration $idpMetadata, Configuration $spMetadata, - array $state + array $state, ): NameID { Logger::debug('Determining value for NameID'); $nameIdFormat = null; @@ -1280,7 +1280,7 @@ private static function generateNameId( $nameIdFormat = current($spMetadata->getOptionalArrayizeString('NameIDFormat', [])); if ($nameIdFormat === false) { $nameIdFormat = current( - $idpMetadata->getOptionalArrayizeString('NameIDFormat', [Constants::NAMEID_TRANSIENT]) + $idpMetadata->getOptionalArrayizeString('NameIDFormat', [Constants::NAMEID_TRANSIENT]), ); } } @@ -1294,7 +1294,7 @@ private static function generateNameId( if ($nameIdFormat !== Constants::NAMEID_TRANSIENT) { Logger::notice(sprintf( 'Requested NameID of format %s, but can only provide transient', - var_export($nameIdFormat, true) + var_export($nameIdFormat, true), )); $nameIdFormat = Constants::NAMEID_TRANSIENT; } @@ -1311,7 +1311,7 @@ private static function generateNameId( 'Setting NameID to (%s, %s, %s)', var_export($nameIdFormat, true), var_export($nameIdValue, true), - var_export($spNameQualifier, true) + var_export($spNameQualifier, true), )); $nameId = new NameID(); $nameId->setFormat($nameIdFormat); @@ -1338,7 +1338,7 @@ private static function generateNameId( private static function encryptAssertion( Configuration $idpMetadata, Configuration $spMetadata, - Assertion $assertion + Assertion $assertion, ) { $encryptAssertion = $spMetadata->getOptionalBoolean('assertion.encryption', null); if ($encryptAssertion === null) { @@ -1381,7 +1381,7 @@ private static function encryptAssertion( throw new Error\ConfigurationError( 'Missing encryption key for entity `' . $spMetadata->getString('entityid') . '`', $spMetadata->getString('metadata-set') . '.php', - null + null, ); } } @@ -1406,7 +1406,7 @@ private static function buildLogoutRequest( Configuration $idpMetadata, Configuration $spMetadata, array $association, - string $relayState = null + string $relayState = null, ): LogoutRequest { $lr = Message::buildLogoutRequest($idpMetadata, $spMetadata); $lr->setRelayState($relayState); @@ -1443,7 +1443,7 @@ private static function buildLogoutRequest( private static function buildResponse( Configuration $idpMetadata, Configuration $spMetadata, - string $consumerURL + string $consumerURL, ): Response { $signResponse = $spMetadata->getOptionalBoolean('saml20.sign.response', null); if ($signResponse === null) { diff --git a/modules/saml/src/IdP/SQLNameID.php b/modules/saml/src/IdP/SQLNameID.php index cd418f0816..7155c13150 100644 --- a/modules/saml/src/IdP/SQLNameID.php +++ b/modules/saml/src/IdP/SQLNameID.php @@ -187,7 +187,7 @@ public static function add( string $spEntityId, string $user, string $value, - array $config = [] + array $config = [], ): void { $params = [ @@ -216,7 +216,7 @@ public static function get( string $idpEntityId, string $spEntityId, string $user, - array $config = [] + array $config = [], ): ?string { $params = [ '_idp' => $idpEntityId, @@ -250,7 +250,7 @@ public static function delete( string $idpEntityId, string $spEntityId, string $user, - array $config = [] + array $config = [], ): void { $params = [ '_idp' => $idpEntityId, diff --git a/modules/saml/src/Message.php b/modules/saml/src/Message.php index 62d13e9251..3c4d1856c0 100644 --- a/modules/saml/src/Message.php +++ b/modules/saml/src/Message.php @@ -41,7 +41,7 @@ class Message public static function addSign( Configuration $srcMetadata, Configuration $dstMetadata, - SignedElement $element + SignedElement $element, ): void { $dstPrivateKey = $dstMetadata->getOptionalString('signature.privatekey', null); $cryptoUtils = new Utils\Crypto(); @@ -93,7 +93,7 @@ public static function addSign( private static function addRedirectSign( Configuration $srcMetadata, Configuration $dstMetadata, - \SAML2\Message $message + \SAML2\Message $message, ): void { $signingEnabled = null; if ($message instanceof LogoutRequest || $message instanceof LogoutResponse) { @@ -152,7 +152,7 @@ public static function checkSign(Configuration $srcMetadata, SignedElement $elem } else { throw new SSP_Error\Exception( 'Missing certificate in metadata for ' . - var_export($srcMetadata->getString('entityid'), true) + var_export($srcMetadata->getString('entityid'), true), ); } @@ -199,7 +199,7 @@ public static function checkSign(Configuration $srcMetadata, SignedElement $elem public static function validateMessage( Configuration $srcMetadata, Configuration $dstMetadata, - \SAML2\Message $message + \SAML2\Message $message, ): bool { $enabled = null; if ($message instanceof LogoutRequest || $message instanceof LogoutResponse) { @@ -232,7 +232,7 @@ public static function validateMessage( return false; } elseif (!self::checkSign($srcMetadata, $message)) { throw new SSP_Error\Exception( - 'Validation of received messages enabled, but no signature found on message.' + 'Validation of received messages enabled, but no signature found on message.', ); } return true; @@ -252,7 +252,7 @@ public static function validateMessage( public static function getDecryptionKeys( Configuration $srcMetadata, Configuration $dstMetadata, - $encryptionMethod = null + $encryptionMethod = null, ): array { $sharedKey = $srcMetadata->getOptionalString('sharedkey', null); if ($sharedKey !== null) { @@ -320,7 +320,7 @@ public static function getDecryptionKeys( */ public static function getBlacklistedAlgorithms( Configuration $srcMetadata, - Configuration $dstMetadata + Configuration $dstMetadata, ): array { $blacklist = $srcMetadata->getOptionalArray('encryption.blacklisted-algorithms', null); if ($blacklist === null) { @@ -346,7 +346,7 @@ public static function getBlacklistedAlgorithms( private static function decryptAssertion( Configuration $srcMetadata, Configuration $dstMetadata, - Assertion|EncryptedAssertion $assertion + Assertion|EncryptedAssertion $assertion, ): Assertion { if ($assertion instanceof Assertion) { $encryptAssertion = $srcMetadata->getOptionalBoolean('assertion.encryption', null); @@ -408,7 +408,7 @@ private static function decryptAssertion( private static function decryptAttributes( Configuration $srcMetadata, Configuration $dstMetadata, - Assertion &$assertion + Assertion &$assertion, ): void { if (!$assertion->hasEncryptedAttributes()) { return; @@ -462,7 +462,7 @@ public static function getResponseError(StatusResponse $response): \SimpleSAML\M */ public static function buildAuthnRequest( Configuration $spMetadata, - Configuration $idpMetadata + Configuration $idpMetadata, ): AuthnRequest { $ar = new AuthnRequest(); @@ -496,10 +496,10 @@ public static function buildAuthnRequest( $issuer->setValue($spMetadata->getString('entityID')); $ar->setIssuer($issuer); $ar->setAssertionConsumerServiceIndex( - $spMetadata->getOptionalInteger('AssertionConsumerServiceIndex', null) + $spMetadata->getOptionalInteger('AssertionConsumerServiceIndex', null), ); $ar->setAttributeConsumingServiceIndex( - $spMetadata->getOptionalInteger('AttributeConsumingServiceIndex', null) + $spMetadata->getOptionalInteger('AttributeConsumingServiceIndex', null), ); if ($spMetadata->hasValue('AuthnContextClassRef')) { @@ -528,7 +528,7 @@ public static function buildAuthnRequest( */ public static function buildLogoutRequest( Configuration $srcMetadata, - Configuration $dstMetadata + Configuration $dstMetadata, ): LogoutRequest { $lr = new LogoutRequest(); $issuer = new Issuer(); @@ -551,7 +551,7 @@ public static function buildLogoutRequest( */ public static function buildLogoutResponse( Configuration $srcMetadata, - Configuration $dstMetadata + Configuration $dstMetadata, ): LogoutResponse { $lr = new LogoutResponse(); $issuer = new Issuer(); @@ -582,7 +582,7 @@ public static function buildLogoutResponse( public static function processResponse( Configuration $spMetadata, Configuration $idpMetadata, - Response $response + Response $response, ): array { if (!$response->isSuccess()) { throw self::getResponseError($response); @@ -638,7 +638,7 @@ private static function processAssertion( Configuration $idpMetadata, Response $response, Assertion|EncryptedAssertion $assertion, - bool $responseSigned + bool $responseSigned, ): Assertion { $assertion = self::decryptAssertion($idpMetadata, $spMetadata, $assertion); self::decryptAttributes($idpMetadata, $spMetadata, $assertion); @@ -666,19 +666,19 @@ private static function processAssertion( $notBefore = $assertion->getNotBefore(); if ($notBefore !== null && $notBefore > time() + $allowed_clock_skew) { throw new SSP_Error\Exception( - 'Received an assertion that is valid in the future. Check clock synchronization on IdP and SP.' + 'Received an assertion that is valid in the future. Check clock synchronization on IdP and SP.', ); } $notOnOrAfter = $assertion->getNotOnOrAfter(); if ($notOnOrAfter !== null && $notOnOrAfter <= time() - $allowed_clock_skew) { throw new SSP_Error\Exception( - 'Received an assertion that has expired. Check clock synchronization on IdP and SP.' + 'Received an assertion that has expired. Check clock synchronization on IdP and SP.', ); } $sessionNotOnOrAfter = $assertion->getSessionNotOnOrAfter(); if ($sessionNotOnOrAfter !== null && $sessionNotOnOrAfter <= time() - $allowed_clock_skew) { throw new SSP_Error\Exception( - 'Received an assertion with a session that has expired. Check clock synchronization on IdP and SP.' + 'Received an assertion with a session that has expired. Check clock synchronization on IdP and SP.', ); } $validAudiences = $assertion->getValidAudiences(); @@ -688,7 +688,7 @@ private static function processAssertion( $candidates = '[' . implode('], [', $validAudiences) . ']'; throw new SSP_Error\Exception( 'This SP [' . $spEntityId . - '] is not a valid audience for the assertion. Candidates were: ' . $candidates + '] is not a valid audience for the assertion. Candidates were: ' . $candidates, ); } } diff --git a/modules/saml/src/SP/LogoutStore.php b/modules/saml/src/SP/LogoutStore.php index b543f90c73..6b8d151138 100644 --- a/modules/saml/src/SP/LogoutStore.php +++ b/modules/saml/src/SP/LogoutStore.php @@ -43,7 +43,7 @@ private static function createLogoutTable(Store\SQLStore $store): void 'ALTER TABLE ' . $store->prefix . '_saml_LogoutStore DROP CONSTRAINT IF EXISTS ' . $store->prefix . '_saml_LogoutStore___authSource__nameId__sessionIndex_key', 'ALTER TABLE ' . $store->prefix . '_saml_LogoutStore ADD PRIMARY KEY ' . - '(_authSource, _nameId, _sessionIndex)' + '(_authSource, _nameId, _sessionIndex)', ]; break; case 'sqlsrv': @@ -56,7 +56,7 @@ private static function createLogoutTable(Store\SQLStore $store): void 'FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME=' . $store->prefix . '_saml_LogoutStore ' . 'AND CONSTRAINT_NAME LIKE \'UQ__%"\'', 'ALTER TABLE ' . $store->prefix . '_saml_LogoutStore ADD CONSTRAINT _authSource ' . - 'PRIMARY KEY CLUSTERED (_authSource, _nameId, _sessionIndex)' + 'PRIMARY KEY CLUSTERED (_authSource, _nameId, _sessionIndex)', ]; break; case 'sqlite': @@ -81,7 +81,7 @@ private static function createLogoutTable(Store\SQLStore $store): void 'CREATE INDEX ' . $store->prefix . '_saml_LogoutStore_expire ON ' . $store->prefix . '_saml_LogoutStore (_expire)', 'CREATE INDEX ' . $store->prefix . '_saml_LogoutStore_nameId ON ' . - $store->prefix . '_saml_LogoutStore (_authSource, _nameId)' + $store->prefix . '_saml_LogoutStore (_authSource, _nameId)', ]; break; case 'mysql': @@ -89,7 +89,7 @@ private static function createLogoutTable(Store\SQLStore $store): void $update = [ 'ALTER TABLE ' . $store->prefix . '_saml_LogoutStore DROP INDEX _authSource', 'ALTER TABLE ' . $store->prefix . '_saml_LogoutStore ADD PRIMARY KEY ' . - '(_authSource(191), _nameId, _sessionIndex)' + '(_authSource(191), _nameId, _sessionIndex)', ]; break; default: @@ -97,7 +97,7 @@ private static function createLogoutTable(Store\SQLStore $store): void $update = [ 'ALTER TABLE ' . $store->prefix . '_saml_LogoutStore DROP INDEX _authSource', 'ALTER TABLE ' . $store->prefix . '_saml_LogoutStore ADD PRIMARY KEY ' . - '(_authSource, _nameId, _sessionIndex)' + '(_authSource, _nameId, _sessionIndex)', ]; break; } @@ -115,7 +115,7 @@ private static function createLogoutTable(Store\SQLStore $store): void } elseif ($tableVer < 4 && $tableVer > 0) { throw new Exception( 'No upgrade path available. Please migrate to the latest 1.18+ ' - . 'version of SimpleSAMLphp first before upgrading to 2.x.' + . 'version of SimpleSAMLphp first before upgrading to 2.x.', ); } @@ -175,7 +175,7 @@ private static function addSessionSQL( string $nameId, string $sessionIndex, int $expire, - string $sessionId + string $sessionId, ): void { self::createLogoutTable($store); @@ -193,7 +193,7 @@ private static function addSessionSQL( $store->insertOrUpdate( $store->prefix . '_saml_LogoutStore', ['_authSource', '_nameId', '_sessionIndex'], - $data + $data, ); } @@ -243,7 +243,7 @@ private static function getSessionsSQL(Store\SQLStore $store, string $authId, st private static function getSessionsStore( StoreInterface $store, string $nameId, - array $sessionIndexes + array $sessionIndexes, ): array { $res = []; foreach ($sessionIndexes as $sessionIndex) { @@ -379,13 +379,13 @@ public static function logoutSessions(string $authId, NameID $nameId, array $ses if (!$session->isValid($authId)) { Logger::info( - 'saml.LogoutStore: Skipping logout of session because it isn\'t authenticated.' + 'saml.LogoutStore: Skipping logout of session because it isn\'t authenticated.', ); continue; } Logger::info( - 'saml.LogoutStore: Logging out of session with trackId [' . $session->getTrackID() . '].' + 'saml.LogoutStore: Logging out of session with trackId [' . $session->getTrackID() . '].', ); $session->doLogout($authId); $numLoggedOut += 1; diff --git a/psalm.xml b/psalm.xml index 45320f01ce..de26cb641f 100644 --- a/psalm.xml +++ b/psalm.xml @@ -21,6 +21,9 @@ + + + diff --git a/public/_include.php b/public/_include.php index 6796668b09..0b2dba0128 100644 --- a/public/_include.php +++ b/public/_include.php @@ -24,7 +24,7 @@ Configuration::getInstance(); } catch (Exception $e) { throw new Error\CriticalConfigurationError( - $e->getMessage() + $e->getMessage(), ); } diff --git a/src/SimpleSAML/Auth/AuthenticationFactory.php b/src/SimpleSAML/Auth/AuthenticationFactory.php index 2266ef17f1..86a33787e3 100644 --- a/src/SimpleSAML/Auth/AuthenticationFactory.php +++ b/src/SimpleSAML/Auth/AuthenticationFactory.php @@ -18,7 +18,7 @@ class AuthenticationFactory */ public function __construct( protected Configuration $config, - protected Session $session + protected Session $session, ) { } diff --git a/src/SimpleSAML/Auth/ProcessingChain.php b/src/SimpleSAML/Auth/ProcessingChain.php index cebc80c26a..4a51a1a153 100644 --- a/src/SimpleSAML/Auth/ProcessingChain.php +++ b/src/SimpleSAML/Auth/ProcessingChain.php @@ -138,7 +138,7 @@ private static function parseFilterList(array $filterSrc): array if (!is_array($filter)) { throw new Exception( "Invalid authentication processing filter configuration: " . - "One of the filters wasn't a string or an array." + "One of the filters wasn't a string or an array.", ); } @@ -166,7 +166,7 @@ private static function parseFilter(array $config, int $priority): ProcessingFil $className = Module::resolveClass( $config['class'], 'Auth\Process', - '\SimpleSAML\Auth\ProcessingFilter' + '\SimpleSAML\Auth\ProcessingFilter', ); $config['%priority'] = $priority; unset($config['class']); diff --git a/src/SimpleSAML/Auth/ProcessingFilter.php b/src/SimpleSAML/Auth/ProcessingFilter.php index 81baf71c0a..e920a68d62 100644 --- a/src/SimpleSAML/Auth/ProcessingFilter.php +++ b/src/SimpleSAML/Auth/ProcessingFilter.php @@ -75,7 +75,7 @@ public function checkPrecondition(array &$state): bool { $function = /** @return bool */ function ( array &$attributes, - array &$state + array &$state, ) { return eval($this->precondition); }; diff --git a/src/SimpleSAML/Auth/Simple.php b/src/SimpleSAML/Auth/Simple.php index 8275444934..d42c47e3d3 100644 --- a/src/SimpleSAML/Auth/Simple.php +++ b/src/SimpleSAML/Auth/Simple.php @@ -36,7 +36,7 @@ class Simple public function __construct( protected string $authSource, Configuration $config = null, - Session $session = null + Session $session = null, ) { if ($config === null) { $config = Configuration::getInstance(); @@ -380,7 +380,7 @@ protected function getProcessedURL(?string $url = null): string $base = trim($this->app_config->getOptionalString( 'baseURL', - $scheme . '://' . $host . $port + $scheme . '://' . $host . $port, ), '/'); return $base . $path . ($query ? '?' . $query : '') . ($fragment ? '#' . $fragment : ''); } diff --git a/src/SimpleSAML/Auth/Source.php b/src/SimpleSAML/Auth/Source.php index ef8e54f29e..81af7a2842 100644 --- a/src/SimpleSAML/Auth/Source.php +++ b/src/SimpleSAML/Auth/Source.php @@ -174,8 +174,8 @@ public function initLogin(string|array $return, ?string $errorURL = null, array '\SimpleSAML\Auth\Source.id' => $this->authId, '\SimpleSAML\Auth\Source.Return' => $return, '\SimpleSAML\Auth\Source.ErrorURL' => $errorURL, - 'LoginCompletedHandler' => [get_class(), 'loginCompleted'], - 'LogoutCallback' => [get_class(), 'logoutCallback'], + 'LoginCompletedHandler' => [static::class, 'loginCompleted'], + 'LogoutCallback' => [static::class, 'logoutCallback'], 'LogoutCallbackState' => [ '\SimpleSAML\Auth\Source.logoutSource' => $this->authId, ], @@ -302,7 +302,7 @@ private static function parseAuthSource(string $authId, array $config): Source $factoryClass = Module::resolveClass( $id, 'Auth\Source\Factory', - '\SimpleSAML\Auth\SourceFactory' + '\SimpleSAML\Auth\SourceFactory', ); /** @var SourceFactory $factory */ @@ -346,8 +346,7 @@ public static function getById(string $authId, ?string $type = null): ?Source if ($authConfig === null) { if ($type !== null) { throw new Error\Exception( - 'No authentication source with id ' . - var_export($authId, true) . ' found.' + 'No authentication source with id ' . var_export($authId, true) . ' found.', ); } return null; @@ -363,7 +362,7 @@ public static function getById(string $authId, ?string $type = null): ?Source throw new Error\Exception( 'Invalid type of authentication source ' . var_export($authId, true) . '. Was ' . var_export(get_class($ret), true) . - ', should be ' . var_export($type, true) . '.' + ', should be ' . var_export($type, true) . '.', ); } @@ -382,8 +381,7 @@ public static function logoutCallback(array $state): void $session = Session::getSessionFromRequest(); if (!$session->isValid($source)) { Logger::warning( - 'Received logout from an invalid authentication source ' . - var_export($source, true) + 'Received logout from an invalid authentication source ' . var_export($source, true), ); return; @@ -430,7 +428,7 @@ protected function addLogoutCallback(string $assoc, array $state): void '\SimpleSAML\Auth\Source.LogoutCallbacks', $id, $data, - Session::DATA_TIMEOUT_SESSION_END + Session::DATA_TIMEOUT_SESSION_END, ); } @@ -497,7 +495,7 @@ protected static function validateSource(array $source, string $id): void if (!array_key_exists(0, $source) || !is_string($source[0])) { throw new \Exception( 'Invalid authentication source \'' . $id . - '\': First element must be a string which identifies the authentication source.' + '\': First element must be a string which identifies the authentication source.', ); } } diff --git a/src/SimpleSAML/Auth/State.php b/src/SimpleSAML/Auth/State.php index af88a6a29d..814b4394b6 100644 --- a/src/SimpleSAML/Auth/State.php +++ b/src/SimpleSAML/Auth/State.php @@ -128,7 +128,7 @@ public static function getPersistentAuthData(array $state): array 'LogoutState', 'AuthInstant', 'RememberMe', - 'saml:sp:NameID' + 'saml:sp:NameID', ]; foreach ($mandatory as $key) { if (isset($state[$key])) { @@ -366,7 +366,7 @@ public static function throwException(array $state, Error\Exception $exception): // Redirect to the exception handler $httpUtils->redirectTrustedURL( $state[self::EXCEPTION_HANDLER_URL], - [self::EXCEPTION_PARAM => $id] + [self::EXCEPTION_PARAM => $id], ); } elseif (array_key_exists(self::EXCEPTION_HANDLER_FUNC, $state)) { // Call the exception handler diff --git a/src/SimpleSAML/Command/RouterDebugCommand.php b/src/SimpleSAML/Command/RouterDebugCommand.php index 0d26145dbb..34110908c8 100644 --- a/src/SimpleSAML/Command/RouterDebugCommand.php +++ b/src/SimpleSAML/Command/RouterDebugCommand.php @@ -26,7 +26,7 @@ class RouterDebugCommand extends Command * @throws \Symfony\Component\Console\Exception\LogicException When the command name is empty */ public function __construct( - protected RouterInterface $router + protected RouterInterface $router, ) { parent::__construct(); } @@ -43,7 +43,7 @@ protected function configure(): void The %command.name% displays the configured routes for a module: php %command.full_name% -EOF +EOF, ) ; } diff --git a/src/SimpleSAML/Command/UnusedTranslatableStringsCommand.php b/src/SimpleSAML/Command/UnusedTranslatableStringsCommand.php index e971098aae..0fbca29db1 100644 --- a/src/SimpleSAML/Command/UnusedTranslatableStringsCommand.php +++ b/src/SimpleSAML/Command/UnusedTranslatableStringsCommand.php @@ -45,7 +45,7 @@ protected function configure(): void 'logging.handler' => ArrayLogger::class, ]), 'config.php', - 'simplesaml' + 'simplesaml', ); $this->setDescription('Generates a list of translations that are no longer in used in PHP or Twig files'); diff --git a/src/SimpleSAML/Command/UpdateTranslatableStringsCommand.php b/src/SimpleSAML/Command/UpdateTranslatableStringsCommand.php index 24c44e8415..67af854b27 100644 --- a/src/SimpleSAML/Command/UpdateTranslatableStringsCommand.php +++ b/src/SimpleSAML/Command/UpdateTranslatableStringsCommand.php @@ -50,7 +50,7 @@ protected function configure(): void 'logging.handler' => ArrayLogger::class, ]), 'config.php', - 'simplesaml' + 'simplesaml', ); $this->setDescription( diff --git a/src/SimpleSAML/Configuration.php b/src/SimpleSAML/Configuration.php index 4fd54f01dd..a77e13ec55 100644 --- a/src/SimpleSAML/Configuration.php +++ b/src/SimpleSAML/Configuration.php @@ -40,7 +40,7 @@ class Configuration implements Utils\ClearableState /** * The release version of this package */ - public const VERSION = '2.1.6'; + public const VERSION = '2.1.7'; /** * A default value which means that the given option is required. @@ -61,7 +61,7 @@ class Configuration implements Utils\ClearableState "style-src 'self'; " . "font-src 'self'; " . "connect-src 'self'; " . - "media-src data:;" . + "media-src data:; " . "img-src 'self' data:; " . "base-uri 'none'", 'X-Frame-Options' => 'SAMEORIGIN', @@ -171,7 +171,7 @@ private static function loadFromFile(string $filename, bool $required): Configur if (!isset($config)) { throw new Error\ConfigurationError( '$config is not defined in the configuration file.', - $filename + $filename, ); } @@ -179,7 +179,7 @@ private static function loadFromFile(string $filename, bool $required): Configur if (!is_array($config)) { throw new Error\ConfigurationError( '$config is not an array.', - $filename + $filename, ); } @@ -187,7 +187,7 @@ private static function loadFromFile(string $filename, bool $required): Configur if (empty($config)) { throw new Error\ConfigurationError( '$config is empty.', - $filename + $filename, ); } } elseif ($required) { @@ -207,7 +207,7 @@ private static function loadFromFile(string $filename, bool $required): Configur if ($spurious_output) { Logger::warning( - "The configuration file '$filename' generates output. Please review your configuration." + "The configuration file '$filename' generates output. Please review your configuration.", ); } @@ -241,7 +241,7 @@ public static function setConfigDir(string $path, string $configSet = 'simplesam public static function setPreLoadedConfig( Configuration $config, string $filename = 'config.php', - string $configSet = 'simplesaml' + string $configSet = 'simplesaml', ): void { if (!array_key_exists($configSet, self::$configDirs)) { if ($configSet !== 'simplesaml') { @@ -269,7 +269,7 @@ public static function setPreLoadedConfig( */ public static function getConfig( string $filename = 'config.php', - string $configSet = 'simplesaml' + string $configSet = 'simplesaml', ): Configuration { if (!array_key_exists($configSet, self::$configDirs)) { if ($configSet !== 'simplesaml') { @@ -299,7 +299,7 @@ public static function getConfig( */ public static function getOptionalConfig( string $filename = 'config.php', - string $configSet = 'simplesaml' + string $configSet = 'simplesaml', ): Configuration { if (!array_key_exists($configSet, self::$configDirs)) { if ($configSet !== 'simplesaml') { @@ -330,7 +330,7 @@ public static function getOptionalConfig( public static function loadFromArray( array $config, string $location = '[ARRAY]', - ?string $instance = null + ?string $instance = null, ): Configuration { $c = new Configuration($config, $location); if ($instance !== null) { @@ -371,7 +371,7 @@ public static function getInstance(string $instancename = 'simplesaml'): Configu } throw new Error\CriticalConfigurationError( - 'Configuration with name ' . $instancename . ' is not initialized.' + 'Configuration with name ' . $instancename . ' is not initialized.', ); } @@ -504,7 +504,7 @@ public function getBasePath(): string $this->getOptionalString('baseurlpath', 'simplesaml/') . '". Valid format is in the form' . ' [(http|https)://(hostname|fqdn)[:port]]/[path/to/simplesaml/].', $this->filename, - $c + $c, ); } @@ -668,7 +668,7 @@ public function getOptionalBoolean(string $name, ?bool $default): ?bool sprintf( '%s: The option %s is not a valid boolean value or null.', $this->location, - var_export($name, true) + var_export($name, true), ), ); @@ -722,7 +722,7 @@ public function getOptionalString(string $name, ?string $default): ?string sprintf( '%s: The option %s is not a valid string value or null.', $this->location, - var_export($name, true) + var_export($name, true), ), ); @@ -776,7 +776,7 @@ public function getOptionalInteger(string $name, ?int $default): ?int sprintf( '%s: The option %s is not a valid integer value or null.', $this->location, - var_export($name, true) + var_export($name, true), ), ); @@ -1440,7 +1440,7 @@ public function getPublicKeys(?string $use = null, bool $required = false, strin if ($data === null) { throw new Exception( - $this->location . ': Unable to load certificate/public key from location "' . $location . '".' + $this->location . ': Unable to load certificate/public key from location "' . $location . '".', ); } @@ -1448,7 +1448,7 @@ public function getPublicKeys(?string $use = null, bool $required = false, strin $pattern = '/^-----BEGIN CERTIFICATE-----([^-]*)^-----END CERTIFICATE-----/m'; if (!preg_match($pattern, $data, $matches)) { throw new Error\Exception( - $this->location . ': Could not find PEM encoded certificate in "' . $location . '".' + $this->location . ': Could not find PEM encoded certificate in "' . $location . '".', ); } $certData = preg_replace('/\s+/', '', $matches[1]); diff --git a/src/SimpleSAML/Console/Application.php b/src/SimpleSAML/Console/Application.php index d4e5fb8c4c..c5dd8af612 100644 --- a/src/SimpleSAML/Console/Application.php +++ b/src/SimpleSAML/Console/Application.php @@ -19,7 +19,7 @@ public function __construct(Kernel $kernel) $inputDefinition = $this->getDefinition(); $inputDefinition->addOption( - new InputOption('--module', '-m', InputOption::VALUE_REQUIRED, 'The module name', $kernel->getModule()) + new InputOption('--module', '-m', InputOption::VALUE_REQUIRED, 'The module name', $kernel->getModule()), ); } } diff --git a/src/SimpleSAML/Database.php b/src/SimpleSAML/Database.php index c7caa1cf80..094ff03670 100644 --- a/src/SimpleSAML/Database.php +++ b/src/SimpleSAML/Database.php @@ -94,7 +94,7 @@ private function __construct(Configuration $config) $config->getString('database.dsn'), $config->getOptionalString('database.username', null), $config->getOptionalString('database.password', null), - $driverOptions + $driverOptions, ); // TODO: deprecated: the "database.slave" terminology is preserved here for backwards compatibility. @@ -116,8 +116,8 @@ private function __construct(Configuration $config) $secondary['dsn'], $secondary['username'], $secondary['password'], - $driverOptions - ) + $driverOptions, + ), ); } $this->tablePrefix = $config->getOptionalString('database.prefix', ''); diff --git a/src/SimpleSAML/Error/AuthSource.php b/src/SimpleSAML/Error/AuthSource.php index b2afa9ae28..7bf8a71caf 100644 --- a/src/SimpleSAML/Error/AuthSource.php +++ b/src/SimpleSAML/Error/AuthSource.php @@ -25,7 +25,7 @@ class AuthSource extends Error public function __construct( private string $authsource, private string $reason, - Throwable $cause = null + Throwable $cause = null, ) { $this->authsource = $authsource; $this->reason = $reason; diff --git a/src/SimpleSAML/Error/BadRequest.php b/src/SimpleSAML/Error/BadRequest.php index 5193b35ab8..3c1ea29242 100644 --- a/src/SimpleSAML/Error/BadRequest.php +++ b/src/SimpleSAML/Error/BadRequest.php @@ -21,7 +21,7 @@ class BadRequest extends Error * @param string $reason Description of why the request was unacceptable. */ public function __construct( - protected string $reason + protected string $reason, ) { parent::__construct(['BADREQUEST', '%REASON%' => $this->reason]); $this->httpCode = 400; diff --git a/src/SimpleSAML/Error/CriticalConfigurationError.php b/src/SimpleSAML/Error/CriticalConfigurationError.php index 4c9b9d187a..09b0d6779c 100644 --- a/src/SimpleSAML/Error/CriticalConfigurationError.php +++ b/src/SimpleSAML/Error/CriticalConfigurationError.php @@ -60,7 +60,7 @@ public function __construct(string $reason = null, string $file = null, array $c Configuration::loadFromArray( $config, '', - 'simplesaml' + 'simplesaml', ); parent::__construct($reason, $file); } diff --git a/src/SimpleSAML/Error/MetadataNotFound.php b/src/SimpleSAML/Error/MetadataNotFound.php index 0e605a72fe..e88c98582c 100644 --- a/src/SimpleSAML/Error/MetadataNotFound.php +++ b/src/SimpleSAML/Error/MetadataNotFound.php @@ -22,7 +22,7 @@ public function __construct(string $entityId) $this->includeTemplate = 'core:no_metadata.twig'; parent::__construct([ 'METADATANOTFOUND', - '%ENTITYID%' => $entityId + '%ENTITYID%' => $entityId, ]); } } diff --git a/src/SimpleSAML/Error/NotFound.php b/src/SimpleSAML/Error/NotFound.php index d18764e5bb..df8d704278 100644 --- a/src/SimpleSAML/Error/NotFound.php +++ b/src/SimpleSAML/Error/NotFound.php @@ -23,7 +23,7 @@ class NotFound extends Error * @param string $reason Optional description of why the given page could not be found. */ public function __construct( - private ?string $reason = null + private ?string $reason = null, ) { $httpUtils = new Utils\HTTP(); $url = $httpUtils->getSelfURL(); diff --git a/src/SimpleSAML/HTTP/RunnableResponse.php b/src/SimpleSAML/HTTP/RunnableResponse.php index 572c2d2e5c..738acf0431 100644 --- a/src/SimpleSAML/HTTP/RunnableResponse.php +++ b/src/SimpleSAML/HTTP/RunnableResponse.php @@ -28,7 +28,7 @@ class RunnableResponse extends Response */ public function __construct( callable $callable, - protected array $arguments = [] + protected array $arguments = [], ) { $this->callable = $callable; $this->setCharset('UTF-8'); diff --git a/src/SimpleSAML/IdP.php b/src/SimpleSAML/IdP.php index b2fa20eef6..2270dff0ed 100644 --- a/src/SimpleSAML/IdP.php +++ b/src/SimpleSAML/IdP.php @@ -275,7 +275,7 @@ public static function postAuthProc(array $state): void 'core:idp-ssotime', $state['core:IdP'] . ';' . $state['core:SP'], time(), - Session::DATA_TIMEOUT_SESSION_END + Session::DATA_TIMEOUT_SESSION_END, ); } diff --git a/src/SimpleSAML/IdP/IFrameLogoutHandler.php b/src/SimpleSAML/IdP/IFrameLogoutHandler.php index cb29f20d41..134fd8840a 100644 --- a/src/SimpleSAML/IdP/IFrameLogoutHandler.php +++ b/src/SimpleSAML/IdP/IFrameLogoutHandler.php @@ -26,7 +26,7 @@ class IFrameLogoutHandler implements LogoutHandlerInterface * @param \SimpleSAML\IdP $idp The IdP to log out from. */ public function __construct( - private IdP $idp + private IdP $idp, ) { } diff --git a/src/SimpleSAML/IdP/TraditionalLogoutHandler.php b/src/SimpleSAML/IdP/TraditionalLogoutHandler.php index 0ce1e240e0..06e3e021cb 100644 --- a/src/SimpleSAML/IdP/TraditionalLogoutHandler.php +++ b/src/SimpleSAML/IdP/TraditionalLogoutHandler.php @@ -25,7 +25,7 @@ class TraditionalLogoutHandler implements LogoutHandlerInterface * @param \SimpleSAML\IdP $idp The IdP to log out from. */ public function __construct( - private IdP $idp + private IdP $idp, ) { } diff --git a/src/SimpleSAML/Kernel.php b/src/SimpleSAML/Kernel.php index 2abaacefe1..ab30f77cfb 100644 --- a/src/SimpleSAML/Kernel.php +++ b/src/SimpleSAML/Kernel.php @@ -169,12 +169,12 @@ private function registerModuleControllers(ContainerBuilder $container): void $loader = new DirectoryLoader( $container, - new FileLocator($controllerDir . '/') + new FileLocator($controllerDir . '/'), ); $loader->registerClasses( $definition, 'SimpleSAML\\Module\\' . $this->module . '\\Controller\\', - $controllerDir . '/*' + $controllerDir . '/*', ); } catch (FileLocatorFileNotFoundException $e) { } diff --git a/src/SimpleSAML/Locale/Language.php b/src/SimpleSAML/Locale/Language.php index dfbd0b4424..107cf119e9 100644 --- a/src/SimpleSAML/Locale/Language.php +++ b/src/SimpleSAML/Locale/Language.php @@ -143,7 +143,7 @@ class Language * @param \SimpleSAML\Configuration $configuration Configuration object */ public function __construct( - private Configuration $configuration + private Configuration $configuration, ) { $this->availableLanguages = $this->getInstalledLanguages(); $this->defaultLanguage = $configuration->getOptionalString('language.default', self::FALLBACKLANGUAGE); @@ -153,7 +153,7 @@ public function __construct( if (isset($_GET[$this->languageParameterName])) { $this->setLanguage( $_GET[$this->languageParameterName], - $configuration->getOptionalBoolean('language.parameter.setcookie', true) + $configuration->getOptionalBoolean('language.parameter.setcookie', true), ); } } @@ -168,7 +168,7 @@ private function getInstalledLanguages(): array { $configuredAvailableLanguages = $this->configuration->getOptionalArray( 'language.available', - [self::FALLBACKLANGUAGE] + [self::FALLBACKLANGUAGE], ); $availableLanguages = []; foreach ($configuredAvailableLanguages as $code) { diff --git a/src/SimpleSAML/Locale/Localization.php b/src/SimpleSAML/Locale/Localization.php index f08cdd0b70..e355f2d6eb 100644 --- a/src/SimpleSAML/Locale/Localization.php +++ b/src/SimpleSAML/Locale/Localization.php @@ -69,7 +69,7 @@ class Localization * @param \SimpleSAML\Configuration $configuration Configuration object */ public function __construct( - private Configuration $configuration + private Configuration $configuration, ) { /** @var string $locales */ $locales = $configuration->resolvePath('locales'); @@ -218,7 +218,7 @@ private function setupTranslator(): void */ private function loadGettextGettextFromPO( string $domain = self::DEFAULT_DOMAIN, - bool $catchException = true + bool $catchException = true, ): void { try { $langPath = $this->getLangPath($domain); @@ -238,7 +238,7 @@ private function loadGettextGettextFromPO( $translations = (new MoLoader())->loadFile($file->getRealPath()); $arrayGenerator = new ArrayGenerator(); $this->translator->addTranslations( - $arrayGenerator->generateArray($translations) + $arrayGenerator->generateArray($translations), ); } else { $file = new File($langPath . $domain . '.po', false); @@ -246,7 +246,7 @@ private function loadGettextGettextFromPO( $translations = (new PoLoader())->loadFile($file->getRealPath()); $arrayGenerator = new ArrayGenerator(); $this->translator->addTranslations( - $arrayGenerator->generateArray($translations) + $arrayGenerator->generateArray($translations), ); } else { Logger::debug(sprintf( diff --git a/src/SimpleSAML/Locale/Translate.php b/src/SimpleSAML/Locale/Translate.php index c848d1d919..cd3b41fcb7 100644 --- a/src/SimpleSAML/Locale/Translate.php +++ b/src/SimpleSAML/Locale/Translate.php @@ -29,7 +29,7 @@ class Translate * @param \SimpleSAML\Configuration $configuration Configuration object */ public function __construct( - private Configuration $configuration + private Configuration $configuration, ) { $this->language = new Language($configuration); } diff --git a/src/SimpleSAML/Logger.php b/src/SimpleSAML/Logger.php index 4836692806..ab8b1d66b6 100644 --- a/src/SimpleSAML/Logger.php +++ b/src/SimpleSAML/Logger.php @@ -454,7 +454,7 @@ private static function createLoggingHandler(?string $handler = null): void if (is_null($handler)) { $handler = $config->getOptionalString( 'logging.handler', - php_sapi_name() === 'cli' || defined('STDIN') ? 'stderr' : 'syslog' + php_sapi_name() === 'cli' || defined('STDIN') ? 'stderr' : 'syslog', ); } @@ -466,7 +466,7 @@ private static function createLoggingHandler(?string $handler = null): void $handler = strtolower($handler); if (!array_key_exists($handler, $known_handlers)) { throw new Exception( - "Invalid value for the 'logging.handler' configuration option. Unknown handler '" . $handler . "'." + "Invalid value for the 'logging.handler' configuration option. Unknown handler '" . $handler . "'.", ); } $handler = $known_handlers[$handler]; diff --git a/src/SimpleSAML/Logger/ErrorLogLoggingHandler.php b/src/SimpleSAML/Logger/ErrorLogLoggingHandler.php index 9c989d725e..967c8a30f9 100644 --- a/src/SimpleSAML/Logger/ErrorLogLoggingHandler.php +++ b/src/SimpleSAML/Logger/ErrorLogLoggingHandler.php @@ -49,7 +49,7 @@ public function __construct(Configuration $config) $this->processname = preg_replace( '/[\x00-\x1F\x7F\xA0]/u', '', - $config->getOptionalString('logging.processname', 'SimpleSAMLphp') + $config->getOptionalString('logging.processname', 'SimpleSAMLphp'), ); } diff --git a/src/SimpleSAML/Logger/FileLoggingHandler.php b/src/SimpleSAML/Logger/FileLoggingHandler.php index 76b2c94d0d..941bcc5929 100644 --- a/src/SimpleSAML/Logger/FileLoggingHandler.php +++ b/src/SimpleSAML/Logger/FileLoggingHandler.php @@ -70,7 +70,7 @@ public function __construct(Configuration $config) $this->processname = preg_replace( '/[\x00-\x1F\x7F\xA0]/u', '', - $config->getOptionalString('logging.processname', 'SimpleSAMLphp') + $config->getOptionalString('logging.processname', 'SimpleSAMLphp'), ); $file = new File($this->logFile, false); diff --git a/src/SimpleSAML/Logger/StandardErrorLoggingHandler.php b/src/SimpleSAML/Logger/StandardErrorLoggingHandler.php index 37bf8e14f0..64aeb2ae6e 100644 --- a/src/SimpleSAML/Logger/StandardErrorLoggingHandler.php +++ b/src/SimpleSAML/Logger/StandardErrorLoggingHandler.php @@ -29,7 +29,7 @@ public function __construct(Configuration $config) $this->processname = preg_replace( '/[\x00-\x1F\x7F\xA0]/u', '', - $config->getOptionalString('logging.processname', 'SimpleSAMLphp') + $config->getOptionalString('logging.processname', 'SimpleSAMLphp'), ); $this->logFile = 'php://stderr'; diff --git a/src/SimpleSAML/Logger/SyslogLoggingHandler.php b/src/SimpleSAML/Logger/SyslogLoggingHandler.php index a13fe77a9d..b192d60478 100644 --- a/src/SimpleSAML/Logger/SyslogLoggingHandler.php +++ b/src/SimpleSAML/Logger/SyslogLoggingHandler.php @@ -29,14 +29,14 @@ public function __construct(Configuration $config) { $facility = $config->getOptionalInteger( 'logging.facility', - defined('LOG_LOCAL5') ? constant('LOG_LOCAL5') : LOG_USER + defined('LOG_LOCAL5') ? constant('LOG_LOCAL5') : LOG_USER, ); // Remove any non-printable characters before storing $processname = preg_replace( '/[\x00-\x1F\x7F\xA0]/u', '', - $config->getOptionalString('logging.processname', 'SimpleSAMLphp') + $config->getOptionalString('logging.processname', 'SimpleSAMLphp'), ); // Setting facility to LOG_USER (only valid in Windows), enable log level rewrite on windows systems diff --git a/src/SimpleSAML/Memcache.php b/src/SimpleSAML/Memcache.php index a85a90d0b8..a8174bfcee 100644 --- a/src/SimpleSAML/Memcache.php +++ b/src/SimpleSAML/Memcache.php @@ -87,19 +87,19 @@ public static function get(string $key): mixed */ if (!is_array($info)) { Logger::warning( - 'Retrieved invalid data from a memcache server. Data was not an array.' + 'Retrieved invalid data from a memcache server. Data was not an array.', ); continue; } if (!array_key_exists('timestamp', $info)) { Logger::warning( - 'Retrieved invalid data from a memcache server. Missing timestamp.' + 'Retrieved invalid data from a memcache server. Missing timestamp.', ); continue; } if (!array_key_exists('data', $info)) { Logger::warning( - 'Retrieved invalid data from a memcache server. Missing data.' + 'Retrieved invalid data from a memcache server. Missing data.', ); continue; } @@ -161,7 +161,7 @@ public static function set(string $key, mixed $value, ?int $expire = null): void Logger::debug("saving key $key to memcache"); $savedInfo = [ 'timestamp' => microtime(true), - 'data' => $value + 'data' => $value, ]; if ($expire === null) { @@ -221,7 +221,7 @@ private static function addMemcacheServer(Memcached $memcache, array $server): v // the hostname option is required if (!array_key_exists('hostname', $server)) { throw new Exception( - "hostname setting missing from server in the 'memcache_store.servers' configuration option." + "hostname setting missing from server in the 'memcache_store.servers' configuration option.", ); } @@ -231,7 +231,7 @@ private static function addMemcacheServer(Memcached $memcache, array $server): v if (!is_string($hostname)) { throw new Exception( "Invalid hostname for server in the 'memcache_store.servers' configuration option. The hostname is" . - ' supposed to be a string.' + ' supposed to be a string.', ); } @@ -245,7 +245,7 @@ private static function addMemcacheServer(Memcached $memcache, array $server): v if (($port <= 0) || ($port > 65535)) { throw new Exception( "Invalid port for server in the 'memcache_store.servers' configuration option. The port number" . - ' is supposed to be an integer between 0 and 65535.' + ' is supposed to be an integer between 0 and 65535.', ); } } else { @@ -298,7 +298,7 @@ private static function loadMemcacheServerGroup(array $group, $index = null) throw new Exception( "Invalid index on element in the 'memcache_store.servers' configuration option. Perhaps you" . ' have forgotten to add an array(...) around one of the server groups? The invalid index was: ' . - $index + $index, ); } @@ -307,7 +307,7 @@ private static function loadMemcacheServerGroup(array $group, $index = null) throw new Exception( 'Invalid value for the server with index ' . $index . '. Remember that the \'memcache_store.servers\' configuration option' . - ' contains an array of arrays of arrays.' + ' contains an array of arrays of arrays.', ); } @@ -353,7 +353,7 @@ private static function getMemcacheServers(): array throw new Exception( "Invalid value for the server with index " . $index . ". Remember that the 'memcache_store.servers' configuration option" . - ' contains an array of arrays of arrays.' + ' contains an array of arrays of arrays.', ); } @@ -393,7 +393,7 @@ private static function getExpireTime(): int // it must be a positive integer if ($expire < 0) { throw new Exception( - "The value of 'memcache_store.expires' in the configuration can't be a negative integer." + "The value of 'memcache_store.expires' in the configuration can't be a negative integer.", ); } diff --git a/src/SimpleSAML/Metadata/MetaDataStorageHandler.php b/src/SimpleSAML/Metadata/MetaDataStorageHandler.php index 8a7acbc342..dbbe0405d3 100644 --- a/src/SimpleSAML/Metadata/MetaDataStorageHandler.php +++ b/src/SimpleSAML/Metadata/MetaDataStorageHandler.php @@ -70,7 +70,7 @@ protected function __construct() $this->sources = MetaDataStorageSource::parseSources($sourcesConfig); } catch (\Exception $e) { throw new \Exception( - "Invalid configuration of the 'metadata.sources' configuration option: " . $e->getMessage() + "Invalid configuration of the 'metadata.sources' configuration option: " . $e->getMessage(), ); } } @@ -153,7 +153,7 @@ public function getList(string $set = 'saml20-idp-remote', bool $showExpired = f unset($srcList[$key]); Logger::warning( "Dropping metadata entity " . var_export($key, true) . ", expired " . - $timeUtils->generateTimestamp($le['expire']) . "." + $timeUtils->generateTimestamp($le['expire']) . ".", ); } } @@ -227,7 +227,7 @@ public function getMetaDataCurrentEntityID(string $set, string $type = 'entityid // we were unable to find the hostname/path in any metadata source throw new \Exception( 'Could not find any default metadata entities in set [' . $set . '] for host [' . $currenthost . ' : ' . - $currenthostwithpath . ']' + $currenthostwithpath . ']', ); } @@ -274,7 +274,7 @@ public function getMetaDataForEntities(array $entityIds, string $set): array unset($srcList[$key]); Logger::warning( "Dropping metadata entity " . var_export($key, true) . ", expired " . - $timeUtils->generateTimestamp($le['expire']) . "." + $timeUtils->generateTimestamp($le['expire']) . ".", ); continue; } @@ -316,7 +316,7 @@ public function getMetaData(?string $entityId, string $set): array if ($metadata['expire'] < time()) { throw new \Exception( 'Metadata for the entity [' . $entityId . '] expired ' . - (time() - $metadata['expire']) . ' seconds ago.' + (time() - $metadata['expire']) . ' seconds ago.', ); } } @@ -377,7 +377,7 @@ public function getMetaDataConfigForSha1(string $sha1, string $set): ?Configurat return Configuration::loadFromArray( $remote_provider, - $set . '/' . var_export($remote_provider['entityid'], true) + $set . '/' . var_export($remote_provider['entityid'], true), ); } } diff --git a/src/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php b/src/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php index 085d11dc6f..7180c7f565 100644 --- a/src/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php +++ b/src/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php @@ -103,7 +103,7 @@ private function load(string $set): ?array return $metadata; } else { throw new \Exception( - 'PDO metadata handler: Database error: ' . var_export($this->db->getLastError(), true) + 'PDO metadata handler: Database error: ' . var_export($this->db->getLastError(), true), ); } } @@ -160,13 +160,13 @@ public function getMetaData(string $entityId, string $set): ?array $tableName = $this->getTableName($set); $stmt = $this->db->read( "SELECT entity_id, entity_data FROM {$tableName} WHERE entity_id = :entityId", - ['entityId' => $entityId] + ['entityId' => $entityId], ); // throw pdo exception upon execution failure if (!$stmt->execute()) { throw new \Exception( - 'PDO metadata handler: Database error: ' . var_export($this->db->getLastError(), true) + 'PDO metadata handler: Database error: ' . var_export($this->db->getLastError(), true), ); } @@ -176,7 +176,7 @@ public function getMetaData(string $entityId, string $set): ?array $data = json_decode($d['entity_data'], true); if (json_last_error() != JSON_ERROR_NONE) { throw new \SimpleSAML\Error\Exception( - "Cannot decode metadata for entity '${d['entity_id']}'" + "Cannot decode metadata for entity '${d['entity_id']}'", ); } @@ -216,7 +216,7 @@ public function addEntry(string $index, string $set, array $entityData): bool "SELECT entity_id, entity_data FROM $tableName WHERE entity_id = :entity_id", [ 'entity_id' => $index, - ] + ], ); $retrivedEntityIDs = $metadata->fetch(); @@ -229,12 +229,12 @@ public function addEntry(string $index, string $set, array $entityData): bool if ($retrivedEntityIDs !== false && count($retrivedEntityIDs) > 0) { $rows = $this->db->write( "UPDATE $tableName SET entity_data = :entity_data WHERE entity_id = :entity_id", - $params + $params, ); } else { $rows = $this->db->write( "INSERT INTO $tableName (entity_id, entity_data) VALUES (:entity_id, :entity_data)", - $params + $params, ); } @@ -260,7 +260,7 @@ public function removeEntry(string $entityId, string $set): bool $rows = $this->db->write( "DELETE FROM $tableName WHERE entity_id = :entity_id", - ['entity_id' => $entityId] + ['entity_id' => $entityId], ); return $rows === 1; @@ -302,7 +302,7 @@ public function initDatabase(): int|false $rows = $this->db->write(sprintf( "CREATE TABLE IF NOT EXISTS $tableName (entity_id VARCHAR(255) PRIMARY KEY NOT NULL, " . "entity_data %s NOT NULL)", - $text + $text, )); if ($rows === false) { diff --git a/src/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php b/src/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php index 4d51c19ddd..8844b9dbf9 100644 --- a/src/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php +++ b/src/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php @@ -93,7 +93,7 @@ public function getMetadataSets(): array $loc = new File($this->directory, false); if (!$this->fileSystem->exists($this->directory) || !$loc->isReadable()) { Logger::warning( - 'Serialize metadata handler: Unable to open directory: ' . var_export($this->directory, true) + 'Serialize metadata handler: Unable to open directory: ' . var_export($this->directory, true), ); return $ret; } @@ -229,7 +229,7 @@ public function saveMetadata(string $entityId, string $set, array $metadata): bo $this->fileSystem->rename($new->getPathName(), $old->getPathName(), true); } catch (IOException $e) { Logger::error( - sprintf('Error renaming %s to %s: %s', $new->getPathName(), $old->getPathName(), $e->getMessage()) + sprintf('Error renaming %s to %s: %s', $new->getPathName(), $old->getPathName(), $e->getMessage()), ); return false; } @@ -251,7 +251,7 @@ public function deleteMetadata(string $entityId, string $set): void if (!$this->fileSystem->exists($filePath)) { Logger::warning( 'Attempted to erase nonexistent metadata entry ' . - var_export($entityId, true) . ' in set ' . var_export($set, true) . '.' + var_export($entityId, true) . ' in set ' . var_export($set, true) . '.', ); return; } diff --git a/src/SimpleSAML/Metadata/MetaDataStorageSource.php b/src/SimpleSAML/Metadata/MetaDataStorageSource.php index fe33c87b71..591ee893dd 100644 --- a/src/SimpleSAML/Metadata/MetaDataStorageSource.php +++ b/src/SimpleSAML/Metadata/MetaDataStorageSource.php @@ -101,12 +101,12 @@ public static function getSource(array $sourceConfig): MetaDataStorageSource $className = Module::resolveClass( $type, 'MetadataStore', - '\SimpleSAML\Metadata\MetaDataStorageSource' + '\SimpleSAML\Metadata\MetaDataStorageSource', ); } catch (\Exception $e) { throw new Error\CriticalConfigurationError( "Invalid 'type' for metadata source. Cannot find store '$type'.", - null + null, ); } diff --git a/src/SimpleSAML/Metadata/SAMLBuilder.php b/src/SimpleSAML/Metadata/SAMLBuilder.php index 95d6928d88..3c984d2318 100644 --- a/src/SimpleSAML/Metadata/SAMLBuilder.php +++ b/src/SimpleSAML/Metadata/SAMLBuilder.php @@ -59,7 +59,7 @@ class SAMLBuilder public function __construct( string $entityId, private ?int $maxCache = null, - private ?int $maxDuration = null + private ?int $maxDuration = null, ) { $this->entityDescriptor = new EntityDescriptor(); $this->entityDescriptor->setEntityID($entityId); @@ -396,7 +396,7 @@ private static function createEndpoints(array $endpoints, bool $indexed): array */ private function addAttributeConsumingService( SPSSODescriptor $spDesc, - Configuration $metadata + Configuration $metadata, ): void { $attributes = $metadata->getOptionalArray('attributes', []); $name = $metadata->getOptionalLocalizedString('name', null); @@ -677,7 +677,7 @@ private function addX509KeyDescriptor( RoleDescriptor $rd, string $use, string $x509data, - ?string $keyName = null + ?string $keyName = null, ): void { Assert::oneOf($use, ['encryption', 'signing']); diff --git a/src/SimpleSAML/Metadata/SAMLParser.php b/src/SimpleSAML/Metadata/SAMLParser.php index 62737373aa..546c5af1b5 100644 --- a/src/SimpleSAML/Metadata/SAMLParser.php +++ b/src/SimpleSAML/Metadata/SAMLParser.php @@ -179,7 +179,7 @@ private function __construct( EntityDescriptor $entityElement, ?int $maxExpireTime, array $validators = [], - array $parentExtensions = [] + array $parentExtensions = [], ) { $this->fileSystem = new Filesystem(); @@ -388,7 +388,7 @@ private static function processDescriptorsElement( SignedElementHelper $element, ?int $maxExpireTime = null, array $validators = [], - array $parentExtensions = [] + array $parentExtensions = [], ): array { if ($element instanceof EntityDescriptor) { $ret = new SAMLParser($element, $maxExpireTime, $validators, $parentExtensions); @@ -844,7 +844,7 @@ private function processIDPSSODescriptor(IDPSSODescriptor $element, ?int $expire */ private function processAttributeAuthorityDescriptor( AttributeAuthorityDescriptor $element, - ?int $expireTime + ?int $expireTime, ): void { Assert::nullOrInteger($expireTime); @@ -1279,9 +1279,10 @@ public function validateSignature(array $certificates): bool $certData = $cryptoUtils->retrieveCertificate($certLocation); if ($certData === null) { - throw new Exception( - 'Could not find certificate location [' . $certLocation . '], which is needed to validate signature' - ); + throw new Exception(sprintf( + 'Could not find certificate location [%s], which is needed to validate signature', + $certLocation, + )); } foreach ($this->validators as $validator) { diff --git a/src/SimpleSAML/Metadata/Signer.php b/src/SimpleSAML/Metadata/Signer.php index c8bc3ffe05..f78d15f937 100644 --- a/src/SimpleSAML/Metadata/Signer.php +++ b/src/SimpleSAML/Metadata/Signer.php @@ -52,13 +52,13 @@ private static function findKeyCert(Configuration $config, array $entityMetadata 'Missing either the "metadata.sign.privatekey" or the' . ' "metadata.sign.certificate" configuration option in the metadata for' . ' the ' . $type . ' "' . $entityMetadata['entityid'] . '". If one of' . - ' these options is specified, then the other must also be specified.' + ' these options is specified, then the other must also be specified.', ); } $ret = [ 'privatekey' => $entityMetadata['metadata.sign.privatekey'], - 'certificate' => $entityMetadata['metadata.sign.certificate'] + 'certificate' => $entityMetadata['metadata.sign.certificate'], ]; if (array_key_exists('metadata.sign.privatekey_pass', $entityMetadata)) { @@ -77,7 +77,7 @@ private static function findKeyCert(Configuration $config, array $entityMetadata 'Missing either the "metadata.sign.privatekey" or the' . ' "metadata.sign.certificate" configuration option in the global' . ' configuration. If one of these options is specified, then the other' . - ' must also be specified.' + ' must also be specified.', ); } $ret = ['privatekey' => $privatekey, 'certificate' => $certificate]; @@ -103,13 +103,13 @@ private static function findKeyCert(Configuration $config, array $entityMetadata 'Both the "privatekey" and the "certificate" option must' . ' be set in the metadata for the ' . $type . ' "' . $entityMetadata['entityid'] . '" before it is possible to sign metadata' . - ' from this entity.' + ' from this entity.', ); } $ret = [ 'privatekey' => $entityMetadata['privatekey'], - 'certificate' => $entityMetadata['certificate'] + 'certificate' => $entityMetadata['certificate'], ]; if (array_key_exists('privatekey_pass', $entityMetadata)) { @@ -121,7 +121,7 @@ private static function findKeyCert(Configuration $config, array $entityMetadata throw new Exception( 'Could not find what key & certificate should be used to sign the metadata' . - ' for the ' . $type . ' "' . $entityMetadata['entityid'] . '".' + ' for the ' . $type . ' "' . $entityMetadata['entityid'] . '".', ); } @@ -144,7 +144,7 @@ private static function isMetadataSigningEnabled(Configuration $config, array $e throw new Exception( 'Invalid value for the "metadata.sign.enable" configuration option for' . ' the ' . $type . ' "' . $entityMetadata['entityid'] . '". This option' . - ' should be a boolean.' + ' should be a boolean.', ); } @@ -173,14 +173,14 @@ private static function isMetadataSigningEnabled(Configuration $config, array $e private static function getMetadataSigningAlgorithm( Configuration $config, array $entityMetadata, - string $type + string $type, ): array { // configure the algorithm to use if (array_key_exists('metadata.sign.algorithm', $entityMetadata)) { if (!is_string($entityMetadata['metadata.sign.algorithm'])) { throw new Error\CriticalConfigurationError( "Invalid value for the 'metadata.sign.algorithm' configuration option for the " . $type . - "'" . $entityMetadata['entityid'] . "'. This option has restricted values" + "'" . $entityMetadata['entityid'] . "'. This option has restricted values", ); } $alg = $entityMetadata['metadata.sign.algorithm']; @@ -247,7 +247,7 @@ public static function sign(string $metadataString, array $entityMetadata, strin $keyData = $cryptoUtils->retrieveKey($keyLocation); if ($keyData === null) { throw new Exception( - 'Could not find private key location [' . $keyLocation . '], which is needed to sign the metadata' + 'Could not find private key location [' . $keyLocation . '], which is needed to sign the metadata', ); } @@ -255,7 +255,7 @@ public static function sign(string $metadataString, array $entityMetadata, strin $certData = $cryptoUtils->retrieveCertificate($certLocation); if ($certData === null) { throw new Exception( - 'Could not find certificate location [' . $certLocation . '], which is needed to sign the metadata' + 'Could not find certificate location [' . $certLocation . '], which is needed to sign the metadata', ); } @@ -289,7 +289,7 @@ public static function sign(string $metadataString, array $entityMetadata, strin [$rootNode], $signature_cf['digest'], ['http://www.w3.org/2000/09/xmldsig#enveloped-signature', XMLSecurityDSig::EXC_C14N], - ['id_name' => 'ID', 'overwrite' => false] + ['id_name' => 'ID', 'overwrite' => false], ); $objXMLSecDSig->sign($objKey); diff --git a/src/SimpleSAML/Metadata/Sources/MDQ.php b/src/SimpleSAML/Metadata/Sources/MDQ.php index a5bf8c7697..e2e889dd36 100644 --- a/src/SimpleSAML/Metadata/Sources/MDQ.php +++ b/src/SimpleSAML/Metadata/Sources/MDQ.php @@ -189,7 +189,7 @@ private function getFromCache(string $set, string $entityId): ?array $data = json_decode($rawData); if ($data === false) { throw new Exception( - sprintf('%s: error unserializing cached data from file "%s".', __CLASS__, strval($file)) + sprintf('%s: error unserializing cached data from file "%s".', __CLASS__, strval($file)), ); } @@ -300,8 +300,8 @@ public function getMetaData(string $entityId, string $set): ?array $httpUtils = new Utils\HTTP(); $context = [ 'http' => [ - 'header' => 'Accept: application/samlmetadata+xml' - ] + 'header' => 'Accept: application/samlmetadata+xml', + ], ]; try { $xmldata = $httpUtils->fetch($mdq_url, $context); @@ -316,7 +316,7 @@ public function getMetaData(string $entityId, string $set): ?array 'Unable to fetch metadata for "%s" from %s: %s', $entityId, $mdq_url, - (is_array($error) ? $error['message'] : 'no error available') + (is_array($error) ? $error['message'] : 'no error available'), )); return null; } @@ -336,7 +336,7 @@ public function getMetaData(string $entityId, string $set): ?array $data = self::getParsedSet($entity, $set); if ($data === null) { throw new Exception( - sprintf('%s: no metadata for set "%s" available from "%s".', __CLASS__, $set, $entityId) + sprintf('%s: no metadata for set "%s" available from "%s".', __CLASS__, $set, $entityId), ); } diff --git a/src/SimpleSAML/Module.php b/src/SimpleSAML/Module.php index 1be3debaaa..9c9936b511 100644 --- a/src/SimpleSAML/Module.php +++ b/src/SimpleSAML/Module.php @@ -102,7 +102,7 @@ class Module */ public static array $core_modules = [ 'core' => true, - 'saml' => true + 'saml' => true, ]; /** @@ -217,7 +217,7 @@ public static function process(Request $request = null): Response $request->files->all(), function ($val) { return !is_null($val); - } + }, ); $request->initialize( $request->query->all(), @@ -226,7 +226,7 @@ function ($val) { $request->cookies->all(), $request_files, $request->server->all(), - $request->getContent() + $request->getContent(), ); try { @@ -335,7 +335,7 @@ function ($val) { // "public" allows response caching even if the request was authenticated, // which is exactly what we want for static resources 'public' => true, - 'max_age' => strval($cacheConfig->getOptionalInteger('max_age', 86400)) + 'max_age' => strval($cacheConfig->getOptionalInteger('max_age', 86400)), ]); $response->setAutoLastModified(); if ($cacheConfig->getOptionalBoolean('etag', false)) { @@ -458,7 +458,7 @@ public static function resolveClass(string $id, string $type, ?string $subclass if ($subclass !== null && !is_subclass_of($className, $subclass)) { throw new Exception( 'Could not resolve \'' . $id . '\': The class \'' . $className - . '\' isn\'t a subclass of \'' . $subclass . '\'.' + . '\' isn\'t a subclass of \'' . $subclass . '\'.', ); } diff --git a/src/SimpleSAML/Session.php b/src/SimpleSAML/Session.php index ba260f7db2..eb8c870ed4 100644 --- a/src/SimpleSAML/Session.php +++ b/src/SimpleSAML/Session.php @@ -305,7 +305,7 @@ public static function getSessionFromRequest(): Session throw new Error\CriticalConfigurationError( $e->getMessage(), null, - $c->toArray() + $c->toArray(), ); } Logger::error('Error creating session: ' . $e->getMessage()); @@ -354,7 +354,7 @@ public static function getSession(string $sessionId = null): ?Session if ($session->authToken !== null) { $authTokenCookieName = $globalConfig->getOptionalString( 'session.authtoken.cookiename', - 'SimpleSAMLAuthToken' + 'SimpleSAMLAuthToken', ); if (!isset($_COOKIE[$authTokenCookieName])) { Logger::warning('Missing AuthToken cookie.'); @@ -659,7 +659,7 @@ public function doLogin(string $authority, array $data = []): void $httpUtils->setCookie( self::$config->getOptionalString('session.authtoken.cookiename', 'SimpleSAMLAuthToken'), $this->authToken, - $sessionHandler->getCookieParams() + $sessionHandler->getCookieParams(), ); } catch (Error\CannotSetCookie $e) { /* @@ -726,7 +726,7 @@ private function callLogoutHandlers(string $authority): void throw new \Exception( 'Logout handler is not a valid function: ' . $classname . '::' . - $functionname + $functionname, ); } @@ -752,7 +752,7 @@ public function isValid(string $authority): bool if (!isset($this->authData[$authority])) { Logger::debug( 'Session: ' . var_export($authority, true) . - ' not valid because we are not authenticated.' + ' not valid because we are not authenticated.', ); return false; } @@ -787,7 +787,7 @@ public function updateSessionCookies(array $params = []): void $httpUtils->setCookie( self::$config->getOptionalString('session.authtoken.cookiename', 'SimpleSAMLAuthToken'), $this->authToken, - $params + $params, ); } } @@ -829,7 +829,7 @@ public function registerLogoutHandler(string $authority, string $classname, stri if (!is_callable($logout_handler)) { throw new \Exception( 'Logout handler is not a valid function: ' . $classname . '::' . - $functionname + $functionname, ); } @@ -886,7 +886,7 @@ public function setData(string $type, string $id, mixed $data, int|string|null $ if ($timeout <= 0) { throw new \Exception( 'The value of the session.datastore.timeout' . - ' configuration option should be a positive integer.' + ' configuration option should be a positive integer.', ); } } @@ -901,7 +901,7 @@ public function setData(string $type, string $id, mixed $data, int|string|null $ $dataInfo = [ 'expires' => $expires, 'timeout' => $timeout, - 'data' => $data + 'data' => $data, ]; if (!array_key_exists($type, $this->dataStore)) { diff --git a/src/SimpleSAML/SessionHandlerPHP.php b/src/SimpleSAML/SessionHandlerPHP.php index f1d70e31f4..785213981c 100644 --- a/src/SimpleSAML/SessionHandlerPHP.php +++ b/src/SimpleSAML/SessionHandlerPHP.php @@ -50,7 +50,7 @@ protected function __construct() $config = Configuration::getInstance(); $this->cookie_name = $config->getOptionalString( 'session.phpsession.cookiename', - ini_get('session.name') ?: 'PHPSESSID' + ini_get('session.name') ?: 'PHPSESSID', ); if (session_status() === PHP_SESSION_ACTIVE) { @@ -58,7 +58,7 @@ protected function __construct() Logger::warning( 'There is already a PHP session with the same name as SimpleSAMLphp\'s session, or the ' . "'session.phpsession.cookiename' configuration option is not set. Make sure to set " . - "SimpleSAMLphp's cookie name with a value not used by any other applications." + "SimpleSAMLphp's cookie name with a value not used by any other applications.", ); } @@ -284,12 +284,12 @@ public function getCookieParams(): array if ($config->hasValue('session.phpsession.limitedpath') && $config->hasValue('session.cookie.path')) { throw new Error\Exception( - 'You cannot set both the session.phpsession.limitedpath and session.cookie.path options.' + 'You cannot set both the session.phpsession.limitedpath and session.cookie.path options.', ); } elseif ($config->hasValue('session.phpsession.limitedpath')) { $ret['path'] = $config->getOptionalBoolean( 'session.phpsession.limitedpath', - false + false, ) ? $config->getBasePath() : '/'; } @@ -318,14 +318,14 @@ public function setCookie(string $sessionName, ?string $sessionID, array $cookie if ($cookieParams['secure'] && !$httpUtils->isHTTPS()) { throw new Error\CannotSetCookie( 'Setting secure cookie on plain HTTP is not allowed.', - Error\CannotSetCookie::SECURE_COOKIE + Error\CannotSetCookie::SECURE_COOKIE, ); } if (headers_sent()) { throw new Error\CannotSetCookie( 'Headers already sent.', - Error\CannotSetCookie::HEADERS_SENT + Error\CannotSetCookie::HEADERS_SENT, ); } diff --git a/src/SimpleSAML/Store/RedisStore.php b/src/SimpleSAML/Store/RedisStore.php index 37fae3caed..3560d65af8 100644 --- a/src/SimpleSAML/Store/RedisStore.php +++ b/src/SimpleSAML/Store/RedisStore.php @@ -87,7 +87,7 @@ public function __construct(Client $redis = null) + (!empty($password) ? ['password' => $password] : []), [ 'prefix' => $prefix, - ] + ], ); } else { $mastergroup = $config->getOptionalString('store.redis.mastergroup', 'mymaster'); @@ -103,7 +103,7 @@ public function __construct(Client $redis = null) + (!empty($ssl) ? ['ssl' => $ssl] : []) + (!empty($username) ? ['username' => $username] : []) + (!empty($password) ? ['password' => $password] : []), - ] + ], ); } } diff --git a/src/SimpleSAML/Store/SQLStore.php b/src/SimpleSAML/Store/SQLStore.php index 20b77337c0..99de3aa61d 100644 --- a/src/SimpleSAML/Store/SQLStore.php +++ b/src/SimpleSAML/Store/SQLStore.php @@ -89,7 +89,7 @@ private function initTableVersionTable(): void } catch (PDOException $e) { $this->pdo->exec( 'CREATE TABLE ' . $this->prefix . - '_tableVersion (_name VARCHAR(30) PRIMARY KEY NOT NULL, _version INTEGER NOT NULL)' + '_tableVersion (_name VARCHAR(30) PRIMARY KEY NOT NULL, _version INTEGER NOT NULL)', ); $this->setTableVersion('tableVersion', 1); return; @@ -110,7 +110,7 @@ private function initTableVersionTable(): void $update = [ 'ALTER TABLE ' . $this->prefix . '_tableVersion DROP CONSTRAINT IF EXISTS ' . $this->prefix . '_tableVersion__name_key', - 'ALTER TABLE ' . $this->prefix . '_tableVersion ADD PRIMARY KEY (_name)' + 'ALTER TABLE ' . $this->prefix . '_tableVersion ADD PRIMARY KEY (_name)', ]; break; case 'sqlsrv': @@ -122,7 +122,7 @@ private function initTableVersionTable(): void $update = [ 'ALTER TABLE ' . $this->prefix . '_tableVersion DROP INDEX IF EXISTS SELECT CONSTRAINT_NAME ' . 'FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME=' . $this->prefix . '_tableVersion', - 'ALTER TABLE ' . $this->prefix . '_tableVersion ADD CONSTRAINT _name PRIMARY KEY CLUSTERED (_name)' + 'ALTER TABLE ' . $this->prefix . '_tableVersion ADD CONSTRAINT _name PRIMARY KEY CLUSTERED (_name)', ]; break; case 'sqlite': @@ -140,21 +140,21 @@ private function initTableVersionTable(): void $this->prefix . '_tableVersion', 'DROP TABLE ' . $this->prefix . '_tableVersion', 'ALTER TABLE ' . $this->prefix . '_tableVersion_new RENAME TO ' . - $this->prefix . '_tableVersion' + $this->prefix . '_tableVersion', ]; break; case 'mysql': // Drop old index and add primary key $update = [ 'ALTER TABLE ' . $this->prefix . '_tableVersion DROP INDEX _name', - 'ALTER TABLE ' . $this->prefix . '_tableVersion ADD PRIMARY KEY (_name)' + 'ALTER TABLE ' . $this->prefix . '_tableVersion ADD PRIMARY KEY (_name)', ]; break; default: // Drop old index and add primary key $update = [ 'ALTER TABLE ' . $this->prefix . '_tableVersion DROP INDEX _name', - 'ALTER TABLE ' . $this->prefix . '_tableVersion ADD PRIMARY KEY (_name)' + 'ALTER TABLE ' . $this->prefix . '_tableVersion ADD PRIMARY KEY (_name)', ]; break; } @@ -183,7 +183,7 @@ private function initKVTable(): void } elseif ($tableVer < 2 && $tableVer > 0) { throw new Exception( 'No upgrade path available. Please migrate to the latest 1.16+ ' - . 'version of SimpleSAMLphp first before upgrading to 2.x.' + . 'version of SimpleSAMLphp first before upgrading to 2.x.', ); } @@ -242,7 +242,7 @@ public function setTableVersion(string $name, int $version): void $this->insertOrUpdate( $this->prefix . '_tableVersion', ['_name'], - ['_name' => $name, '_version' => $version] + ['_name' => $name, '_version' => $version], ); $this->tableVersions[$name] = $version; } diff --git a/src/SimpleSAML/Store/StoreFactory.php b/src/SimpleSAML/Store/StoreFactory.php index 9f3c93f49b..5f3c18b5f2 100644 --- a/src/SimpleSAML/Store/StoreFactory.php +++ b/src/SimpleSAML/Store/StoreFactory.php @@ -66,7 +66,7 @@ public static function getInstance(string $storeType) throw new Error\CriticalConfigurationError( "Invalid 'store.type' configuration option. Cannot find store '$storeType'.", null, - $c + $c, ); } /** @var \SimpleSAML\Store\StoreInterface|false */ diff --git a/src/SimpleSAML/Utils/Attributes.php b/src/SimpleSAML/Utils/Attributes.php index e2600334e0..fb8fee2305 100644 --- a/src/SimpleSAML/Utils/Attributes.php +++ b/src/SimpleSAML/Utils/Attributes.php @@ -44,7 +44,7 @@ public function getExpectedAttribute(array $attributes, string $expected, bool $ } elseif (count($attribute) > 1) { if ($allow_multiple === false) { throw new Error\Exception( - 'More than one value found for the attribute, multiple values not allowed.' + 'More than one value found for the attribute, multiple values not allowed.', ); } } @@ -83,7 +83,7 @@ public function normalizeAttributesArray(array $attributes): array if (!is_string($value)) { $value = print_r($value, true); throw new InvalidArgumentException( - sprintf('Invalid attribute value for attribute %s: "%s".', $name, $value) + sprintf('Invalid attribute value for attribute %s: "%s".', $name, $value), ); } } diff --git a/src/SimpleSAML/Utils/Auth.php b/src/SimpleSAML/Utils/Auth.php index cce8675558..e683a4904d 100644 --- a/src/SimpleSAML/Utils/Auth.php +++ b/src/SimpleSAML/Utils/Auth.php @@ -64,7 +64,7 @@ public function requireAdmin(): void $as->login(); } else { throw new Error\Exception( - 'Cannot find "admin" auth source, and admin privileges are required.' + 'Cannot find "admin" auth source, and admin privileges are required.', ); } } diff --git a/src/SimpleSAML/Utils/Config.php b/src/SimpleSAML/Utils/Config.php index e080975ad2..e89200da41 100644 --- a/src/SimpleSAML/Utils/Config.php +++ b/src/SimpleSAML/Utils/Config.php @@ -5,6 +5,7 @@ namespace SimpleSAML\Utils; use SimpleSAML\Configuration; +use SimpleSAML\Error; /** * Utility class for SimpleSAMLphp configuration management and manipulation. @@ -85,8 +86,8 @@ public function getConfigDir(): string sprintf( 'Config directory specified by environment variable SIMPLESAMLPHP_CONFIG_DIR is not a ' . 'directory. Given: "%s"', - $configDirEnv - ) + $configDirEnv, + ), ); } $configDir = $configDirEnv; diff --git a/src/SimpleSAML/Utils/Crypto.php b/src/SimpleSAML/Utils/Crypto.php index 22583ba73b..df999eb981 100644 --- a/src/SimpleSAML/Utils/Crypto.php +++ b/src/SimpleSAML/Utils/Crypto.php @@ -201,7 +201,7 @@ public function loadPrivateKey( Configuration $metadata, bool $required = false, string $prefix = '', - bool $full_path = false + bool $full_path = false, ): ?array { $location = $metadata->getOptionalString($prefix . 'privatekey', null); if ($location === null) { diff --git a/src/SimpleSAML/Utils/EMail.php b/src/SimpleSAML/Utils/EMail.php index a58b4b2320..caf5163e58 100644 --- a/src/SimpleSAML/Utils/EMail.php +++ b/src/SimpleSAML/Utils/EMail.php @@ -46,7 +46,7 @@ public function __construct( string $from = null, string $to = null, private string $txt_template = 'mailtxt.twig', - private string $html_template = 'mailhtml.twig' + private string $html_template = 'mailhtml.twig', ) { $this->mail = new PHPMailer(true); $this->mail->Subject = $subject; @@ -99,7 +99,7 @@ public function setData(array $data): void function ($v) { return is_array($v) ? $v : [$v]; }, - $data + $data, ); } @@ -221,7 +221,7 @@ public function setTransportMethod(string $transportMethod, array $transportOpti break; default: throw new \InvalidArgumentException( - "Invalid Mail Transport Method - Check 'mail.transport.method' Configuration Option" + "Invalid Mail Transport Method - Check 'mail.transport.method' Configuration Option", ); } } @@ -239,7 +239,7 @@ public function initFromConfig(EMail $EMail): EMail $config = Configuration::getInstance(); $EMail->setTransportMethod( $config->getOptionalString('mail.transport.method', 'mail'), - $config->getOptionalArrayize('mail.transport.options', []) + $config->getOptionalArrayize('mail.transport.options', []), ); return $EMail; diff --git a/src/SimpleSAML/Utils/HTTP.php b/src/SimpleSAML/Utils/HTTP.php index 3ffb0cecc1..ae0062d026 100644 --- a/src/SimpleSAML/Utils/HTTP.php +++ b/src/SimpleSAML/Utils/HTTP.php @@ -375,7 +375,7 @@ public function checkURLAllowed(string $url, array $trustedSites = null): string // get the white list of domains if ($trustedSites === null) { - $trustedSites = Configuration::getInstance()->getOptionalArray('trusted.url.domains', []); + $trustedSites = Configuration::getInstance()->getOptionalArray('trusted.url.domains', null); } // validates the URL's host is among those allowed @@ -669,7 +669,7 @@ public function getBaseURL(): string 'Invalid value for \'baseurlpath\' in config.php. Valid format is in the form: ' . '[(http|https)://(hostname|fqdn)[:port]]/[path/to/simplesaml/]. It must end with a \'/\'.', null, - $c + $c, ); } } @@ -1100,7 +1100,7 @@ public function setCookie(string $name, ?string $value, array $params = null, bo if ($throw) { throw new Error\CannotSetCookie( 'Setting secure cookie on plain HTTP is not allowed.', - Error\CannotSetCookie::SECURE_COOKIE + Error\CannotSetCookie::SECURE_COOKIE, ); } Logger::warning('Error setting cookie: setting secure cookie on plain HTTP is not allowed.'); @@ -1130,7 +1130,7 @@ public function setCookie(string $name, ?string $value, array $params = null, bo 'secure' => $params['secure'], 'httponly' => $params['httponly'], 'samesite' => $params['samesite'], - ] + ], ); } else { /** @psalm-suppress InvalidArgument */ @@ -1144,7 +1144,7 @@ public function setCookie(string $name, ?string $value, array $params = null, bo 'secure' => $params['secure'], 'httponly' => $params['httponly'], 'samesite' => $params['samesite'], - ] + ], ); } @@ -1152,7 +1152,7 @@ public function setCookie(string $name, ?string $value, array $params = null, bo if ($throw) { throw new Error\CannotSetCookie( 'Headers already sent.', - Error\CannotSetCookie::HEADERS_SENT + Error\CannotSetCookie::HEADERS_SENT, ); } Logger::warning('Error setting cookie: headers already sent.'); diff --git a/src/SimpleSAML/Utils/System.php b/src/SimpleSAML/Utils/System.php index 623be6bf08..cabac093e3 100644 --- a/src/SimpleSAML/Utils/System.php +++ b/src/SimpleSAML/Utils/System.php @@ -77,9 +77,9 @@ public function getTempDir(): string $tempDir = rtrim( $globalConfig->getOptionalString( 'tempdir', - sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'simplesaml' + sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'simplesaml', ), - DIRECTORY_SEPARATOR + DIRECTORY_SEPARATOR, ); /** @@ -91,14 +91,14 @@ public function getTempDir(): string $error = error_get_last(); throw new Error\Exception( 'Error creating temporary directory "' . $tempDir . '": ' . - (is_array($error) ? $error['message'] : 'no error available') + (is_array($error) ? $error['message'] : 'no error available'), ); } } elseif (!is_writable($tempDir)) { throw new Error\Exception( 'Temporary directory "' . $tempDir . '" cannot be written to by the current user' . - (function_exists('posix_getuid') ? ' "' . posix_getuid() . '"' : '') + (function_exists('posix_getuid') ? ' "' . posix_getuid() . '"' : ''), ); } @@ -195,7 +195,7 @@ public function writeFile(string $filename, string $data, int $mode = 0600): voi $error = error_get_last(); throw new Error\Exception( 'Error saving file "' . $tmpFile . '": ' . - (is_array($error) ? $error['message'] : 'no error available') + (is_array($error) ? $error['message'] : 'no error available'), ); } @@ -206,7 +206,7 @@ public function writeFile(string $filename, string $data, int $mode = 0600): voi $error = error_get_last(); throw new Error\Exception( 'Error changing file mode of "' . $tmpFile . '": ' . - (is_array($error) ? $error['message'] : 'no error available') + (is_array($error) ? $error['message'] : 'no error available'), ); } } @@ -217,7 +217,7 @@ public function writeFile(string $filename, string $data, int $mode = 0600): voi $error = error_get_last(); throw new Error\Exception( 'Error moving "' . $tmpFile . '" to "' . $filename . '": ' . - (is_array($error) ? $error['message'] : 'no error available') + (is_array($error) ? $error['message'] : 'no error available'), ); } diff --git a/src/SimpleSAML/Utils/Translate.php b/src/SimpleSAML/Utils/Translate.php index 608d9a39d5..dba77c7e7d 100644 --- a/src/SimpleSAML/Utils/Translate.php +++ b/src/SimpleSAML/Utils/Translate.php @@ -20,7 +20,7 @@ class Translate public function __construct( - protected Configuration $configuration + protected Configuration $configuration, ) { $this->baseDir = $configuration->getBaseDir(); } diff --git a/src/SimpleSAML/Utils/XML.php b/src/SimpleSAML/Utils/XML.php index 47c45be63e..dc2645a660 100644 --- a/src/SimpleSAML/Utils/XML.php +++ b/src/SimpleSAML/Utils/XML.php @@ -350,7 +350,7 @@ function (string $public = null, string $system, /** @scrutinizer ignore-unused return null; } return $system; - } + }, ); /** @psalm-suppress PossiblyUndefinedVariable */ diff --git a/src/SimpleSAML/XHTML/IdPDisco.php b/src/SimpleSAML/XHTML/IdPDisco.php index c35191c13d..1e049fcf1a 100644 --- a/src/SimpleSAML/XHTML/IdPDisco.php +++ b/src/SimpleSAML/XHTML/IdPDisco.php @@ -115,7 +115,7 @@ class IdPDisco */ public function __construct( protected array $metadataSets, - protected string $instance + protected string $instance, ) { // initialize standard classes $this->config = Configuration::getInstance(); @@ -519,12 +519,12 @@ protected function start(): void 'IdPentityID' => $idp, 'returnIDParam' => $this->returnIdParam, 'isPassive' => 'true', - 'return' => $this->returnURL + 'return' => $this->returnURL, ]); } else { $this->log( 'Choice made [' . $idp . '] (Redirecting the user back. returnIDParam=' - . $this->returnIdParam . ')' + . $this->returnIdParam . ')', ); $httpUtils->redirectTrustedURL($this->returnURL, [$this->returnIdParam => $idp]); } @@ -562,11 +562,11 @@ public function handleRequest(): void if (sizeof($idpintersection) == 1) { $this->log( 'Choice made [' . $idpintersection[0] . '] (Redirecting the user back. returnIDParam=' . - $this->returnIdParam . ')' + $this->returnIdParam . ')', ); $httpUtils->redirectTrustedURL( $this->returnURL, - [$this->returnIdParam => $idpintersection[0]] + [$this->returnIdParam => $idpintersection[0]], ); } @@ -607,7 +607,7 @@ public function handleRequest(): void */ function (array $idpentry1, array $idpentry2) { return strcasecmp($idpentry1['name'], $idpentry2['name']); - } + }, ); $t->data['idplist'] = $newlist; diff --git a/src/SimpleSAML/XHTML/Template.php b/src/SimpleSAML/XHTML/Template.php index 201fe882e3..b7a452fecb 100644 --- a/src/SimpleSAML/XHTML/Template.php +++ b/src/SimpleSAML/XHTML/Template.php @@ -130,7 +130,7 @@ class Template extends Response */ public function __construct( private Configuration $configuration, - private string $template + private string $template, ) { // TODO: do not remove the slash from the beginning, change the templates instead! $this->data['baseurlpath'] = ltrim($configuration->getBasePath(), '/'); @@ -140,7 +140,7 @@ public function __construct( // parse config to find theme and module theme is in, if any list($this->theme['module'], $this->theme['name']) = $this->findModuleAndTemplateName( - $this->configuration->getOptionalString('theme.use', 'default') + $this->configuration->getOptionalString('theme.use', 'default'), ); // initialize internationalization system @@ -159,7 +159,7 @@ class_exists($controller) } else { throw new Error\ConfigurationError( 'Invalid controller was configured in `theme.controller`. ' . - ' Make sure the class exists and implements the TemplateControllerInterface.' + ' Make sure the class exists and implements the TemplateControllerInterface.', ); } } @@ -260,7 +260,7 @@ private function setupTwigTemplatepaths(): TemplateLoader if ($this->theme['module']) { try { $templateDirs[] = [ - $this->theme['module'] => TemplateLoader::getModuleTemplateDir($this->theme['module']) + $this->theme['module'] => TemplateLoader::getModuleTemplateDir($this->theme['module']), ]; } catch (InvalidArgumentException $e) { // either the module is not enabled or it has no "templates" directory, ignore @@ -271,7 +271,7 @@ private function setupTwigTemplatepaths(): TemplateLoader // default, themeless templates are checked last $templateDirs[] = [ - FilesystemLoader::MAIN_NAMESPACE => $this->configuration->resolvePath('templates') + FilesystemLoader::MAIN_NAMESPACE => $this->configuration->resolvePath('templates'), ]; foreach ($templateDirs as $entry) { $loader->addPath($entry[key($entry)], key($entry)); @@ -342,15 +342,15 @@ private function setupTwig(): Environment new TwigFilter( 'translateFromArray', [Translate::class, 'translateFromArray'], - ['needs_context' => true] - ) + ['needs_context' => true], + ), ); // add a filter for preferred entity name $twig->addFilter( new TwigFilter( 'entityDisplayName', [$this, 'getEntityDisplayName'], - ) + ), ); // add an asset() function @@ -470,7 +470,7 @@ private function generateLanguageBar(): ?array $httpUtils = new Utils\HTTP(); $url = $httpUtils->addURLParameters( '', - [$parameterName => $lang] + [$parameterName => $lang], ); } $langmap[$lang] = [ diff --git a/src/SimpleSAML/XML/Parser.php b/src/SimpleSAML/XML/Parser.php index 150548ca13..6a02f27ac3 100644 --- a/src/SimpleSAML/XML/Parser.php +++ b/src/SimpleSAML/XML/Parser.php @@ -83,7 +83,7 @@ public function getValue(string $xpath, bool $required = false): ?string if (!is_array($result) || empty($result)) { if ($required) { throw new \Exception( - 'Could not get value from XML document using the following XPath expression: ' . $xpath + 'Could not get value from XML document using the following XPath expression: ' . $xpath, ); } else { return null; @@ -110,7 +110,7 @@ public function getValueAlternatives(array $xpath, bool $required = false): ?str if ($required) { throw new \Exception( - 'Could not get value from XML document using multiple alternative XPath expressions.' + 'Could not get value from XML document using multiple alternative XPath expressions.', ); } else { return null; diff --git a/src/SimpleSAML/XML/Signer.php b/src/SimpleSAML/XML/Signer.php index 33b321dafc..3e1dfe9d49 100644 --- a/src/SimpleSAML/XML/Signer.php +++ b/src/SimpleSAML/XML/Signer.php @@ -253,7 +253,7 @@ public function addCertificate(string $location, bool $full_path = false): void public function sign( DOMElement $node, DOMElement $insertInto, - DOMElement|DOMComment|DOMText|null $insertBefore = null + DOMElement|DOMComment|DOMText|null $insertBefore = null, ): void { $privateKey = $this->privateKey; if ($privateKey === false) { @@ -273,7 +273,7 @@ public function sign( [$node], XMLSecurityDSig::SHA256, ['http://www.w3.org/2000/09/xmldsig#enveloped-signature', XMLSecurityDSig::EXC_C14N], - $options + $options, ); $objXMLSecDSig->sign($privateKey); diff --git a/src/SimpleSAML/XML/Validator.php b/src/SimpleSAML/XML/Validator.php index c903310528..9acdbfc730 100644 --- a/src/SimpleSAML/XML/Validator.php +++ b/src/SimpleSAML/XML/Validator.php @@ -51,7 +51,7 @@ class Validator public function __construct( DOMDocument $xmlNode, string|array|null $idAttribute = null, - array|false|null|string $publickey = false + array|false|null|string $publickey = false, ) { if ($publickey === null) { $publickey = false; diff --git a/templates/_table.twig b/templates/_table.twig index 2ada6a8a1c..df05e0d43e 100644 --- a/templates/_table.twig +++ b/templates/_table.twig @@ -7,17 +7,16 @@ {{ name }} {%- endblock %} - {% apply spaceless %} - {% for value in values %} - {% if loop.length>1 and loop.first %}
    {% endif %} - {% if loop.length>1 %}
  • {% endif -%} + + {% for value in values %} + {% if loop.length>1 and loop.first %}
      {% endif -%} + {%- if loop.length>1 %}
    • {% endif -%} - {% block value %}{% endblock %} + {%- block value %}{% endblock -%} - {% if loop.length>1 %}
    • {% endif %} - {% if loop.length>1 and loop.last %}
    {% endif %} - {% endfor %} - {% endapply -%} + {%- if loop.length>1 %}
  • {% endif -%} + {%- if loop.length>1 and loop.last %}
{% endif %} + {% endfor %} {% endfor %} diff --git a/templates/base.twig b/templates/base.twig index bfb6a0b6c4..a649c4c0a2 100644 --- a/templates/base.twig +++ b/templates/base.twig @@ -1,4 +1,3 @@ -{% apply spaceless %} @@ -32,4 +31,3 @@ {% block postload %}{% endblock %} -{% endapply %} diff --git a/templates/post.twig b/templates/post.twig index 82f08bcfe9..5072e8ddab 100644 --- a/templates/post.twig +++ b/templates/post.twig @@ -21,7 +21,7 @@ {%- if value is iterable %} {%- for index, item in value %} - + {%- endfor %} {%- else %} diff --git a/tests/SigningTestCase.php b/tests/SigningTestCase.php index 2ab9443eb9..1dbb858839 100644 --- a/tests/SigningTestCase.php +++ b/tests/SigningTestCase.php @@ -198,7 +198,7 @@ public function setUp(): void null, [ self::DEFAULTCERTDIR => $this->getCertDirContent(), - ] + ], ); $this->root_directory = vfsStream::url(self::ROOTDIRNAME); diff --git a/tests/Utils/SpTester.php b/tests/Utils/SpTester.php index 7f8d01884b..8a0ea18b3f 100644 --- a/tests/Utils/SpTester.php +++ b/tests/Utils/SpTester.php @@ -49,7 +49,7 @@ public function sendSAML2AuthnRequest(Binding $binding, AuthnRequest $ar): void [ 'binding' => $binding, 'ar' => $ar, - ] + ], ); } @@ -64,7 +64,7 @@ public function sendSAML2LogoutRequest(Binding $binding, LogoutRequest $lr): voi [ 'binding' => $binding, 'lr' => $lr, - ] + ], ); } } diff --git a/tests/modules/admin/src/Controller/ConfigTest.php b/tests/modules/admin/src/Controller/ConfigTest.php index cc0ab67489..0f38125235 100644 --- a/tests/modules/admin/src/Controller/ConfigTest.php +++ b/tests/modules/admin/src/Controller/ConfigTest.php @@ -40,7 +40,7 @@ protected function setUp(): void [ 'module.enable' => ['admin' => true], 'secretsalt' => 'defaultsecretsalt', - 'admin.checkforupdates' => true + 'admin.checkforupdates' => true, ], '[ARRAY]' ) extends Configuration @@ -55,7 +55,7 @@ public function getVersion(): string $this->config::setPreloadedConfig( Configuration::loadFromArray([], '[ARRAY]', 'simplesaml'), 'config.php', - 'simplesaml' + 'simplesaml', ); $this->authUtils = new class () extends Utils\Auth { @@ -80,7 +80,7 @@ public function testDiagnostics(): void $_SERVER['REQUEST_URI'] = '/module.php/admin/diagnostics'; $request = Request::create( '/diagnostics', - 'GET' + 'GET', ); $c = new Controller\Config($this->config, $this->session); @@ -98,7 +98,7 @@ public function testMain(): void $_SERVER['REQUEST_URI'] = '/module.php/admin'; $request = Request::create( '/', - 'GET' + 'GET', ); $c = new Controller\Config($this->config, $this->session); @@ -116,7 +116,7 @@ public function testPhpinfo(): void $_SERVER['REQUEST_URI'] = '/module.php/admin/phpinfo'; $request = Request::create( '/phpinfo', - 'GET' + 'GET', ); $c = new Controller\Config($this->config, $this->session); diff --git a/tests/modules/admin/src/Controller/FederationTest.php b/tests/modules/admin/src/Controller/FederationTest.php index d107e3ceb6..47a48e056a 100644 --- a/tests/modules/admin/src/Controller/FederationTest.php +++ b/tests/modules/admin/src/Controller/FederationTest.php @@ -9,6 +9,7 @@ use SimpleSAML\Configuration; use SimpleSAML\Metadata\MetaDataStorageHandler; use SimpleSAML\Module\admin\Controller; +use SimpleSAML\Module\saml\Auth\Source\SP; use SimpleSAML\Utils; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\Request; @@ -67,10 +68,10 @@ protected function setUp(): void 'enable.saml20-idp' => true, 'enable.adfs-idp' => true, 'language.default' => 'fr', - 'language.get_language_function' => [$this, 'getLanguage'] + 'language.get_language_function' => [$this, 'getLanguage'], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); $this->authUtils = new class () extends Utils\Auth { @@ -86,10 +87,10 @@ public function requireAdmin(): void 'admin' => ['core:AdminPassword'], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ), 'authsources.php', - 'simplesaml' + 'simplesaml', ); } @@ -100,7 +101,7 @@ public function testMain(): void { $request = Request::create( '/federation', - 'GET' + 'GET', ); $mdh = new class () extends MetaDataStorageHandler { @@ -115,21 +116,21 @@ public function getList(string $set = 'saml20-idp-remote', bool $showExpired = f 0 => [ 'name' => 'SimpleSAMLphp Hosted IDP', 'descr' => 'The local IDP', - 'OrganizationDisplayName' => ['en' => 'My IDP', 'nl' => 'Mijn IDP'] - ] + 'OrganizationDisplayName' => ['en' => 'My IDP', 'nl' => 'Mijn IDP'], + ], ]; } elseif ($set === 'saml20-sp-remote') { return [ 0 => [ 'name' => ['nl' => 'SimpleSAMLphp Remote SP'], 'descr' => 'The remote SP', - 'OrganizationDisplayName' => ['en' => 'His SP', 'nl' => 'Zijn SP', 'fr' => 'Son SP'] + 'OrganizationDisplayName' => ['en' => 'His SP', 'nl' => 'Zijn SP', 'fr' => 'Son SP'], ], 1 => [ 'name' => ['fr' => 'SimpleSAMLphp Remote SP'], 'descr' => 'The remote SP', - 'OrganizationDisplayName' => ['en' => 'Her SP'] - ] + 'OrganizationDisplayName' => ['en' => 'Her SP'], + ], ]; } return []; @@ -150,7 +151,7 @@ public function authenticate(array &$state): void public static function getSourcesOfType(string $type): array { return [ - new \SimpleSAML\Module\saml\Auth\Source\SP( + new SP( ['AuthId' => 'AuthId'], [ 'saml:SP', @@ -161,9 +162,9 @@ public static function getSourcesOfType(string $type): array 'entityID' => 'urn:x-simplesamlphp:example-sp', 'privatekey' => FederationTest::CERT_KEY, 'certificate' => FederationTest::CERT_PUBLIC, - 'attributes' => ['uid', 'mail'] - ] - ) + 'attributes' => ['uid', 'mail'], + ], + ), ]; } }; @@ -184,7 +185,7 @@ public function testMetadataConverterFileUpload(): void { $request = Request::create( '/federation/metadata-converter', - 'POST' + 'POST', ); $request->files->add( [ @@ -193,9 +194,9 @@ public function testMetadataConverterFileUpload(): void 'valid-metadata-selfsigned.xml', 'application/xml', null, - true - ) - ] + true, + ), + ], ); $c = new Controller\Federation($this->config); @@ -214,7 +215,7 @@ public function testMetadataConverterData(): void $request = Request::create( '/federation/metadata-converter', 'POST', - ['xmldata' => file_get_contents($this->metadata_xml)] + ['xmldata' => file_get_contents($this->metadata_xml)], ); $c = new Controller\Federation($this->config); @@ -232,7 +233,7 @@ public function testMetadataConverterSkipsExpires(): void $request = Request::create( '/federation/metadata-converter', 'POST', - ['xmldata' => file_get_contents($this->expired_metadata_xml)] + ['xmldata' => file_get_contents($this->expired_metadata_xml)], ); $c = new Controller\Federation($this->config); @@ -251,7 +252,7 @@ public function testMetadataConverterInvalidMetadataShowsError(): void $request = Request::create( '/federation/metadata-converter', 'POST', - ['xmldata' => file_get_contents($this->broken_metadata_xml)] + ['xmldata' => file_get_contents($this->broken_metadata_xml)], ); $c = new Controller\Federation($this->config); @@ -271,7 +272,7 @@ public function testMetadataConverterEmptyInput(): void $request = Request::create( '/federation/metadata-converter', 'POST', - ['xmldata' => ''] + ['xmldata' => ''], ); $c = new Controller\Federation($this->config); @@ -294,8 +295,8 @@ public function testDownloadCertSP(): void 'GET', [ 'set' => 'saml20-sp-hosted', - 'source' => 'default-sp' - ] + 'source' => 'default-sp', + ], ); $c = new Controller\Federation($this->config); @@ -316,7 +317,7 @@ public function getMetadata(): Configuration return Configuration::loadFromArray( ['certData' => 'abc123'], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); } @@ -345,8 +346,8 @@ public function testDownloadCertFile(): void 'GET', [ 'set' => 'saml20-idp-hosted', - 'entity' => 'some entity' - ] + 'entity' => 'some entity', + ], ); $mdh = new class () extends MetaDataStorageHandler { @@ -382,7 +383,7 @@ public function testShowRemoteEntity(): void $request = Request::create( '/federation/show', 'GET', - ['set' => 'saml20-sp-hosted', 'entityid' => 'some entity'] + ['set' => 'saml20-sp-hosted', 'entityid' => 'some entity'], ); $mdh = new class () extends MetaDataStorageHandler { diff --git a/tests/modules/admin/src/Controller/SandboxTest.php b/tests/modules/admin/src/Controller/SandboxTest.php index dd9f0513cb..973384c7a9 100644 --- a/tests/modules/admin/src/Controller/SandboxTest.php +++ b/tests/modules/admin/src/Controller/SandboxTest.php @@ -37,7 +37,7 @@ protected function setUp(): void 'module.enable' => ['admin' => true], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); $this->session = Session::getSessionFromRequest(); diff --git a/tests/modules/admin/src/Controller/TestTest.php b/tests/modules/admin/src/Controller/TestTest.php index 9cdc53e118..b6fd728fce 100644 --- a/tests/modules/admin/src/Controller/TestTest.php +++ b/tests/modules/admin/src/Controller/TestTest.php @@ -46,7 +46,7 @@ protected function setUp(): void 'module.enable' => ['admin' => true], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); $this->authUtils = new class () extends Utils\Auth { @@ -64,10 +64,10 @@ public function requireAdmin(): void 'admin' => ['core:AdminPassword'], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ), 'authsources.php', - 'simplesaml' + 'simplesaml', ); } @@ -79,7 +79,7 @@ public function testMainWithoutAuthSource(): void $_SERVER['REQUEST_URI'] = '/module.php/admin/test'; $request = Request::create( '/test', - 'GET' + 'GET', ); $c = new TestController($this->config, $this->session); @@ -99,7 +99,7 @@ public function testMainWithAuthSourceAndLogout(): void $request = Request::create( '/test', 'GET', - ['logout' => 'notnull'] + ['logout' => 'notnull'], ); $c = new TestController($this->config, $this->session); @@ -124,7 +124,7 @@ public function testLogoutReturnsTemplate(): void { $request = Request::create( '/logout', - 'GET' + 'GET', ); $c = new TestController($this->config, $this->session); @@ -143,7 +143,7 @@ public function testMainWithAuthSourceAndException(): void $request = Request::create( '/test', 'GET', - [Auth\State::EXCEPTION_PARAM => 'someException'] + [Auth\State::EXCEPTION_PARAM => 'someException'], ); $c = new TestController($this->config, $this->session); @@ -169,7 +169,7 @@ public function testMainWithAuthSourceNotAuthenticated(): void $request = Request::create( '/test', 'GET', - ['as' => 'admin'] + ['as' => 'admin'], ); $c = new TestController($this->config, $this->session); @@ -200,7 +200,7 @@ public function testMainWithAuthSourceAuthenticated(): void $_SERVER['REQUEST_URI'] = '/module.php/admin/test'; $request = Request::create( '/test', - 'GET' + 'GET', ); $c = new TestController($this->config, $this->session); @@ -223,30 +223,30 @@ public function getAttributes(): array /** @psalm-suppress PossiblyNullPropertyFetch */ return [ 'urn:mace:dir:attribute-def:cn' => [ - 'Tim van Dijen' + 'Tim van Dijen', ], 'urn:mace:dir:attribute-def:givenName' => [ - 'Tim' + 'Tim', ], 'urn:mace:dir:attribute-def:sn' => [ - 'van Dijen' + 'van Dijen', ], 'urn:mace:dir:attribute-def:displayName' => [ - 'Mr. T. van Dijen BSc' + 'Mr. T. van Dijen BSc', ], 'urn:mace:dir:attribute-def:mail' => [ 'tvdijen@hotmail.com', - 'tvdijen@gmail.com' + 'tvdijen@gmail.com', ], 'urn:mace:dir:attribute-def:eduPersonTargetedID' => [ - $nameId->toXML()->ownerDocument->childNodes + $nameId->toXML()->ownerDocument->childNodes, ], 'jpegPhoto' => [ - 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=' + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=', ], 'nameId' => [ - $nameId - ] + $nameId, + ], ]; } diff --git a/tests/modules/core/src/Auth/Process/AttributeAlterTest.php b/tests/modules/core/src/Auth/Process/AttributeAlterTest.php index 9652c22ae0..1784db6f9a 100644 --- a/tests/modules/core/src/Auth/Process/AttributeAlterTest.php +++ b/tests/modules/core/src/Auth/Process/AttributeAlterTest.php @@ -91,7 +91,7 @@ public function testMergeWithTarget(): void 'target' => 'test2', 'pattern' => '/wrong/', 'replacement' => 'right', - '%merge' + '%merge', ]; $request = [ @@ -132,7 +132,7 @@ public function testNomatch(): void $this->assertEquals( $attributes, ['something' => ['somevalue'], - 'somethingelse' => ['someothervalue']] + 'somethingelse' => ['someothervalue']], ); } diff --git a/tests/modules/core/src/Auth/Process/AttributeLimitTest.php b/tests/modules/core/src/Auth/Process/AttributeLimitTest.php index 829ba1ce43..1191c6167c 100644 --- a/tests/modules/core/src/Auth/Process/AttributeLimitTest.php +++ b/tests/modules/core/src/Auth/Process/AttributeLimitTest.php @@ -44,7 +44,7 @@ private static function processFilter(array $config, array $request): array public function testIdPAttrs(): void { $config = [ - 'cn', 'mail' + 'cn', 'mail', ]; $request = [ @@ -90,7 +90,7 @@ public function testIdPAttrs(): void public function testNULLMetadataAttrs(): void { $config = [ - 'cn', 'mail' + 'cn', 'mail', ]; $request = [ @@ -166,7 +166,7 @@ public static function setUpBeforeClass(): void public function testBasic(): void { $config = [ - 'cn', 'mail' + 'cn', 'mail', ]; $result = self::processFilter($config, self::$request); @@ -235,7 +235,7 @@ public function testInvalidAttributeName(): void { $this->expectException(Exception::class); $config = [ - null + null, ]; self::processFilter($config, self::$request); @@ -248,7 +248,7 @@ public function testInvalidAttributeName(): void public function testMatchAttributeValues(): void { $config = [ - 'eduPersonAffiliation' => ['member'] + 'eduPersonAffiliation' => ['member'], ]; $result = self::processFilter($config, self::$request); @@ -258,7 +258,7 @@ public function testMatchAttributeValues(): void $this->assertEquals($attributes['eduPersonAffiliation'], ['member']); $config = [ - 'eduPersonAffiliation' => ['member', 'staff'] + 'eduPersonAffiliation' => ['member', 'staff'], ]; $result = self::processFilter($config, self::$request); @@ -268,14 +268,14 @@ public function testMatchAttributeValues(): void $this->assertEquals($attributes['eduPersonAffiliation'], ['member']); $config = [ - 'eduPersonAffiliation' => ['student'] + 'eduPersonAffiliation' => ['student'], ]; $result = self::processFilter($config, self::$request); $attributes = $result['Attributes']; $this->assertCount(0, $attributes); $config = [ - 'eduPersonAffiliation' => ['student', 'staff'] + 'eduPersonAffiliation' => ['student', 'staff'], ]; $result = self::processFilter($config, self::$request); $attributes = $result['Attributes']; @@ -290,7 +290,7 @@ public function testBadOptionsNotTreatedAsValidValues(): void // Ensure really misconfigured ignoreCase and regex options are not interpreted as valid valus $config = [ 'eduPersonAffiliation' => ['ignoreCase' => 'member', 'nomatch'], - 'mail' => ['regex' => 'user@example.org', 'nomatch'] + 'mail' => ['regex' => 'user@example.org', 'nomatch'], ]; $result = self::processFilter($config, self::$request); $attributes = $result['Attributes']; @@ -305,7 +305,7 @@ public function testBadOptionsNotTreatedAsValidValues(): void public function testThatIgnoreCaseOptionNotMatchBooleanAsStringValue(): void { $config = [ - 'someAttribute' => ['ignoreCase' => true, 'someValue'] + 'someAttribute' => ['ignoreCase' => true, 'someValue'], ]; $request = [ @@ -326,7 +326,7 @@ public function testThatIgnoreCaseOptionNotMatchBooleanAsStringValue(): void public function testMatchAttributeValuesIgnoreCase(): void { $config = [ - 'eduPersonAffiliation' => ['ignoreCase' => true, 'meMber'] + 'eduPersonAffiliation' => ['ignoreCase' => true, 'meMber'], ]; $result = self::processFilter($config, self::$request); @@ -336,7 +336,7 @@ public function testMatchAttributeValuesIgnoreCase(): void $this->assertEquals($attributes['eduPersonAffiliation'], ['member']); $config = [ - 'eduPersonAffiliation' => ['ignoreCase' => true, 'membeR', 'sTaff'] + 'eduPersonAffiliation' => ['ignoreCase' => true, 'membeR', 'sTaff'], ]; $result = self::processFilter($config, self::$request); @@ -346,14 +346,14 @@ public function testMatchAttributeValuesIgnoreCase(): void $this->assertEquals($attributes['eduPersonAffiliation'], ['member']); $config = [ - 'eduPersonAffiliation' => ['ignoreCase' => true, 'Student'] + 'eduPersonAffiliation' => ['ignoreCase' => true, 'Student'], ]; $result = self::processFilter($config, self::$request); $attributes = $result['Attributes']; $this->assertCount(0, $attributes); $config = [ - 'eduPersonAffiliation' => ['ignoreCase' => true, 'studeNt', 'sTaff'] + 'eduPersonAffiliation' => ['ignoreCase' => true, 'studeNt', 'sTaff'], ]; $result = self::processFilter($config, self::$request); $attributes = $result['Attributes']; @@ -373,14 +373,14 @@ public function testMatchAttributeValuesRegex(): void 'urn:mace:example.terena.org:tcs:personal-user', 'urn:x-surfnet:surfdomeinen.nl:role:dnsadmin', 'urn:x-surfnet:surf.nl:surfdrive:quota:100', - '1' //boolean true as a string + '1', //boolean true as a string ]; $config = [ 'eduPersonEntitlement' => [ 'regex' => true, - '/^urn:x-surfnet:surf/' - ] + '/^urn:x-surfnet:surf/', + ], ]; $result = self::processFilter($config, $state); @@ -389,7 +389,7 @@ public function testMatchAttributeValuesRegex(): void $this->assertArrayHasKey('eduPersonEntitlement', $attributes); $this->assertEquals( ['urn:x-surfnet:surfdomeinen.nl:role:dnsadmin', 'urn:x-surfnet:surf.nl:surfdrive:quota:100'], - $attributes['eduPersonEntitlement'] + $attributes['eduPersonEntitlement'], ); // Matching multiple lines shouldn't duplicate the attribute @@ -397,9 +397,8 @@ public function testMatchAttributeValuesRegex(): void 'eduPersonEntitlement' => [ 'regex' => true, '/urn:x-surfnet:surf/', - '/urn:x-surfnet/' - - ] + '/urn:x-surfnet/', + ], ]; $result = self::processFilter($config, $state); @@ -408,7 +407,7 @@ public function testMatchAttributeValuesRegex(): void $this->assertArrayHasKey('eduPersonEntitlement', $attributes); $this->assertEquals( ['urn:x-surfnet:surfdomeinen.nl:role:dnsadmin', 'urn:x-surfnet:surf.nl:surfdrive:quota:100'], - $attributes['eduPersonEntitlement'] + $attributes['eduPersonEntitlement'], ); // Invalid and no-match regex expressions should not stop a valid regex from matching @@ -417,8 +416,8 @@ public function testMatchAttributeValuesRegex(): void 'regex' => true, '/urn:mace:example.terena.org:tcs:no-match/', '$invalidRegex[', - '/^URN:x-surf.*SURF.*n$/i' - ] + '/^URN:x-surf.*SURF.*n$/i', + ], ]; $result = self::processFilter($config, $state); @@ -427,15 +426,15 @@ public function testMatchAttributeValuesRegex(): void $this->assertArrayHasKey('eduPersonEntitlement', $attributes); $this->assertEquals( ['urn:x-surfnet:surfdomeinen.nl:role:dnsadmin'], - $attributes['eduPersonEntitlement'] + $attributes['eduPersonEntitlement'], ); // No matches should remove attribute $config = [ 'eduPersonEntitlement' => [ 'regex' => true, - '/urn:x-no-match/' - ] + '/urn:x-no-match/', + ], ]; $result = self::processFilter($config, $state); $attributes = $result['Attributes']; @@ -445,8 +444,8 @@ public function testMatchAttributeValuesRegex(): void $config = [ 'eduPersonEntitlement' => [ 'regex' => true, - '/surf/' - ] + '/surf/', + ], ]; $result = self::processFilter($config, $state); $attributes = $result['Attributes']; @@ -454,7 +453,7 @@ public function testMatchAttributeValuesRegex(): void $this->assertArrayHasKey('eduPersonEntitlement', $attributes); $this->assertEquals( ['urn:x-surfnet:surfdomeinen.nl:role:dnsadmin', 'urn:x-surfnet:surf.nl:surfdrive:quota:100'], - $attributes['eduPersonEntitlement'] + $attributes['eduPersonEntitlement'], ); } diff --git a/tests/modules/core/src/Auth/Process/CardinalitySingleTest.php b/tests/modules/core/src/Auth/Process/CardinalitySingleTest.php index 30fe474fa6..1d6ab84add 100644 --- a/tests/modules/core/src/Auth/Process/CardinalitySingleTest.php +++ b/tests/modules/core/src/Auth/Process/CardinalitySingleTest.php @@ -57,7 +57,7 @@ protected function setUp(): void public function testSingleValuedUnchanged(): void { $config = [ - 'singleValued' => ['eduPersonPrincipalName'] + 'singleValued' => ['eduPersonPrincipalName'], ]; $request = [ 'Attributes' => [ @@ -77,7 +77,7 @@ public function testSingleValuedUnchanged(): void public function testFirstValue(): void { $config = [ - 'firstValue' => ['eduPersonPrincipalName'] + 'firstValue' => ['eduPersonPrincipalName'], ]; $request = [ 'Attributes' => [ @@ -96,7 +96,7 @@ public function testFirstValue(): void public function testFirstValueUnchanged(): void { $config = [ - 'firstValue' => ['eduPersonPrincipalName'] + 'firstValue' => ['eduPersonPrincipalName'], ]; $request = [ 'Attributes' => [ @@ -167,7 +167,7 @@ public function testAbort(): void /** @psalm-suppress UndefinedMethod */ $this->httpUtils->expects($this->once()) - ->method('redirectTrustedURL'); + ->method('redirectTrustedURL'); $this->processFilter($config, $request); } diff --git a/tests/modules/core/src/Auth/Process/PHPTest.php b/tests/modules/core/src/Auth/Process/PHPTest.php index 28493d48b0..9586050269 100644 --- a/tests/modules/core/src/Auth/Process/PHPTest.php +++ b/tests/modules/core/src/Auth/Process/PHPTest.php @@ -40,7 +40,7 @@ public function testInvalidConfiguration(): void $config = []; $this->expectException(Error\Exception::class); $this->expectExceptionMessage( - "core:PHP: missing mandatory configuration option 'code'." + "core:PHP: missing mandatory configuration option 'code'.", ); new PHP($config, null); } @@ -81,14 +81,14 @@ public function testPreserveIncomingAttributes(): void 'Attributes' => [ 'orig1' => ['value1', 'value2'], 'orig2' => ['value3'], - 'orig3' => ['value4'] - ] + 'orig3' => ['value4'], + ], ]; $expected = [ 'Attributes' => [ 'orig1' => ['value1', 'value2'], 'orig2' => ['value0'], - 'orig3' => ['value4'] + 'orig3' => ['value4'], ], ]; @@ -113,7 +113,7 @@ public function testThrowExceptionFromFilter(): void $request = [ 'Attributes' => [ 'orig1' => ['value1', 'value2'], - ] + ], ]; $this->expectException(Exception::class); @@ -139,22 +139,22 @@ public function testStateCanBeModified(): void 'Attributes' => [ 'orig1' => ['value1', 'value2'], 'orig2' => ['value3'], - 'orig3' => ['value4'] + 'orig3' => ['value4'], ], 'Destination' => [ - 'attributes' => ['eduPersonPrincipalName'] + 'attributes' => ['eduPersonPrincipalName'], ], ]; $expected = [ 'Attributes' => [ 'orig1' => ['value1', 'value2'], 'orig2' => ['value0'], - 'orig3' => ['value4'] + 'orig3' => ['value4'], ], 'Destination' => [ - 'attributes' => ['eduPersonPrincipalName', 'givenName'] + 'attributes' => ['eduPersonPrincipalName', 'givenName'], ], - 'newKey' => ['newValue'] + 'newKey' => ['newValue'], ]; $this->assertEquals($expected, $this->processFilter($config, $request)); diff --git a/tests/modules/core/src/Auth/Process/ScopeAttributeTest.php b/tests/modules/core/src/Auth/Process/ScopeAttributeTest.php index 2ef2d6f510..65ee459a5b 100644 --- a/tests/modules/core/src/Auth/Process/ScopeAttributeTest.php +++ b/tests/modules/core/src/Auth/Process/ScopeAttributeTest.php @@ -43,7 +43,7 @@ public function testBasic(): void 'Attributes' => [ 'eduPersonPrincipalName' => ['jdoe@example.com'], 'eduPersonAffiliation' => ['member'], - ] + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; @@ -67,13 +67,13 @@ public function testNoOverwrite(): void 'eduPersonPrincipalName' => ['jdoe@example.com'], 'eduPersonAffiliation' => ['member'], 'eduPersonScopedAffiliation' => ['library-walk-in@example.edu'], - ] + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; $this->assertEquals( $attributes['eduPersonScopedAffiliation'], - ['library-walk-in@example.edu', 'member@example.com'] + ['library-walk-in@example.edu', 'member@example.com'], ); } @@ -93,7 +93,7 @@ public function testNoDuplication(): void 'eduPersonPrincipalName' => ['jdoe@example.com'], 'eduPersonAffiliation' => ['member'], 'eduPersonScopedAffiliation' => ['member@example.com'], - ] + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; @@ -116,7 +116,7 @@ public function testNoSourceAttribute(): void 'mail' => ['j.doe@example.edu', 'john@example.org'], 'eduPersonAffiliation' => ['member'], 'eduPersonScopedAffiliation' => ['library-walk-in@example.edu'], - ] + ], ]; $result = self::processFilter($config, $request); $this->assertEquals($request['Attributes'], $result['Attributes']); @@ -138,7 +138,7 @@ public function testNoScopeAttribute(): void 'mail' => ['j.doe@example.edu', 'john@example.org'], 'eduPersonScopedAffiliation' => ['library-walk-in@example.edu'], 'eduPersonPrincipalName' => ['jdoe@example.com'], - ] + ], ]; $result = self::processFilter($config, $request); $this->assertEquals($request['Attributes'], $result['Attributes']); @@ -159,7 +159,7 @@ public function testMultiAt(): void 'Attributes' => [ 'eduPersonPrincipalName' => ['john@doe@example.com'], 'eduPersonAffiliation' => ['member'], - ] + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; @@ -181,13 +181,13 @@ public function testMultivaluedSource(): void 'Attributes' => [ 'eduPersonPrincipalName' => ['jdoe@example.com'], 'eduPersonAffiliation' => ['member', 'staff', 'faculty'], - ] + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; $this->assertEquals( $attributes['eduPersonScopedAffiliation'], - ['member@example.com', 'staff@example.com', 'faculty@example.com'] + ['member@example.com', 'staff@example.com', 'faculty@example.com'], ); } @@ -206,7 +206,7 @@ public function testNoAt(): void 'Attributes' => [ 'schacHomeOrganization' => ['example.org'], 'eduPersonAffiliation' => ['student'], - ] + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; @@ -230,7 +230,7 @@ public function testOnlyIfEmpty(): void 'schacHomeOrganization' => ['example.org'], 'eduPersonAffiliation' => ['student'], 'eduPersonScopedAffiliation' => ['staff@example.org', 'member@example.org'], - ] + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; diff --git a/tests/modules/core/src/Auth/Process/ScopeFromAttributeTest.php b/tests/modules/core/src/Auth/Process/ScopeFromAttributeTest.php index 0749662aac..7dcb4d2fed 100644 --- a/tests/modules/core/src/Auth/Process/ScopeFromAttributeTest.php +++ b/tests/modules/core/src/Auth/Process/ScopeFromAttributeTest.php @@ -41,7 +41,7 @@ public function testBasic(): void $request = [ 'Attributes' => [ 'eduPersonPrincipalName' => ['jdoe@example.com'], - ] + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; @@ -62,8 +62,8 @@ public function testNoOverwrite(): void $request = [ 'Attributes' => [ 'eduPersonPrincipalName' => ['jdoe@example.com'], - 'scope' => ['example.edu'] - ] + 'scope' => ['example.edu'], + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; @@ -83,8 +83,8 @@ public function testNoSourceAttribute(): void $request = [ 'Attributes' => [ 'mail' => ['j.doe@example.edu', 'john@example.org'], - 'scope' => ['example.edu'] - ] + 'scope' => ['example.edu'], + ], ]; $result = self::processFilter($config, $request); $this->assertEquals($request['Attributes'], $result['Attributes']); @@ -103,7 +103,7 @@ public function testMultiAt(): void $request = [ 'Attributes' => [ 'eduPersonPrincipalName' => ['john@doe@example.com'], - ] + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; @@ -123,7 +123,7 @@ public function testNoAt(): void $request = [ 'Attributes' => [ 'eduPersonPrincipalName' => ['johndoe'], - ] + ], ]; $result = self::processFilter($config, $request); $attributes = $result['Attributes']; diff --git a/tests/modules/core/src/Auth/Process/TargetedIDTest.php b/tests/modules/core/src/Auth/Process/TargetedIDTest.php index 27387a74f8..1478ae0097 100644 --- a/tests/modules/core/src/Auth/Process/TargetedIDTest.php +++ b/tests/modules/core/src/Auth/Process/TargetedIDTest.php @@ -143,7 +143,7 @@ public function testNameIdGeneration(): void '#^[0-9a-f]{40}$#', - strval($attributes['eduPersonTargetedID'][0]) + strval($attributes['eduPersonTargetedID'][0]), ); } diff --git a/tests/modules/core/src/Auth/Source/SourceIPSelectorTest.php b/tests/modules/core/src/Auth/Source/SourceIPSelectorTest.php index 614d7f2109..65a2a10743 100644 --- a/tests/modules/core/src/Auth/Source/SourceIPSelectorTest.php +++ b/tests/modules/core/src/Auth/Source/SourceIPSelectorTest.php @@ -31,7 +31,7 @@ public function setUp(): void $this->config = Configuration::loadFromArray( ['module.enable' => ['core' => true]], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($this->config, 'config.php'); diff --git a/tests/modules/core/src/Auth/UserPassOrgBaseTest.php b/tests/modules/core/src/Auth/UserPassOrgBaseTest.php index 9ef45a5e07..04ca16f010 100644 --- a/tests/modules/core/src/Auth/UserPassOrgBaseTest.php +++ b/tests/modules/core/src/Auth/UserPassOrgBaseTest.php @@ -29,7 +29,7 @@ public function testRememberOrganizationEnabled(): void 'dnpattern' => 'uid=%username%,ou=employees,dc=example,dc=org', // Whether SSL/TLS should be used when contacting the LDAP server. 'enable_tls' => false, - ] + ], ]; /** @var \SimpleSAML\Module\core\Auth\UserPassOrgBase $mockUserPassOrgBase */ diff --git a/tests/modules/core/src/Controller/ErrorReportTest.php b/tests/modules/core/src/Controller/ErrorReportTest.php index 20db098478..cc59a2244a 100644 --- a/tests/modules/core/src/Controller/ErrorReportTest.php +++ b/tests/modules/core/src/Controller/ErrorReportTest.php @@ -41,7 +41,7 @@ protected function setUp(): void 'module.enable' => ['core' => true], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($this->config, 'config.php'); diff --git a/tests/modules/core/src/Controller/ExceptionTest.php b/tests/modules/core/src/Controller/ExceptionTest.php index a204c33ec8..cb72ff989c 100644 --- a/tests/modules/core/src/Controller/ExceptionTest.php +++ b/tests/modules/core/src/Controller/ExceptionTest.php @@ -45,7 +45,7 @@ public static function setUpBeforeClass(): void 'module.enable' => ['core' => true], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig(self::$config, 'config.php'); @@ -151,7 +151,7 @@ public function testErrorURLInvalidCode(): void $this->expectException(AssertionFailedException::class); $this->expectExceptionMessage( 'Expected one of: "IDENTIFICATION_FAILURE", "AUTHENTICATION_FAILURE",' - . ' "AUTHORIZATION_FAILURE", "OTHER_ERROR". Got: "doesNotExist"' + . ' "AUTHORIZATION_FAILURE", "OTHER_ERROR". Got: "doesNotExist"', ); $c->error($request, 'doesNotExist'); diff --git a/tests/modules/core/src/Controller/LoginTest.php b/tests/modules/core/src/Controller/LoginTest.php index fd0303e39c..0c0ccd7850 100644 --- a/tests/modules/core/src/Controller/LoginTest.php +++ b/tests/modules/core/src/Controller/LoginTest.php @@ -44,7 +44,7 @@ protected function setUp(): void 'module.enable' => ['exampleauth' => true], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($this->config, 'config.php'); diff --git a/tests/modules/core/src/Controller/LogoutTest.php b/tests/modules/core/src/Controller/LogoutTest.php index 9f9aefbe7d..43bb6ac4eb 100644 --- a/tests/modules/core/src/Controller/LogoutTest.php +++ b/tests/modules/core/src/Controller/LogoutTest.php @@ -43,7 +43,7 @@ protected function setUp(): void 'enable.saml20-idp' => true, ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($this->config, 'config.php'); } diff --git a/tests/modules/cron/src/Controller/CronTest.php b/tests/modules/cron/src/Controller/CronTest.php index 3b1f3be36e..6c59814a73 100644 --- a/tests/modules/cron/src/Controller/CronTest.php +++ b/tests/modules/cron/src/Controller/CronTest.php @@ -39,10 +39,10 @@ protected function setUp(): void $this->config = Configuration::loadFromArray( [ 'module.enable' => ['cron' => true], - 'secretsalt' => 'defaultsecretsalt' + 'secretsalt' => 'defaultsecretsalt', ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); $this->session = Session::getSessionFromRequest(); @@ -63,10 +63,10 @@ public function requireAdmin(): void 'sendemail' => false, ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ), 'module_cron.php', - 'simplesaml' + 'simplesaml', ); } diff --git a/tests/modules/exampleauth/src/Controller/ExampleAuthTest.php b/tests/modules/exampleauth/src/Controller/ExampleAuthTest.php index ad1ba0b89d..766b102b50 100644 --- a/tests/modules/exampleauth/src/Controller/ExampleAuthTest.php +++ b/tests/modules/exampleauth/src/Controller/ExampleAuthTest.php @@ -40,7 +40,7 @@ protected function setUp(): void 'module.enable' => ['exampleauth' => true], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); $this->session = Session::getSessionFromRequest(); diff --git a/tests/modules/multiauth/src/Auth/Source/MultiAuthTest.php b/tests/modules/multiauth/src/Auth/Source/MultiAuthTest.php index 768cd4a44c..3676d7694b 100644 --- a/tests/modules/multiauth/src/Auth/Source/MultiAuthTest.php +++ b/tests/modules/multiauth/src/Auth/Source/MultiAuthTest.php @@ -29,7 +29,7 @@ public function setUp(): void $this->config = Configuration::loadFromArray( ['module.enable' => ['multiauth' => true]], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($this->config, 'config.php'); diff --git a/tests/modules/multiauth/src/Controller/DiscoControllerTest.php b/tests/modules/multiauth/src/Controller/DiscoControllerTest.php index 4f2f820dd0..89892d0ff2 100644 --- a/tests/modules/multiauth/src/Controller/DiscoControllerTest.php +++ b/tests/modules/multiauth/src/Controller/DiscoControllerTest.php @@ -44,7 +44,7 @@ protected function setUp(): void 'module.enable' => ['multiauth' => true], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($this->config, 'config.php', 'simplesaml'); @@ -60,14 +60,14 @@ protected function setUp(): void 'sources' => [ 'admin' => [], 'admin2' => [], - ] + ], ], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ), 'authsources.php', - 'simplesaml' + 'simplesaml', ); } @@ -81,7 +81,7 @@ public function testDiscoveryMissingState(): void { $request = Request::create( '/discovery', - 'GET' + 'GET', ); $c = new Controller\DiscoController($this->config, $this->session); @@ -112,12 +112,12 @@ public static function loadState(string $id, string $stage, bool $allowMissing = { return [ 'LogoutState' => [ - 'multiauth:discovery' => 'foo' + 'multiauth:discovery' => 'foo', ], MultiAuth::SOURCESID => [ 'admin' => ['help' => ['en' => 'help'], 'text' => ['en' => 'text']], - 'admin2' => ['help' => ['en' => 'help'], 'text' => ['en' => 'text']] - ] + 'admin2' => ['help' => ['en' => 'help'], 'text' => ['en' => 'text']], + ], ]; } }); @@ -155,7 +155,7 @@ public function testDiscoveryFallthruWithSource(): void $request = Request::create( '/discovery', 'GET', - ['AuthState' => 'someState'] + ['AuthState' => 'someState'], ); $c = new Controller\DiscoController($this->config, $this->session); @@ -165,13 +165,13 @@ public static function loadState(string $id, string $stage, bool $allowMissing = { return [ 'LogoutState' => [ - 'multiauth:discovery' => 'foo' + 'multiauth:discovery' => 'foo', ], '\SimpleSAML\Auth\Source.id' => 'multi', MultiAuth::SOURCESID => [ 'admin' => ['help' => ['en' => 'help'], 'text' => ['en' => 'text']], - 'admin2' => ['help' => ['en' => 'help'], 'text' => ['en' => 'text']] - ] + 'admin2' => ['help' => ['en' => 'help'], 'text' => ['en' => 'text']], + ], ]; } }); @@ -209,7 +209,7 @@ public function testDiscoveryDelegateAuth1(): void $request = Request::create( '/discovery', 'GET', - ['AuthState' => 'someState'] + ['AuthState' => 'someState'], ); $c = new Controller\DiscoController($this->config, $this->session); @@ -219,15 +219,15 @@ public static function loadState(string $id, string $stage, bool $allowMissing = { return [ 'LogoutState' => [ - 'multiauth:discovery' => 'foo' + 'multiauth:discovery' => 'foo', ], 'multiauth:preselect' => 'admin', '\SimpleSAML\Auth\Source.id' => 'multi', MultiAuth::AUTHID => 'bar', MultiAuth::SOURCESID => [ 'admin' => ['help' => ['en' => 'help'], 'text' => ['nl' => 'text']], - 'admin2' => ['text' => ['en' => 'text'], 'help' => ['nl' => 'help']] - ] + 'admin2' => ['text' => ['en' => 'text'], 'help' => ['nl' => 'help']], + ], ]; } }); @@ -265,7 +265,7 @@ public function testDiscoveryDelegateAuth1WithPreviousSource(): void $request = Request::create( '/discovery', 'GET', - ['AuthState' => 'someState', 'source' => 'admin'] + ['AuthState' => 'someState', 'source' => 'admin'], ); $c = new Controller\DiscoController($this->config, $this->session); @@ -275,15 +275,15 @@ public static function loadState(string $id, string $stage, bool $allowMissing = { return [ 'LogoutState' => [ - 'multiauth:discovery' => 'foo' + 'multiauth:discovery' => 'foo', ], 'multiauth:preselect' => 'admin', '\SimpleSAML\Auth\Source.id' => 'multi', MultiAuth::AUTHID => 'bar', MultiAuth::SOURCESID => [ 'admin' => ['help' => ['en' => 'help']], - 'admin2' => ['text' => ['en' => 'text']] - ] + 'admin2' => ['text' => ['en' => 'text']], + ], ]; } }); @@ -321,7 +321,7 @@ public function testDiscoveryDelegateAuth2(): void $request = Request::create( '/discovery', 'GET', - ['AuthState' => 'someState', 'sourceChoice[admin]' => 'something admin'] + ['AuthState' => 'someState', 'sourceChoice[admin]' => 'something admin'], ); $c = new Controller\DiscoController($this->config, $this->session); @@ -331,13 +331,13 @@ public static function loadState(string $id, string $stage, bool $allowMissing = { return [ 'LogoutState' => [ - 'multiauth:discovery' => 'foo' + 'multiauth:discovery' => 'foo', ], MultiAuth::AUTHID => 'bar', MultiAuth::SOURCESID => [ 'admin' => ['help' => ['en' => 'help'], 'text' => ['en' => 'text']], - 'admin2' => ['text' => ['en' => 'text'], 'help' => ['en' => 'help']] - ] + 'admin2' => ['text' => ['en' => 'text'], 'help' => ['en' => 'help']], + ], ]; } }); diff --git a/tests/modules/saml/src/Auth/Process/FilterScopesTest.php b/tests/modules/saml/src/Auth/Process/FilterScopesTest.php index 89390149b3..10a1f0c4a2 100644 --- a/tests/modules/saml/src/Auth/Process/FilterScopesTest.php +++ b/tests/modules/saml/src/Auth/Process/FilterScopesTest.php @@ -150,7 +150,7 @@ public function testInvalidScopes(): void 'jdoe@example.com', ], ], - $result['Attributes'] + $result['Attributes'], ); // test attribute missing scope diff --git a/tests/modules/saml/src/Auth/Process/PairwiseIDTest.php b/tests/modules/saml/src/Auth/Process/PairwiseIDTest.php index 8cac1f0252..fab521804f 100644 --- a/tests/modules/saml/src/Auth/Process/PairwiseIDTest.php +++ b/tests/modules/saml/src/Auth/Process/PairwiseIDTest.php @@ -85,11 +85,11 @@ public function testBasic(): void $this->assertArrayHasKey(Constants::ATTR_PAIRWISE_ID, $attributes); $this->assertMatchesRegularExpression( PairwiseID::SPEC_PATTERN, - $attributes[Constants::ATTR_PAIRWISE_ID][0] + $attributes[Constants::ATTR_PAIRWISE_ID][0], ); $this->assertEquals( 'c22d58bebef42e50e203d0e932ae4a7f560a51d494266990a5b5c73f34b1854e@ex-ample.org', - $attributes[Constants::ATTR_PAIRWISE_ID][0] + $attributes[Constants::ATTR_PAIRWISE_ID][0], ); } @@ -109,11 +109,11 @@ public function testBasicScopedScope(): void $this->assertArrayHasKey(Constants::ATTR_PAIRWISE_ID, $attributes); $this->assertMatchesRegularExpression( PairwiseID::SPEC_PATTERN, - $attributes[Constants::ATTR_PAIRWISE_ID][0] + $attributes[Constants::ATTR_PAIRWISE_ID][0], ); $this->assertEquals( 'c22d58bebef42e50e203d0e932ae4a7f560a51d494266990a5b5c73f34b1854e@ex-ample.org', - $attributes[Constants::ATTR_PAIRWISE_ID][0] + $attributes[Constants::ATTR_PAIRWISE_ID][0], ); } @@ -133,11 +133,11 @@ public function testBasicProxiedRequest(): void $this->assertArrayHasKey(Constants::ATTR_PAIRWISE_ID, $attributes); $this->assertMatchesRegularExpression( PairwiseID::SPEC_PATTERN, - $attributes[Constants::ATTR_PAIRWISE_ID][0] + $attributes[Constants::ATTR_PAIRWISE_ID][0], ); $this->assertEquals( 'c22d58bebef42e50e203d0e932ae4a7f560a51d494266990a5b5c73f34b1854e@ex-ample.org', - $attributes[Constants::ATTR_PAIRWISE_ID][0] + $attributes[Constants::ATTR_PAIRWISE_ID][0], ); } @@ -157,11 +157,11 @@ public function testProxiedRequestMultipleHops(): void $this->assertArrayHasKey(Constants::ATTR_PAIRWISE_ID, $attributes); $this->assertMatchesRegularExpression( PairwiseID::SPEC_PATTERN, - $attributes[Constants::ATTR_PAIRWISE_ID][0] + $attributes[Constants::ATTR_PAIRWISE_ID][0], ); $this->assertEquals( 'c22d58bebef42e50e203d0e932ae4a7f560a51d494266990a5b5c73f34b1854e@ex-ample.org', - $attributes[Constants::ATTR_PAIRWISE_ID][0] + $attributes[Constants::ATTR_PAIRWISE_ID][0], ); } @@ -308,11 +308,11 @@ public function testUniqueIdentifierDifferentScopes(): void $this->assertMatchesRegularExpression( '/@example.org$/i', - $value1 + $value1, ); $this->assertMatchesRegularExpression( '/@example.edu$/i', - $value2 + $value2, ); } @@ -331,7 +331,7 @@ public function testWeakIdentifierLogsWarning(): void $expected = 'be511fc7f95e22816dbac21e3b70546660963b6e9b85f5a41d80bfc6baadd547@b'; $this->expectException(RuntimeException::class); $this->expectExceptionMessage( - 'saml:PairwiseID: Generated ID \'' . $expected . '\' can hardly be considered globally unique.' + 'saml:PairwiseID: Generated ID \'' . $expected . '\' can hardly be considered globally unique.', ); self::processFilter($config, $request); diff --git a/tests/modules/saml/src/Auth/Process/SubjectIDTest.php b/tests/modules/saml/src/Auth/Process/SubjectIDTest.php index 794c25c5fd..0fa215f3b6 100644 --- a/tests/modules/saml/src/Auth/Process/SubjectIDTest.php +++ b/tests/modules/saml/src/Auth/Process/SubjectIDTest.php @@ -72,7 +72,31 @@ public function testBasic(): void $this->assertArrayHasKey(Constants::ATTR_SUBJECT_ID, $attributes); $this->assertMatchesRegularExpression( SubjectID::SPEC_PATTERN, - $attributes[Constants::ATTR_SUBJECT_ID][0] + $attributes[Constants::ATTR_SUBJECT_ID][0], + ); + $this->assertEquals('u=se-r2@ex-ample.org', $attributes[Constants::ATTR_SUBJECT_ID][0]); + } + + + /** + * Test the most basic functionality with hash + */ + public function testBasicWithHash(): void + { + $config = ['identifyingAttribute' => 'uid', 'scopeAttribute' => 'scope', 'hashed' => true]; + $request = [ + 'Attributes' => ['uid' => ['u=se-r2'], 'scope' => ['ex-ample.org']], + ]; + $result = self::processFilter($config, $request); + $attributes = $result['Attributes']; + $this->assertArrayHasKey(Constants::ATTR_SUBJECT_ID, $attributes); + $this->assertMatchesRegularExpression( + SubjectID::SPEC_PATTERN, + $attributes[Constants::ATTR_SUBJECT_ID][0], + ); + $this->assertEquals( + 'u=se-r2@ex-ample.org', + $attributes[Constants::ATTR_SUBJECT_ID][0], ); $this->assertEquals('u=se-r2@ex-ample.org', $attributes[Constants::ATTR_SUBJECT_ID][0]); } @@ -92,7 +116,7 @@ public function testScopedScope(): void $this->assertArrayHasKey(Constants::ATTR_SUBJECT_ID, $attributes); $this->assertMatchesRegularExpression( SubjectID::SPEC_PATTERN, - $attributes[Constants::ATTR_SUBJECT_ID][0] + $attributes[Constants::ATTR_SUBJECT_ID][0], ); $this->assertEquals('u=se-r2@ex-ample.org', $attributes[Constants::ATTR_SUBJECT_ID][0]); } @@ -186,11 +210,11 @@ public function testUniqueIdentifierDifferentScopes(): void $this->assertMatchesRegularExpression( '/@example.org$/i', - $value1 + $value1, ); $this->assertMatchesRegularExpression( '/@example.edu$/i', - $value2 + $value2, ); } @@ -223,7 +247,7 @@ public function testScopeNotADomainLogsWarning(): void $this->expectException(RuntimeException::class); $this->expectExceptionMessage( - 'saml:SubjectID: Generated ID \'a1398u9u25@example\' can hardly be considered globally unique.' + 'saml:SubjectID: Generated ID \'a1398u9u25@example\' can hardly be considered globally unique.', ); self::processFilter($config, $request); diff --git a/tests/modules/saml/src/Auth/Source/SPTest.php b/tests/modules/saml/src/Auth/Source/SPTest.php index 22c477d111..f6907a6c3b 100644 --- a/tests/modules/saml/src/Auth/Source/SPTest.php +++ b/tests/modules/saml/src/Auth/Source/SPTest.php @@ -62,7 +62,7 @@ private function getIdpMetadata(): Configuration if (!$this->idpMetadata) { $this->idpMetadata = new Configuration( $this->idpConfigArray, - 'Auth_Source_SP_Test::getIdpMetadata()' + 'Auth_Source_SP_Test::getIdpMetadata()', ); } @@ -181,13 +181,13 @@ public function testAuthnRequest(): void $q = Utils::xpQuery($xml, '/samlp:AuthnRequest/@Destination'); $this->assertEquals( $this->idpConfigArray['SingleSignOnService'][0]['Location'], - $q[0]->value + $q[0]->value, ); $q = Utils::xpQuery($xml, '/samlp:AuthnRequest/saml:Issuer'); $this->assertEquals( 'urn:x-simplesamlphp:example-sp', - $q[0]->textContent + $q[0]->textContent, ); } @@ -199,7 +199,7 @@ public function testAuthnRequest(): void public function testNameID(): void { $state = [ - 'saml:NameID' => ['Value' => 'user@example.org', 'Format' => Constants::NAMEID_UNSPECIFIED] + 'saml:NameID' => ['Value' => 'user@example.org', 'Format' => Constants::NAMEID_UNSPECIFIED], ]; $ar = $this->createAuthnRequest($state); @@ -215,13 +215,13 @@ public function testNameID(): void $q = Utils::xpQuery($xml, '/samlp:AuthnRequest/saml:Subject/saml:NameID/@Format'); $this->assertEquals( $state['saml:NameID']['Format'], - $q[0]->value + $q[0]->value, ); $q = Utils::xpQuery($xml, '/samlp:AuthnRequest/saml:Subject/saml:NameID'); $this->assertEquals( $state['saml:NameID']['Value'], - $q[0]->textContent + $q[0]->textContent, ); } @@ -233,7 +233,7 @@ public function testNameID(): void public function testAuthnContextClassRef(): void { $state = [ - 'saml:AuthnContextClassRef' => 'http://example.com/myAuthnContextClassRef' + 'saml:AuthnContextClassRef' => 'http://example.com/myAuthnContextClassRef', ]; $ar = $this->createAuthnRequest($state); @@ -250,7 +250,7 @@ public function testAuthnContextClassRef(): void $q = Utils::xpQuery($xml, '/samlp:AuthnRequest/samlp:RequestedAuthnContext/saml:AuthnContextClassRef'); $this->assertEquals( $state['saml:AuthnContextClassRef'], - $q[0]->textContent + $q[0]->textContent, ); } @@ -263,14 +263,14 @@ public function testForcedAuthn(): void { /** @var bool $state['ForceAuthn'] */ $state = [ - 'ForceAuthn' => true + 'ForceAuthn' => true, ]; $ar = $this->createAuthnRequest($state); $this->assertEquals( $state['ForceAuthn'], - $ar->getForceAuthn() + $ar->getForceAuthn(), ); $xml = $ar->toSignedXML(); @@ -279,7 +279,7 @@ public function testForcedAuthn(): void $q = Utils::xpQuery($xml, '/samlp:AuthnRequest/@ForceAuthn'); $this->assertEquals( $state['ForceAuthn'] ? 'true' : 'false', - $q[0]->value + $q[0]->value, ); } @@ -291,7 +291,7 @@ public function testIdpListWithNoMatchingMetadata(): void { $this->expectException(NoSupportedIDPException::class); $state = [ - 'saml:IDPList' => ['noSuchIdp'] + 'saml:IDPList' => ['noSuchIdp'], ]; $info = ['AuthId' => 'default-sp']; @@ -316,13 +316,13 @@ public function testIdpListWithExplicitIdpNotMatch(): void ]; Configuration::loadFromArray($c, '', 'simplesaml'); $state = [ - 'saml:IDPList' => ['noSuchIdp', $entityId] + 'saml:IDPList' => ['noSuchIdp', $entityId], ]; $info = ['AuthId' => 'default-sp']; $config = [ 'entityID' => 'urn:x-simplesamlphp:example-sp', - 'idp' => 'https://engine.surfconext.nl/authentication/idp/metadata' + 'idp' => 'https://engine.surfconext.nl/authentication/idp/metadata', ]; $as = new SpTester($info, $config); $as->authenticate($state); @@ -343,13 +343,13 @@ public function testIdpListWithExplicitIdpMatch(): void ]; Configuration::loadFromArray($c, '', 'simplesaml'); $state = [ - 'saml:IDPList' => ['noSuchIdp', $entityId] + 'saml:IDPList' => ['noSuchIdp', $entityId], ]; $info = ['AuthId' => 'default-sp']; $config = [ 'entityID' => 'urn:x-simplesamlphp:example-sp', - 'idp' => $entityId + 'idp' => $entityId, ]; $as = new SpTester($info, $config); try { @@ -365,7 +365,7 @@ public function testIdpListWithExplicitIdpMatch(): void $q = Utils::xpQuery($xml, '/samlp:AuthnRequest/@Destination'); $this->assertEquals( 'https://saml.idp/sso/', - $q[0]->value + $q[0]->value, ); } } @@ -385,7 +385,7 @@ public function testIdpListWithSingleMatch(): void ]; Configuration::loadFromArray($c, '', 'simplesaml'); $state = [ - 'saml:IDPList' => ['noSuchIdp', $entityId] + 'saml:IDPList' => ['noSuchIdp', $entityId], ]; $info = ['AuthId' => 'default-sp']; @@ -404,7 +404,7 @@ public function testIdpListWithSingleMatch(): void $q = Utils::xpQuery($xml, '/samlp:AuthnRequest/@Destination'); $this->assertEquals( 'https://saml.idp/sso/', - $q[0]->value + $q[0]->value, ); } } @@ -429,7 +429,7 @@ public function testIdpListWithMultipleMatch(): void ]; Configuration::loadFromArray($c, '', 'simplesaml'); $state = [ - 'saml:IDPList' => ['noSuchIdp', $entityId, $entityId1] + 'saml:IDPList' => ['noSuchIdp', $entityId, $entityId1], ]; $info = ['AuthId' => 'default-sp']; @@ -437,7 +437,7 @@ public function testIdpListWithMultipleMatch(): void 'entityID' => 'urn:x-simplesamlphp:example-sp', // Use a url that is invalid for http redirects so redirect code throws an error // otherwise it will call exit - 'discoURL' => 'smtp://invalidurl' + 'discoURL' => 'smtp://invalidurl', ]; // Http redirect util library requires a request_uri to be set. $_SERVER['REQUEST_URI'] = 'https://l.example.com/'; @@ -465,7 +465,7 @@ public function testMetadataHostedBasicConfig(): void foreach ($md['AssertionConsumerService'] as $acs) { $this->assertEquals( 'http://localhost/simplesaml/module.php/saml/sp/saml2-acs.php/' . $spId, - $acs['Location'] + $acs['Location'], ); $this->assertStringStartsWith('urn:oasis:names:tc:SAML:2.0:bindings', $acs['Binding']); $this->assertIsInt($acs['index']); @@ -512,7 +512,7 @@ public function testRemoteMetadataScoping(): void $info = ['AuthId' => 'default-sp']; $config = [ 'entityID' => 'urn:x-simplesamlphp:example-sp', - 'IDPList' => ['https://scope.example.com'] + 'IDPList' => ['https://scope.example.com'], ]; $as = new SpTester($info, $config); @@ -540,17 +540,19 @@ public function testSPIdpListScopingOrder( ?array $stateIdpList, ?array $idpConfigArray, ?array $remoteMetadata, - string $expectedScope + string $expectedScope, ): void { $info = ['AuthId' => 'default-sp']; $state = []; if (isset($stateIdpList)) { $state['IDPList'] = $stateIdpList; } + $config = ['entityID' => 'urn:x-simplesamlphp:example-sp']; if (isset($remoteMetadata)) { $config['IDPList'] = $remoteMetadata; } + if (isset($idpConfigArray)) { $this->idpConfigArray['IDPList'] = $idpConfigArray; } @@ -578,7 +580,7 @@ public function getScopingOrders(): array 'stateIdpList' => ['https//scope1.example.com'], 'idpConfigArray' => ['https//scope2.example.com'], 'remoteMetadata' => ['https//scope3.example.com'], - 'expectedScope' => 'https//scope1.example.com' + 'expectedScope' => 'https//scope1.example.com', ], [ 'stateIdpList' => null, @@ -590,20 +592,20 @@ public function getScopingOrders(): array 'stateIdpList' => null, 'idpConfigArray' => null, 'remoteMetadata' => ['https//scope3.example.com'], - 'expectedScope' => 'https//scope3.example.com' + 'expectedScope' => 'https//scope3.example.com', ], [ 'stateIdpList' => ['https//scope1.example.com'], 'idpConfigArray' => null, 'remoteMetadata' => ['https//scope3.example.com'], - 'expectedScope' => 'https//scope1.example.com' + 'expectedScope' => 'https//scope1.example.com', ], [ 'stateIdpList' => ['https//scope1.example.com'], 'idpConfigArray' => ['https//scope2.example.com'], 'remoteMetadata' => null, - 'expectedScope' => 'https//scope1.example.com' - ] + 'expectedScope' => 'https//scope1.example.com', + ], ]; } @@ -648,7 +650,7 @@ public function testMetadataHostedContacts(): void 'givenName' => 'Jane', 'surName' => 'Doe', ], - ] + ], ]; $as = new SpTester($info, $config); @@ -701,7 +703,7 @@ public function testMetadataHostedContactsIncludesGlobalTechContact(): void 'givenName' => 'Jane', 'surName' => 'Doe', ], - ] + ], ]; $as = new SpTester($info, $config); @@ -745,7 +747,7 @@ public function testMetadataHostedContactsSkipsNAGlobalTechContact(): void 'emailAddress' => 'j.doe@example.edu', 'surName' => 'Doe', ], - ] + ], ]; $as = new SpTester($info, $config); @@ -770,7 +772,7 @@ public function testMetadataHostedContactsUnknownTypeThrowsException(): void 'givenName' => 'Jane', 'surName' => 'Doe', ], - ] + ], ]; $as = new SpTester($info, $config); @@ -805,7 +807,7 @@ public function testMetadataHostedAcsBindingsOption(): void $this->assertCount(1, $md['AssertionConsumerService']); $this->assertEquals( 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - $md['AssertionConsumerService'][0]['Binding'] + $md['AssertionConsumerService'][0]['Binding'], ); } @@ -834,7 +836,7 @@ public function testMetadataHostedAcsBindingsUnknownValueIsSkipped(): void $this->assertCount(1, $md['AssertionConsumerService']); $this->assertEquals( 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - $md['AssertionConsumerService'][0]['Binding'] + $md['AssertionConsumerService'][0]['Binding'], ); } @@ -855,7 +857,7 @@ public function testMetadataHostedSloBindingsOption(): void $this->assertCount(1, $md['SingleLogoutService']); $this->assertEquals( 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - $md['SingleLogoutService'][0]['Binding'] + $md['SingleLogoutService'][0]['Binding'], ); } @@ -887,7 +889,7 @@ public function testMetadataHostedSloBindingsUnknownValueIsAccepted(): void 'entityID' => 'urn:x-simplesamlphp:example-sp', 'SingleLogoutServiceBinding' => [ 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - 'urn:this:doesnotexist' + 'urn:this:doesnotexist', ], ]; $as = new SpTester($info, $config); @@ -896,7 +898,7 @@ public function testMetadataHostedSloBindingsUnknownValueIsAccepted(): void $this->assertCount(2, $md['SingleLogoutService']); $this->assertEquals( 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - $md['SingleLogoutService'][0]['Binding'] + $md['SingleLogoutService'][0]['Binding'], ); $this->assertEquals('urn:this:doesnotexist', $md['SingleLogoutService'][1]['Binding']); } @@ -912,7 +914,7 @@ public function testMetadataHostedSloURLIsUsedForAllSLOBindings(): void 'entityID' => 'urn:x-simplesamlphp:example-sp', 'SingleLogoutServiceBinding' => [ 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - 'urn:this:doesnotexist' + 'urn:this:doesnotexist', ], 'SingleLogoutServiceLocation' => 'https://sp.example.org/logout', ]; @@ -922,7 +924,7 @@ public function testMetadataHostedSloURLIsUsedForAllSLOBindings(): void $this->assertCount(2, $md['SingleLogoutService']); $this->assertEquals( 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - $md['SingleLogoutService'][0]['Binding'] + $md['SingleLogoutService'][0]['Binding'], ); $this->assertEquals('urn:this:doesnotexist', $md['SingleLogoutService'][1]['Binding']); $this->assertEquals('https://sp.example.org/logout', $md['SingleLogoutService'][0]['Location']); @@ -958,7 +960,7 @@ public function testMetadataHostedAssertionConsumerServiceOption(): void $this->assertCount(2, $md['AssertionConsumerService']); $this->assertEquals( 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - $md['AssertionConsumerService'][0]['Binding'] + $md['AssertionConsumerService'][0]['Binding'], ); $this->assertEquals('https://sp.example.org/ACS', $md['AssertionConsumerService'][0]['Location']); $this->assertEquals(1, $md['AssertionConsumerService'][0]['index']); @@ -966,7 +968,7 @@ public function testMetadataHostedAssertionConsumerServiceOption(): void $this->assertEquals( 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact', - $md['AssertionConsumerService'][1]['Binding'] + $md['AssertionConsumerService'][1]['Binding'], ); $this->assertEquals('https://sp.example.org/ACSeventeen', $md['AssertionConsumerService'][1]['Location']); $this->assertEquals(17, $md['AssertionConsumerService'][1]['index']); @@ -1065,7 +1067,7 @@ public function testMetadataHostedNameIDPolicy(): void 'entityID' => 'urn:x-simplesamlphp:example-sp', 'NameIDPolicy' => [ 'Format' => 'urn:mace:shibboleth:1.0:nameIdentifier', - 'AllowCreate' => true + 'AllowCreate' => true, ], ]; $as = new SpTester($info, $config); @@ -1187,11 +1189,11 @@ public function testMetadataHostedUIInfo(): void 'UIInfo' => [ 'DisplayName' => [ 'en' => 'English name', - 'es' => 'Nombre en Español' + 'es' => 'Nombre en Español', ], 'Description' => [ 'en' => 'English description', - 'es' => 'Descripción en Español' + 'es' => 'Descripción en Español', ], ], ]; @@ -1260,14 +1262,14 @@ public function testMetadataHostedNameDescriptionAttributes(): void 'mail' => 'urn:oid:0.9.2342.19200300.100.1.3', 'schacHomeOrganization' => 'urn:oid:1.3.6.1.4.1.25178.1.2.9', ], - $md['attributes'] + $md['attributes'], ); $this->assertArrayHasKey('attributes.required', $md); $this->assertEquals( [ 'eduPersonPrincipalName' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.6', ], - $md['attributes.required'] + $md['attributes.required'], ); } @@ -1366,7 +1368,7 @@ public function testMetadataHolderOfKeyViaProtocolBindingIsInMetadata(): void $this->assertEquals('urn:oasis:names:tc:SAML:2.0:profiles:holder-of-key:SSO:browser', $hok['Binding']); $this->assertEquals( 'http://localhost/simplesaml/module.php/saml/sp/saml2-acs.php/' . $spId, - $hok['Location'] + $hok['Location'], ); $this->assertEquals(2, $hok['index']); $this->assertEquals('urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', $hok['hoksso:ProtocolBinding']); @@ -1469,7 +1471,7 @@ public function testSAML11BindingsDoesNotInfluenceProtocolsSupported(): void 'Binding' => 'urn:oasis:names:tc:SAML:1.0:profiles:browser-post', ], ], - ]; + ]; $as = new SpTester($info, $config); $md = $as->getHostedMetadata(); diff --git a/tests/modules/saml/src/Controller/DiscoTest.php b/tests/modules/saml/src/Controller/DiscoTest.php index d528a0d9e3..21d0fd6904 100644 --- a/tests/modules/saml/src/Controller/DiscoTest.php +++ b/tests/modules/saml/src/Controller/DiscoTest.php @@ -33,7 +33,7 @@ protected function setUp(): void 'module.enable' => ['saml' => true], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($this->config, 'config.php'); } diff --git a/tests/modules/saml/src/Controller/MetadataTest.php b/tests/modules/saml/src/Controller/MetadataTest.php index 3593cfcb94..37cc9aa0fe 100644 --- a/tests/modules/saml/src/Controller/MetadataTest.php +++ b/tests/modules/saml/src/Controller/MetadataTest.php @@ -111,10 +111,10 @@ public function getMetaDataCurrentEntityID(string $set, string $type = 'entityid 'phpunit' => ['saml:SP'], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ), 'authsources.php', - 'simplesaml' + 'simplesaml', ); $this->authUtils = new class () extends Utils\Auth { @@ -143,7 +143,7 @@ public function testMetadataAccess(bool $authenticated, bool $protected): void 'admin.protectmetadata' => $protected, ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($config, 'config.php'); @@ -200,7 +200,7 @@ public function testDisabledSAML20IDPReturnsNoAccess(): void 'enable.saml20-idp' => false, ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($config, 'config.php'); diff --git a/tests/modules/saml/src/Controller/ProxyTest.php b/tests/modules/saml/src/Controller/ProxyTest.php index 27fe90ddae..982f088676 100644 --- a/tests/modules/saml/src/Controller/ProxyTest.php +++ b/tests/modules/saml/src/Controller/ProxyTest.php @@ -38,7 +38,7 @@ protected function setUp(): void 'module.enable' => ['saml' => true], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($this->config, 'config.php'); @@ -51,10 +51,10 @@ protected function setUp(): void ], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ), 'authsources.php', - 'simplesaml' + 'simplesaml', ); } diff --git a/tests/modules/saml/src/Controller/ServiceProviderTest.php b/tests/modules/saml/src/Controller/ServiceProviderTest.php index 3fdd7059d9..3d4d1e1b14 100644 --- a/tests/modules/saml/src/Controller/ServiceProviderTest.php +++ b/tests/modules/saml/src/Controller/ServiceProviderTest.php @@ -49,7 +49,7 @@ protected function setUp(): void 'trusted.url.domains' => ['example.org'], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($this->config, 'config.php'); @@ -63,10 +63,10 @@ protected function setUp(): void ], ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ), 'authsources.php', - 'simplesaml' + 'simplesaml', ); $this->authUtils = new class () extends Utils\Auth { @@ -173,7 +173,7 @@ public function testWithAuthIdWithoutEntity(): void $request = Request::create( '/discoResponse', 'GET', - ['AuthID' => 'abc123'] + ['AuthID' => 'abc123'], ); $c = new Controller\ServiceProvider($this->config, $this->session); @@ -471,7 +471,7 @@ public function testMetadataAccess(bool $authenticated, bool $protected): void 'admin.protectmetadata' => $protected, ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); Configuration::setPreLoadedConfig($config, 'config.php'); diff --git a/tests/modules/saml/src/IdP/SAML2Test.php b/tests/modules/saml/src/IdP/SAML2Test.php index 27bd1800c8..cacdb61814 100644 --- a/tests/modules/saml/src/IdP/SAML2Test.php +++ b/tests/modules/saml/src/IdP/SAML2Test.php @@ -61,7 +61,7 @@ public function testIdPInitiatedLoginMinimumParams(): void $this->assertStringStartsWith( 'http://idp.examlple.com/module.php/saml/idp/singleSignOnService?spentityid=https%3A%2F%2Fsome-sp-entity-id&cookie', - $state['\SimpleSAML\Auth\State.restartURL'] + $state['\SimpleSAML\Auth\State.restartURL'], ); unset($state['saml:AuthnRequestReceivedAt']); // timestamp can't be tested in equality assertion unset($state['SPMetadata']); // entityid asserted above @@ -93,7 +93,7 @@ public function testIdPInitiatedLoginOptionalParams(): void $this->assertStringStartsWith( 'http://idp.examlple.com/module.php/saml/idp/singleSignOnService?' . 'spentityid=https%3A%2F%2Fsome-sp-entity-id&RelayState=http%3A%2F%2Frelay&cookieTime', - $state['\SimpleSAML\Auth\State.restartURL'] + $state['\SimpleSAML\Auth\State.restartURL'], ); unset($state['saml:AuthnRequestReceivedAt']); // timestamp can't be tested in equality assertion unset($state['SPMetadata']); // entityid asserted above @@ -121,7 +121,7 @@ public function testIdPInitShibCompatyMinimumParams(): void $this->assertStringStartsWith( 'http://idp.examlple.com/module.php/saml/idp/singleSignOnService?spentityid=https%3A%2F%2Fsome-sp-entity-id&cookie', - $state['\SimpleSAML\Auth\State.restartURL'] + $state['\SimpleSAML\Auth\State.restartURL'], ); unset($state['saml:AuthnRequestReceivedAt']); // timestamp can't be tested in equality assertion unset($state['SPMetadata']); // entityid asserted above @@ -151,7 +151,7 @@ public function testIdPInitShibCompatOptionalParams(): void $this->assertStringStartsWith( 'http://idp.examlple.com/module.php/saml/idp/singleSignOnService?' . 'spentityid=https%3A%2F%2Fsome-sp-entity-id&RelayState=http%3A%2F%2Frelay&cookieTime', - $state['\SimpleSAML\Auth\State.restartURL'] + $state['\SimpleSAML\Auth\State.restartURL'], ); unset($state['saml:AuthnRequestReceivedAt']); // timestamp can't be tested in equality assertion unset($state['SPMetadata']); // entityid asserted above @@ -223,7 +223,7 @@ private function idpInitiatedHelper(array $queryParams): array function ($arg) use (&$state) { $state = $arg; return true; - } + }, )); /** @psalm-suppress InvalidArgument */ @@ -286,9 +286,9 @@ public function testIdPGetHostedMetadataMinimal(): void $this->assertEquals( [ 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleSignOnService' + 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleSignOnService', ], - $hostedMd['SingleSignOnService'][0] + $hostedMd['SingleSignOnService'][0], ); $this->assertArrayHasKey('SingleLogoutService', $hostedMd); $this->assertIsArray($hostedMd['SingleLogoutService']); @@ -296,9 +296,9 @@ public function testIdPGetHostedMetadataMinimal(): void $this->assertEquals( [ 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleLogout' + 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleLogout', ], - $hostedMd['SingleLogoutService'][0] + $hostedMd['SingleLogoutService'][0], ); $this->assertArrayHasKey('keys', $hostedMd); @@ -363,9 +363,9 @@ public function testIdPGetHostedMetadataArtifact(): void [ 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP', 'index' => 0, - 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/artifactResolutionService' + 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/artifactResolutionService', ], - $hostedMd['ArtifactResolutionService'][0] + $hostedMd['ArtifactResolutionService'][0], ); } @@ -381,16 +381,16 @@ public function testIdPGetHostedMetadataHolderOfKey(): void [ 'Binding' => 'urn:oasis:names:tc:SAML:2.0:profiles:holder-of-key:SSO:browser', 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleSignOnService', - 'hoksso:ProtocolBinding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect' + 'hoksso:ProtocolBinding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', ], - $hostedMd['SingleSignOnService'][0] + $hostedMd['SingleSignOnService'][0], ); $this->assertEquals( [ 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleSignOnService' + 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleSignOnService', ], - $hostedMd['SingleSignOnService'][1] + $hostedMd['SingleSignOnService'][1], ); } @@ -405,17 +405,17 @@ public function testIdPGetHostedMetadataECP(): void $this->assertEquals( [ 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleSignOnService' + 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleSignOnService', ], - $hostedMd['SingleSignOnService'][0] + $hostedMd['SingleSignOnService'][0], ); $this->assertEquals( [ 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP', 'index' => 0, - 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleSignOnService' + 'Location' => 'http://localhost/simplesaml/module.php/saml/idp/singleSignOnService', ], - $hostedMd['SingleSignOnService'][1] + $hostedMd['SingleSignOnService'][1], ); } @@ -567,7 +567,7 @@ public function testMetadataHostedEntityExtensions(): void $republishTarget = $dom->createElementNS( 'http://eduid.cz/schema/metadata/1.0', 'eduidmd:RepublishTarget', - 'http://edugain.org/' + 'http://edugain.org/', ); $republishRequest->appendChild($republishTarget); $ext = [new Chunk($republishRequest)]; @@ -582,7 +582,7 @@ public function testMetadataHostedEntityExtensions(): void $this->assertInstanceOf(Chunk::class, $md['saml:Extensions'][0]); $this->assertEquals( 'http://edugain.org/', - $md['saml:Extensions'][0]->getXML()->firstChild->firstChild->textContent + $md['saml:Extensions'][0]->getXML()->firstChild->firstChild->textContent, ); } @@ -595,11 +595,11 @@ public function testMetadataHostedUIInfo(): void 'UIInfo' => [ 'DisplayName' => [ 'en' => 'English name', - 'es' => 'Nombre en Español' + 'es' => 'Nombre en Español', ], 'Description' => [ 'en' => 'English description', - 'es' => 'Descripción en Español' + 'es' => 'Descripción en Español', ], 'Logo' => [ [ @@ -776,7 +776,7 @@ public function testMetadataHostedContactsSkipsNAGlobalTechContact(): void 'emailAddress' => 'j.doe@example.edu', 'surName' => 'Doe', ], - ] + ], ]; $md = $this->idpMetadataHandlerHelper($config, $globalConfig); diff --git a/tests/src/SimpleSAML/Auth/ProcessingChainTest.php b/tests/src/SimpleSAML/Auth/ProcessingChainTest.php index f52f1c755c..2f6f83f5dc 100644 --- a/tests/src/SimpleSAML/Auth/ProcessingChainTest.php +++ b/tests/src/SimpleSAML/Auth/ProcessingChainTest.php @@ -30,8 +30,8 @@ public function testInsertAuthProcs(): void ]; $state = [ ProcessingChain::FILTERS_INDEX => [ - new AttributeLimit($config, []) - ] + new AttributeLimit($config, []), + ], ]; $this->assertCount(1, $state[ProcessingChain::FILTERS_INDEX], 'Unexpected number of filters preinsert'); @@ -55,8 +55,8 @@ public function testInsertAuthFromConfigs(): void ]; $state = [ ProcessingChain::FILTERS_INDEX => [ - new AttributeLimit($config, []) - ] + new AttributeLimit($config, []), + ], ]; $this->assertCount(1, $state[ProcessingChain::FILTERS_INDEX], 'Unexpected number of filters preinsert'); diff --git a/tests/src/SimpleSAML/Auth/SimpleTest.php b/tests/src/SimpleSAML/Auth/SimpleTest.php index ae8ce73292..c177efffd5 100644 --- a/tests/src/SimpleSAML/Auth/SimpleTest.php +++ b/tests/src/SimpleSAML/Auth/SimpleTest.php @@ -31,8 +31,8 @@ public function testGetProcessedURL(): void // test merging configuration option with passed URL Configuration::loadFromArray([ 'application' => [ - 'baseURL' => 'https://example.org' - ] + 'baseURL' => 'https://example.org', + ], ], '[ARRAY]', 'simplesaml'); $s = new Auth\Simple(''); @@ -44,8 +44,8 @@ public function testGetProcessedURL(): void 'https://example.org/foo/bar?a=b#fragment', $method->invokeArgs( $s, - ['http://some.overridden.host/foo/bar?a=b#fragment'] - ) + ['http://some.overridden.host/foo/bar?a=b#fragment'], + ), ); // test a full, current URL with no parameters @@ -59,8 +59,8 @@ public function testGetProcessedURL(): void // test config option with ending with / and port Configuration::loadFromArray([ 'application' => [ - 'baseURL' => 'http://example.org:8080/' - ] + 'baseURL' => 'http://example.org:8080/', + ], ], '[ARRAY]', 'simplesaml'); $s = new Auth\Simple(''); $this->assertEquals('http://example.org:8080/foo/bar?a=b#fragment', $method->invokeArgs($s, [null])); @@ -68,7 +68,7 @@ public function testGetProcessedURL(): void // test again with a relative URL as a parameter $this->assertEquals( 'http://example.org:8080/something?foo=bar#something', - $method->invokeArgs($s, ['/something?foo=bar#something']) + $method->invokeArgs($s, ['/something?foo=bar#something']), ); // now test with no configuration @@ -84,13 +84,13 @@ public function testGetProcessedURL(): void // no configuration and a relative URL as a parameter $this->assertEquals( 'https://example.org:1234/something?foo=bar#something', - $method->invokeArgs($s, ['/something?foo=bar#something']) + $method->invokeArgs($s, ['/something?foo=bar#something']), ); // finally, no configuration and full URL as a parameter $this->assertEquals( 'https://example.org/one/two/three?foo=bar#fragment', - $method->invokeArgs($s, ['https://example.org/one/two/three?foo=bar#fragment']) + $method->invokeArgs($s, ['https://example.org/one/two/three?foo=bar#fragment']), ); } } diff --git a/tests/src/SimpleSAML/Auth/StateTest.php b/tests/src/SimpleSAML/Auth/StateTest.php index 3068309dca..fdc0bd1b69 100644 --- a/tests/src/SimpleSAML/Auth/StateTest.php +++ b/tests/src/SimpleSAML/Auth/StateTest.php @@ -35,7 +35,7 @@ public function testGetPersistentAuthData(): void $this->assertEquals( $expected, Auth\State::getPersistentAuthData($state), - 'Mandatory state attributes did not survive as expected' . print_r($expected, true) + 'Mandatory state attributes did not survive as expected' . print_r($expected, true), ); // check missing mandatory parameters @@ -45,7 +45,7 @@ public function testGetPersistentAuthData(): void $this->assertEquals( $expected, Auth\State::getPersistentAuthData($state), - 'Some error occurred with missing mandatory parameters' + 'Some error occurred with missing mandatory parameters', ); // check additional non-persistent parameters @@ -58,7 +58,7 @@ public function testGetPersistentAuthData(): void $this->assertEquals( $expected, Auth\State::getPersistentAuthData($state), - 'Additional parameters survived' + 'Additional parameters survived', ); // check additional persistent parameters @@ -70,7 +70,7 @@ public function testGetPersistentAuthData(): void $this->assertEquals( $expected, Auth\State::getPersistentAuthData($state), - 'Some error occurred with additional, persistent parameters' + 'Some error occurred with additional, persistent parameters', ); // check only additional persistent parameters @@ -81,7 +81,7 @@ public function testGetPersistentAuthData(): void $this->assertEquals( $expected, Auth\State::getPersistentAuthData($state), - 'Some error occurred with additional, persistent parameters, and no mandatory ones' + 'Some error occurred with additional, persistent parameters, and no mandatory ones', ); } diff --git a/tests/src/SimpleSAML/ConfigurationTest.php b/tests/src/SimpleSAML/ConfigurationTest.php index 060f00ffd4..a2043b1001 100644 --- a/tests/src/SimpleSAML/ConfigurationTest.php +++ b/tests/src/SimpleSAML/ConfigurationTest.php @@ -795,7 +795,7 @@ public function testGetDefaultEndpoint(): void // if we specify the binding, we should get it back [ 'Location' => 'https://example.com/endpoint.php', - 'Binding' => Constants::BINDING_HTTP_POST + 'Binding' => Constants::BINDING_HTTP_POST, ], // if we specify ResponseLocation, we should get it back too [ @@ -822,7 +822,7 @@ public function testGetDefaultEndpoint(): void 'isDefault' => false, 'Location' => 'https://www2.example.com/endpoint.php', 'Binding' => Constants::BINDING_HTTP_POST, - ] + ], ]; $a = [ @@ -849,7 +849,7 @@ public function testGetDefaultEndpoint(): void $c = Configuration::loadFromArray($a); $this->assertEquals($acs_expected_eps[$i], $c->getDefaultEndpoint( 'AssertionConsumerService', - $valid_bindings + $valid_bindings, )); } @@ -860,14 +860,14 @@ public function testGetDefaultEndpoint(): void 'Location' => 'https://example.com/ars', 'Binding' => Constants::BINDING_SOAP, ], - $c->getDefaultEndpoint('ArtifactResolutionService') + $c->getDefaultEndpoint('ArtifactResolutionService'), ); $this->assertEquals( [ 'Location' => 'https://example.com/slo', 'Binding' => Constants::BINDING_HTTP_REDIRECT, ], - $c->getDefaultEndpoint('SingleLogoutService') + $c->getDefaultEndpoint('SingleLogoutService'), ); // test for no valid endpoints specified @@ -885,7 +885,7 @@ public function testGetDefaultEndpoint(): void } catch (Exception $e) { $this->assertEquals( '[ARRAY][\'SingleLogoutService\']:Could not find a supported SingleLogoutService ' . 'endpoint.', - $e->getMessage() + $e->getMessage(), ); } $a['metadata-set'] = 'foo'; @@ -915,7 +915,7 @@ public function testGetEndpoints(): void 'Location' => 'https://example.com/endpoint.php', 'Binding' => Constants::BINDING_HTTP_REDIRECT, 'ResponseLocation' => 'https://example.com/response.php', - ] + ], ]; $this->assertEquals($e, $c->getEndpoints('SingleSignOnService')); @@ -933,7 +933,7 @@ public function testGetEndpoints(): void 10, // invalid definition of endpoint inside the endpoints array [ - 1234 + 1234, ], // missing location [ @@ -945,7 +945,7 @@ public function testGetEndpoints(): void [ [ 'Location' => 1234, - ] + ], ], // missing binding [ @@ -1078,7 +1078,7 @@ public function testGetConfigNonexistentFile(): void public function testGetConfigNonexistentFilePreload(): void { $c = Configuration::loadFromArray([ - 'key' => 'value' + 'key' => 'value', ]); $virtualFile = 'nonexistent-preload.php'; Configuration::setPreLoadedConfig($c, $virtualFile); @@ -1095,7 +1095,7 @@ public function testGetConfigNonexistentFilePreload(): void public function testLoadInstanceFromArray(): void { $c = [ - 'key' => 'value' + 'key' => 'value', ]; // test loading a custom instance Configuration::loadFromArray($c, '', 'dummy'); diff --git a/tests/src/SimpleSAML/DatabaseTest.php b/tests/src/SimpleSAML/DatabaseTest.php index f8c1f5a9b6..049115ffac 100644 --- a/tests/src/SimpleSAML/DatabaseTest.php +++ b/tests/src/SimpleSAML/DatabaseTest.php @@ -133,26 +133,26 @@ public function instances(): void $this->assertNotEquals( $instance1, $instance2, - "Database instances should be different, but returned the same id" + "Database instances should be different, but returned the same id", ); // Assert that $instance1 and $instance3 have identical instance ids $this->assertEquals( $instance1, $instance3, - "Database instances should have the same id, but returned different id" + "Database instances should have the same id, but returned different id", ); // Assert that $db1 and $db2 are different instances $this->assertNotEquals( spl_object_hash($db1), spl_object_hash($db2), - "Database instances should be different, but returned the same spl_object_hash" + "Database instances should be different, but returned the same spl_object_hash", ); // Assert that $db1 and $db3 are identical instances $this->assertEquals( spl_object_hash($db1), spl_object_hash($db3), - "Database instances should be the same, but returned different spl_object_hash" + "Database instances should be the same, but returned different spl_object_hash", ); } @@ -174,12 +174,12 @@ public function secondaries(): void $this->assertTrue(($primary == $secondary), "getSecondary should have returned the primary database object"); $config = [ - 'database.dsn' => 'sqlite::memory:', - 'database.username' => null, - 'database.password' => null, - 'database.prefix' => 'phpunit_', - 'database.persistent' => true, - 'database.secondaries' => [ + 'database.dsn' => 'sqlite::memory:', + 'database.username' => null, + 'database.password' => null, + 'database.prefix' => 'phpunit_', + 'database.persistent' => true, + 'database.secondaries' => [ [ 'dsn' => 'sqlite::memory:', 'username' => null, @@ -203,7 +203,7 @@ public function secondaries(): void $this->assertEquals( spl_object_hash($secondaries[0]), $gotSecondary, - "getSecondary should have returned a secondary database object" + "getSecondary should have returned a secondary database object", ); } @@ -237,7 +237,7 @@ public function querying(): void $this->assertEquals($this->config->getString('database.prefix') . "sspdbt", $table); $this->db->write( - "CREATE TABLE IF NOT EXISTS $table (ssp_key INT(16) NOT NULL, ssp_value TEXT NOT NULL)" + "CREATE TABLE IF NOT EXISTS $table (ssp_key INT(16) NOT NULL, ssp_value TEXT NOT NULL)", ); $query1 = $this->db->read("SELECT * FROM $table"); @@ -247,7 +247,7 @@ public function querying(): void $ssp_value = md5(strval(rand(0, 10000))); $stmt = $this->db->write( "INSERT INTO $table (ssp_key, ssp_value) VALUES (:ssp_key, :ssp_value)", - ['ssp_key' => [$ssp_key, PDO::PARAM_INT], 'ssp_value' => $ssp_value] + ['ssp_key' => [$ssp_key, PDO::PARAM_INT], 'ssp_value' => $ssp_value], ); $this->assertEquals(1, $stmt, "Could not insert data into $table."); diff --git a/tests/src/SimpleSAML/Locale/LanguageTest.php b/tests/src/SimpleSAML/Locale/LanguageTest.php index 5893a72b7c..82e34e47f3 100644 --- a/tests/src/SimpleSAML/Locale/LanguageTest.php +++ b/tests/src/SimpleSAML/Locale/LanguageTest.php @@ -50,7 +50,7 @@ public function testGetLanguageCookie(): void // test that it works with non-defaults Configuration::loadFromArray([ 'language.available' => ['en', 'es', 'nn'], - 'language.cookie.name' => 'xyz' + 'language.cookie.name' => 'xyz', ], '', 'simplesaml'); $_COOKIE['xyz'] = 'Es'; // test values are converted to lowercase too $this->assertEquals('es', Language::getLanguageCookie()); @@ -116,7 +116,7 @@ public function testGetLanguageParameterName(): void // test for valid configuration $c = Configuration::loadFromArray([ - 'language.parameter.name' => 'xyz' + 'language.parameter.name' => 'xyz', ], '', 'simplesaml'); $l = new Language($c); $this->assertEquals('xyz', $l->getLanguageParameterName()); diff --git a/tests/src/SimpleSAML/Locale/TranslateTest.php b/tests/src/SimpleSAML/Locale/TranslateTest.php index 0a6ddd6e2a..e516fe1949 100644 --- a/tests/src/SimpleSAML/Locale/TranslateTest.php +++ b/tests/src/SimpleSAML/Locale/TranslateTest.php @@ -31,8 +31,8 @@ public function testNoop(): void public function testTranslateFromArray(): void { $result = Translate::translateFromArray( - ['currentLanguage' => 'ia',], - [ 'ia' => 'interlingua', 'en' => 'english',] + ['currentLanguage' => 'ia'], + [ 'ia' => 'interlingua', 'en' => 'english'], ); $this->assertEquals('interlingua', $result); } @@ -40,8 +40,8 @@ public function testTranslateFromArray(): void public function testTranslateFromArrayFallback(): void { $result = Translate::translateFromArray( - ['currentLanguage' => 'ia',], - [ 'eo' => 'esperanto', 'en' => 'english',] + ['currentLanguage' => 'ia'], + [ 'eo' => 'esperanto', 'en' => 'english'], ); $this->assertEquals('english', $result); } @@ -49,8 +49,8 @@ public function testTranslateFromArrayFallback(): void public function testTranslateFromArrayFail(): void { $result = Translate::translateFromArray( - ['currentLanguage' => 'ia',], - [ 'eo' => 'esperanto',] + ['currentLanguage' => 'ia'], + [ 'eo' => 'esperanto'], ); $this->assertEquals(null, $result); } diff --git a/tests/src/SimpleSAML/LoggerTest.php b/tests/src/SimpleSAML/LoggerTest.php index 4b054d7160..6d721111c6 100644 --- a/tests/src/SimpleSAML/LoggerTest.php +++ b/tests/src/SimpleSAML/LoggerTest.php @@ -26,7 +26,7 @@ protected function setLoggingHandler(string $handler): void $this->originalLogger = Logger::getLoggingHandler(); $config = [ 'logging.handler' => $handler, - 'logging.level' => Logger::DEBUG + 'logging.level' => Logger::DEBUG, ]; // testing static methods is slightly painful @@ -91,7 +91,7 @@ public function testExceptionThrownOnInvalidLoggingHandler(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - "Invalid value for the 'logging.handler' configuration option. Unknown handler 'nohandler'." + "Invalid value for the 'logging.handler' configuration option. Unknown handler 'nohandler'.", ); Logger::critical('should throw exception'); diff --git a/tests/src/SimpleSAML/Metadata/MetaDataStorageHandlerTest.php b/tests/src/SimpleSAML/Metadata/MetaDataStorageHandlerTest.php index 4381056f88..541b51ffe1 100644 --- a/tests/src/SimpleSAML/Metadata/MetaDataStorageHandlerTest.php +++ b/tests/src/SimpleSAML/Metadata/MetaDataStorageHandlerTest.php @@ -37,7 +37,7 @@ public function testLoadEntities(): void 'entityB', 'nosuchEntity', 'entityInBoth', - 'expiredInSrc1InSrc2' + 'expiredInSrc1InSrc2', ], 'saml20-sp-remote'); $this->assertCount(4, $entities); $this->assertEquals('entityA SP from source1', $entities['entityA']['name']['en']); @@ -45,12 +45,12 @@ public function testLoadEntities(): void $this->assertEquals( 'entityInBoth SP from source1', $entities['entityInBoth']['name']['en'], - "Entity is in both sources, but should get loaded from the first" + "Entity is in both sources, but should get loaded from the first", ); $this->assertEquals( 'expiredInSrc1InSrc2 SP from source2', $entities['expiredInSrc1InSrc2']['name']['en'], - "Entity is in both sources, expired in src1 and available from src2" + "Entity is in both sources, expired in src1 and available from src2", ); // Did not ask for this one, which is in source1 $this->assertArrayNotHasKey('http://localhost/simplesaml', $entities); @@ -69,12 +69,12 @@ public function testLoadMetadataSet(): void $this->assertEquals( 'entityInBoth SP from source1', $entities['entityInBoth']['name']['en'], - "Entity is in both sources, but should get loaded from the first" + "Entity is in both sources, but should get loaded from the first", ); $this->assertEquals( 'expiredInSrc1InSrc2 SP from source2', $entities['expiredInSrc1InSrc2']['name']['en'], - "Entity is in both sources, expired in src1 and available from src2" + "Entity is in both sources, expired in src1 and available from src2", ); $this->assertEquals('entityA SP from source1', $entities['entityA']['name']['en']); $this->assertEquals('hostname SP from source1', $entities['http://localhost/simplesaml']['name']['en']); diff --git a/tests/src/SimpleSAML/Metadata/MetaDataStorageSourceTest.php b/tests/src/SimpleSAML/Metadata/MetaDataStorageSourceTest.php index 44d0fb606f..0f03acba74 100644 --- a/tests/src/SimpleSAML/Metadata/MetaDataStorageSourceTest.php +++ b/tests/src/SimpleSAML/Metadata/MetaDataStorageSourceTest.php @@ -50,7 +50,7 @@ public function testStaticXMLSource(): void $this->assertArrayHasKey( $testEntityId, $idpSet, - "Did not extract expected IdP entity ID from static XML source" + "Did not extract expected IdP entity ID from static XML source", ); // Finally verify that a different entity ID does not get loaded @@ -64,7 +64,7 @@ public function testStaticXMLSource(): void public function testLoadEntitiesStaticXMLSource(): void { $c = [ - 'key' => 'value' + 'key' => 'value', ]; Configuration::loadFromArray($c, '', 'simplesaml'); $entityId1 = "https://example.com"; diff --git a/tests/src/SimpleSAML/Metadata/SAMLBuilderTest.php b/tests/src/SimpleSAML/Metadata/SAMLBuilderTest.php index dc5b342104..fe74c2478d 100644 --- a/tests/src/SimpleSAML/Metadata/SAMLBuilderTest.php +++ b/tests/src/SimpleSAML/Metadata/SAMLBuilderTest.php @@ -240,7 +240,7 @@ public function testProtocolSupportEnumeration(): void $this->assertMatchesRegularExpression( '//', - $entityDescriptorXml + $entityDescriptorXml, ); // explicit protocols @@ -256,7 +256,7 @@ public function testProtocolSupportEnumeration(): void $protocols = implode(' ', $metadata['protocols']); $this->assertMatchesRegularExpression( '//', - $entityDescriptorXml + $entityDescriptorXml, ); } @@ -271,13 +271,13 @@ public function testCustomMetadataExtension(): void $dom = \SAML2\DOMDocumentFactory::create(); $republishRequest = $dom->createElementNS( 'http://eduid.cz/schema/metadata/1.0', - 'eduidmd:RepublishRequest' + 'eduidmd:RepublishRequest', ); $republishTargetContent = 'http://edugain.org/'; $republishTarget = $dom->createElementNS( 'http://eduid.cz/schema/metadata/1.0', 'eduidmd:RepublishTarget', - $republishTargetContent + $republishTargetContent, ); $republishRequest->appendChild($republishTarget); $ext = [new \SAML2\XML\Chunk($republishRequest)]; @@ -349,7 +349,7 @@ public function testContacts(): void $this->assertTrue($first->hasAttribute("remd:contactType")); $this->assertEquals( "http://refeds.org/metadata/contactType/security", - $first->getAttribute("remd:contactType") + $first->getAttribute("remd:contactType"), ); $mail = $first->getElementsByTagName("EmailAddress"); $this->assertEquals(1, $mail->length); diff --git a/tests/src/SimpleSAML/Metadata/SAMLParserTest.php b/tests/src/SimpleSAML/Metadata/SAMLParserTest.php index cf5c681893..29aae66fd7 100644 --- a/tests/src/SimpleSAML/Metadata/SAMLParserTest.php +++ b/tests/src/SimpleSAML/Metadata/SAMLParserTest.php @@ -35,7 +35,7 @@ public function testRegistrationInfo(): void -XML +XML, ); $entities = SAMLParser::parseDescriptorsElement($document->documentElement); @@ -78,7 +78,7 @@ public function testRegistrationInfoInheritance(): void -XML +XML, ); $entities = SAMLParser::parseDescriptorsElement($document->documentElement); @@ -121,7 +121,7 @@ public function testRegistrationPolicy(): void -XML +XML, ); $entities = SAMLParser::parseDescriptorsElement($document->documentElement); @@ -153,7 +153,7 @@ public function testRegistrationInstant(): void -XML +XML, ); $entities = SAMLParser::parseDescriptorsElement($document->documentElement); @@ -190,7 +190,7 @@ public function testAttributeConsumingServiceParsing(): void -XML +XML, ); $entities = SAMLParser::parseDescriptorsElement($document->documentElement); @@ -205,7 +205,7 @@ public function testAttributeConsumingServiceParsing(): void $expected_a = [ "urn:mace:dir:attribute-def:eduPersonPrincipalName", "urn:mace:dir:attribute-def:mail", - "urn:mace:dir:attribute-def:displayName" + "urn:mace:dir:attribute-def:displayName", ]; $expected_r = ["urn:mace:dir:attribute-def:eduPersonPrincipalName"]; @@ -219,13 +219,14 @@ public function testAttributeConsumingServiceParsing(): void */ public function makeTestDocument(): DOMDocument { - $doc = DOMDocumentFactory::fromString(<< -XML +XML, ); /** @psalm-var \DOMElement $entities_root */ @@ -251,9 +252,9 @@ public function testRoleDescriptorExtensions(): void ], 'UIInfo' => [ 'DisplayName' => ['en' => 'DisplayName', 'af' => 'VertoonNaam'], - 'Description' => ['en' => 'Description',], - 'InformationURL' => ['en' => 'https://localhost/information',], - 'PrivacyStatementURL' => ['en' => 'https://localhost/privacypolicy',], + 'Description' => ['en' => 'Description'], + 'InformationURL' => ['en' => 'https://localhost/information'], + 'PrivacyStatementURL' => ['en' => 'https://localhost/privacypolicy'], 'Logo' => [ [ 'url' => 'https://localhost/logo', @@ -268,9 +269,9 @@ public function testRoleDescriptorExtensions(): void ], ], 'DiscoHints' => [ - 'IPHint' => ['127.0.0.1', '127.0.0.2',], - 'DomainHint' => ['example.net', 'example.org',], - 'GeolocationHint' => ['geo:-29.00000,24.00000;u=830000',], + 'IPHint' => ['127.0.0.1', '127.0.0.2'], + 'DomainHint' => ['example.net', 'example.org'], + 'GeolocationHint' => ['geo:-29.00000,24.00000;u=830000'], ], 'name' => ['en' => 'DisplayName', 'af' => 'VertoonNaam'], ]; @@ -304,7 +305,7 @@ public function testRoleDescriptorExtensions(): void -XML +XML, ); $entities = SAMLParser::parseDescriptorsElement($document->documentElement); @@ -315,17 +316,17 @@ public function testRoleDescriptorExtensions(): void $this->assertEquals( $expected['scope'], $metadata['scope'], - 'shibmd:Scope elements not reflected in parsed metadata' + 'shibmd:Scope elements not reflected in parsed metadata', ); $this->assertEquals( $expected['UIInfo'], $metadata['UIInfo'], - 'mdui:UIInfo elements not reflected in parsed metadata' + 'mdui:UIInfo elements not reflected in parsed metadata', ); $this->assertEquals( $expected['DiscoHints'], $metadata['DiscoHints'], - 'mdui:DiscoHints elements not reflected in parsed metadata' + 'mdui:DiscoHints elements not reflected in parsed metadata', ); $this->assertEquals($expected['name'], $metadata['name']); } @@ -352,7 +353,7 @@ public function testHiddenFromDiscovery(): void -XML +XML, ); $entities = SAMLParser::parseDescriptorsElement($document->documentElement); @@ -384,7 +385,7 @@ public function testHiddenFromDiscoveryNotHidden(): void -XML +XML, ); $entities = SAMLParser::parseDescriptorsElement($document->documentElement); @@ -412,7 +413,7 @@ public function testHiddenFromDiscoveryNotHiddenNoMaceDirEC(): void -XML +XML, ); $entities = SAMLParser::parseDescriptorsElement($document->documentElement); diff --git a/tests/src/SimpleSAML/Metadata/test-metadata/source1/saml20-sp-remote.php b/tests/src/SimpleSAML/Metadata/test-metadata/source1/saml20-sp-remote.php index ce5a287d7e..7730cd7a4a 100644 --- a/tests/src/SimpleSAML/Metadata/test-metadata/source1/saml20-sp-remote.php +++ b/tests/src/SimpleSAML/Metadata/test-metadata/source1/saml20-sp-remote.php @@ -20,7 +20,7 @@ 'index' => 1, 'isDefault' => true, ], - ] + ], ]; $metadata['entityInBoth'] = [ @@ -39,7 +39,7 @@ 'index' => 1, 'isDefault' => true, ], - ] + ], ]; $metadata['expiredInSrc1InSrc2'] = [ @@ -60,7 +60,7 @@ 'index' => 1, 'isDefault' => true, ], - ] + ], ]; $metadata['http://localhost/simplesaml'] = [ @@ -80,5 +80,5 @@ 'index' => 1, 'isDefault' => true, ], - ] + ], ]; diff --git a/tests/src/SimpleSAML/ModuleTest.php b/tests/src/SimpleSAML/ModuleTest.php index 19138c8381..ec5e5f9fc8 100644 --- a/tests/src/SimpleSAML/ModuleTest.php +++ b/tests/src/SimpleSAML/ModuleTest.php @@ -44,18 +44,18 @@ public function testGetModuleDir(): void public function testGetModuleURL(): void { Configuration::loadFromArray([ - 'baseurlpath' => 'https://example.com/simplesaml/' + 'baseurlpath' => 'https://example.com/simplesaml/', ], '', 'simplesaml'); $this->assertEquals( 'https://example.com/simplesaml/module.php/module/script.php', - Module::getModuleURL('module/script.php') + Module::getModuleURL('module/script.php'), ); $this->assertEquals( 'https://example.com/simplesaml/module.php/module/script.php?param1=value1¶m2=value2', Module::getModuleURL('module/script.php', [ 'param1' => 'value1', 'param2' => 'value2', - ]) + ]), ); } @@ -103,14 +103,14 @@ public function testResolveClass(): void // test for the $type parameter correctly translated into a path $this->assertEquals( 'SimpleSAML\Module\core\Auth\Process\PHP', - Module::resolveClass('core:PHP', 'Auth\Process') + Module::resolveClass('core:PHP', 'Auth\Process'), ); // test for valid subclasses $this->assertEquals('SimpleSAML\Module\core\Auth\Process\PHP', Module::resolveClass( 'core:PHP', 'Auth\Process', - '\SimpleSAML\Auth\ProcessingFilter' + '\SimpleSAML\Auth\ProcessingFilter', )); } diff --git a/tests/src/SimpleSAML/SessionHandlerPHPTest.php b/tests/src/SimpleSAML/SessionHandlerPHPTest.php index 2b829e2e98..23107346c8 100644 --- a/tests/src/SimpleSAML/SessionHandlerPHPTest.php +++ b/tests/src/SimpleSAML/SessionHandlerPHPTest.php @@ -72,7 +72,7 @@ public function testSetCookie(): void $this->assertStringContainsString('SimpleSAML=1;', $headers[0]); $this->assertMatchesRegularExpression( '/\b[Ee]xpires=([Mm]on|[Tt]ue|[Ww]ed|[Tt]hu|[Ff]ri|[Ss]at|[Ss]un)/', - $headers[0] + $headers[0], ); $this->assertMatchesRegularExpression('/\b[Pp]ath=\/ourPath(;|$)/', $headers[0]); $this->assertMatchesRegularExpression('/\b[Dd]omain=example.com(;|$)/', $headers[0]); @@ -90,7 +90,7 @@ public function testSetCookieSameSiteNone(): void Configuration::loadFromArray( array_merge($this->sessionConfig, ['session.cookie.samesite' => 'None']), '[ARRAY]', - 'simplesaml' + 'simplesaml', ); $sh = SessionHandlerPHP::getSessionHandler(); $sh->setCookie('SimpleSAMLSessionID', 'None'); @@ -110,7 +110,7 @@ public function testSetCookieSameSiteLax(): void Configuration::loadFromArray( array_merge($this->sessionConfig, ['session.cookie.samesite' => 'Lax']), '[ARRAY]', - 'simplesaml' + 'simplesaml', ); $sh = SessionHandlerPHP::getSessionHandler(); $sh->setCookie('SimpleSAMLSessionID', 'Lax'); @@ -130,7 +130,7 @@ public function testSetCookieSameSiteStrict(): void Configuration::loadFromArray( array_merge($this->sessionConfig, ['session.cookie.samesite' => 'Strict']), '[ARRAY]', - 'simplesaml' + 'simplesaml', ); $sh = SessionHandlerPHP::getSessionHandler(); $sh->setCookie('SimpleSAMLSessionID', 'Strict'); diff --git a/tests/src/SimpleSAML/Utils/ArraysTest.php b/tests/src/SimpleSAML/Utils/ArraysTest.php index 8d297cf6a3..6a520db580 100644 --- a/tests/src/SimpleSAML/Utils/ArraysTest.php +++ b/tests/src/SimpleSAML/Utils/ArraysTest.php @@ -65,88 +65,88 @@ public function testTranspose(): void // check bad arrays $this->assertFalse( $this->arrayUtils->transpose(['1', '2', '3']), - 'Invalid two-dimensional array was accepted' + 'Invalid two-dimensional array was accepted', ); $this->assertFalse( $this->arrayUtils->transpose(['1' => 0, '2' => '0', '3' => [0]]), - 'Invalid elements on a two-dimensional array were accepted' + 'Invalid elements on a two-dimensional array were accepted', ); // check array with numerical keys $array = [ 'key1' => [ - 'value1' + 'value1', ], 'key2' => [ 'value1', - 'value2' - ] + 'value2', + ], ]; $transposed = [ [ 'key1' => 'value1', - 'key2' => 'value1' + 'key2' => 'value1', ], [ - 'key2' => 'value2' - ] + 'key2' => 'value2', + ], ]; $this->assertEquals( $transposed, $this->arrayUtils->transpose($array), - 'Unexpected result of transpose()' + 'Unexpected result of transpose()', ); // check array with string keys $array = [ 'key1' => [ - 'subkey1' => 'value1' + 'subkey1' => 'value1', ], 'key2' => [ 'subkey1' => 'value1', - 'subkey2' => 'value2' - ] + 'subkey2' => 'value2', + ], ]; $transposed = [ 'subkey1' => [ 'key1' => 'value1', - 'key2' => 'value1' + 'key2' => 'value1', ], 'subkey2' => [ - 'key2' => 'value2' - ] + 'key2' => 'value2', + ], ]; $this->assertEquals( $transposed, $this->arrayUtils->transpose($array), - 'Unexpected result of transpose()' + 'Unexpected result of transpose()', ); // check array with no keys in common between sub arrays $array = [ 'key1' => [ - 'subkey1' => 'value1' + 'subkey1' => 'value1', ], 'key2' => [ 'subkey2' => 'value1', - 'subkey3' => 'value2' - ] + 'subkey3' => 'value2', + ], ]; $transposed = [ 'subkey1' => [ 'key1' => 'value1', ], 'subkey2' => [ - 'key2' => 'value1' + 'key2' => 'value1', ], 'subkey3' => [ - 'key2' => 'value2' - ] + 'key2' => 'value2', + ], ]; $this->assertEquals( $transposed, $this->arrayUtils->transpose($array), - 'Unexpected result of transpose()' + 'Unexpected result of transpose()', ); } } diff --git a/tests/src/SimpleSAML/Utils/AttributesTest.php b/tests/src/SimpleSAML/Utils/AttributesTest.php index 4f99ee4c04..b78934ca8f 100644 --- a/tests/src/SimpleSAML/Utils/AttributesTest.php +++ b/tests/src/SimpleSAML/Utils/AttributesTest.php @@ -44,7 +44,7 @@ public function testGetExpectedAttributeNonNormalizedArray(): void $expected = 'attribute'; $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage( - 'The attributes array is not normalized, values should be arrays.' + 'The attributes array is not normalized, values should be arrays.', ); $this->attrUtils->getExpectedAttribute($attributes, $expected); } @@ -97,7 +97,7 @@ public function testGetExpectedAttributeMultipleValues(): void $expected = 'attribute'; $this->expectException(Error\Exception::class); $this->expectExceptionMessage( - 'More than one value found for the attribute, multiple values not allowed.' + 'More than one value found for the attribute, multiple values not allowed.', ); $this->attrUtils->getExpectedAttribute($attributes, $expected); } @@ -154,17 +154,17 @@ public function testNormalizeAttributesArray(): void $attributes = [ 'key1' => 'value1', 'key2' => ['value2', 'value3'], - 'key3' => 'value1' + 'key3' => 'value1', ]; $expected = [ 'key1' => ['value1'], 'key2' => ['value2', 'value3'], - 'key3' => ['value1'] + 'key3' => ['value1'], ]; $this->assertEquals( $expected, $this->attrUtils->normalizeAttributesArray($attributes), - 'Attribute array normalization failed' + 'Attribute array normalization failed', ); } @@ -177,13 +177,13 @@ public function testNamespacedAttributes(): void // test for only the name $this->assertEquals( ['default', 'name'], - $this->attrUtils->getAttributeNamespace('name', 'default') + $this->attrUtils->getAttributeNamespace('name', 'default'), ); // test for a given namespace and multiple '/' $this->assertEquals( ['some/namespace', 'name'], - $this->attrUtils->getAttributeNamespace('some/namespace/name', 'default') + $this->attrUtils->getAttributeNamespace('some/namespace/name', 'default'), ); } } diff --git a/tests/src/SimpleSAML/Utils/Config/MetadataTest.php b/tests/src/SimpleSAML/Utils/Config/MetadataTest.php index 293afc3172..5b8c27b219 100644 --- a/tests/src/SimpleSAML/Utils/Config/MetadataTest.php +++ b/tests/src/SimpleSAML/Utils/Config/MetadataTest.php @@ -237,7 +237,7 @@ public function testParseNameIdPolicy(): void $nameIdPolicy = [ 'Format' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:persistent', 'AllowCreate' => false, - 'SPNameQualifier' => 'TEST' + 'SPNameQualifier' => 'TEST', ]; $this->assertEquals([ 'Format' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:persistent', diff --git a/tests/src/SimpleSAML/Utils/ConfigTest.php b/tests/src/SimpleSAML/Utils/ConfigTest.php index 34cefef55e..bff84acc8d 100644 --- a/tests/src/SimpleSAML/Utils/ConfigTest.php +++ b/tests/src/SimpleSAML/Utils/ConfigTest.php @@ -92,7 +92,7 @@ public function testInvalidEnvVariableConfigDirThrowsException(): void $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage( 'Config directory specified by environment variable SIMPLESAMLPHP_CONFIG_DIR is not a directory. ' . - 'Given: "' . $invalidDir . '"' + 'Given: "' . $invalidDir . '"', ); $this->configUtils->getConfigDir(); diff --git a/tests/src/SimpleSAML/Utils/CryptoTest.php b/tests/src/SimpleSAML/Utils/CryptoTest.php index b3c08eeff4..3da4ff4401 100644 --- a/tests/src/SimpleSAML/Utils/CryptoTest.php +++ b/tests/src/SimpleSAML/Utils/CryptoTest.php @@ -83,10 +83,10 @@ public function setUp(): void $this->config = Configuration::loadFromArray( [ 'module.enable' => [], - 'secretsalt' => 'SUPER_SECRET_SALT' + 'secretsalt' => 'SUPER_SECRET_SALT', ], '[ARRAY]', - 'simplesaml' + 'simplesaml', ); $this->root = vfsStream::setup( @@ -94,7 +94,7 @@ public function setUp(): void null, [ self::DEFAULTCERTDIR => [], - ] + ], ); $this->root_directory = vfsStream::url(self::ROOTDIRNAME); $this->certdir = $this->root_directory . DIRECTORY_SEPARATOR . self::DEFAULTCERTDIR; @@ -192,7 +192,7 @@ public function testFormatConversion(): void { $this->assertEquals( trim($this->pem), - trim($this->cryptoUtils->der2pem($this->cryptoUtils->pem2der($this->pem))) + trim($this->cryptoUtils->der2pem($this->cryptoUtils->pem2der($this->pem))), ); } @@ -344,7 +344,7 @@ public function testLoadPrivateKeyPassword(): void 'privatekey' => $filename, 'privatekey_pass' => $password, ], - 'test' + 'test', ); $full_path = true; @@ -370,7 +370,7 @@ public function testLoadPrivateKeyPrefix(): void $prefix . 'privatekey' => $filename, $prefix . 'privatekey_pass' => $password, ], - 'test' + 'test', ); $full_path = true; @@ -418,11 +418,11 @@ public function testLoadPublicKeyNotX509Certificate(): void [ 'X509Certificate' => '', 'type' => 'NotX509Certificate', - 'signing' => true + 'signing' => true, ], ], ], - 'test' + 'test', ); $res = $this->cryptoUtils->loadPublicKey($config); @@ -441,11 +441,11 @@ public function testLoadPublicKeyNotSigning(): void [ 'X509Certificate' => '', 'type' => 'X509Certificate', - 'signing' => false + 'signing' => false, ], ], ], - 'test' + 'test', ); $res = $this->cryptoUtils->loadPublicKey($config); @@ -465,11 +465,11 @@ public function testLoadPublicKeyBasic(): void [ 'X509Certificate' => $x509certificate, 'type' => 'X509Certificate', - 'signing' => true + 'signing' => true, ], ], ], - 'test' + 'test', ); /** @var array $pubkey */ diff --git a/tests/src/SimpleSAML/Utils/EMailTest.php b/tests/src/SimpleSAML/Utils/EMailTest.php index 08bd0883c7..cf0f432607 100644 --- a/tests/src/SimpleSAML/Utils/EMailTest.php +++ b/tests/src/SimpleSAML/Utils/EMailTest.php @@ -71,7 +71,7 @@ public function testMailContents($template): void $mail = new EMail( 'subject-subject-subject-subject-subject-subject-subject', 'phpunit@simplesamlphp.org', - 'phpunit@simplesamlphp.org' + 'phpunit@simplesamlphp.org', ); $mail->setText('text-text-text-text-text-text-text'); $mail->setData(['key-key-key-key-key-key-key' => 'value-value-value-value-value-value-value']); @@ -91,7 +91,7 @@ public static function mailTemplates(): array { return [ 'TXT template' => ['mailtxt.twig'], - 'HTML template' => ['mailhtml.twig'] + 'HTML template' => ['mailhtml.twig'], ]; } @@ -105,7 +105,7 @@ public function testInvalidTransportConfiguration(): void // load the configuration with an invalid mail.transport.method Configuration::loadFromArray(array_merge($originalTestConfiguration, [ - 'mail.transport.method' => 'foobar' + 'mail.transport.method' => 'foobar', ]), '[ARRAY]', 'simplesaml'); diff --git a/tests/src/SimpleSAML/Utils/HTTPTest.php b/tests/src/SimpleSAML/Utils/HTTPTest.php index cb8dc6f05f..47cf1385a3 100644 --- a/tests/src/SimpleSAML/Utils/HTTPTest.php +++ b/tests/src/SimpleSAML/Utils/HTTPTest.php @@ -211,12 +211,12 @@ public function testGetSelfURLMethods(): void $this->setupEnvFromURL('http://www.example.org/module.php/module/file.php?foo=bar'); $this->assertEquals( 'https://example.com/simplesaml/module.php/module/file.php?foo=bar', - $httpUtils->getSelfURL() + $httpUtils->getSelfURL(), ); $this->assertEquals('https://example.com', $httpUtils->getSelfURLHost()); $this->assertEquals( 'https://example.com/simplesaml/module.php/module/file.php', - $httpUtils->getSelfURLNoQuery() + $httpUtils->getSelfURLNoQuery(), ); $this->assertTrue($httpUtils->isHTTPS()); $this->assertEquals('https://' . $httpUtils->getSelfHostWithNonStandardPort(), $httpUtils->getSelfURLHost()); @@ -227,12 +227,12 @@ public function testGetSelfURLMethods(): void ], '[ARRAY]', 'simplesaml'); $this->assertEquals( 'https://example.com/simplesaml/module.php/module/file.php?foo=bar', - $httpUtils->getSelfURL() + $httpUtils->getSelfURL(), ); $this->assertEquals('https://example.com', $httpUtils->getSelfURLHost()); $this->assertEquals( 'https://example.com/simplesaml/module.php/module/file.php', - $httpUtils->getSelfURLNoQuery() + $httpUtils->getSelfURLNoQuery(), ); $this->assertTrue($httpUtils->isHTTPS()); $this->assertEquals('https://' . $httpUtils->getSelfHostWithNonStandardPort(), $httpUtils->getSelfURLHost()); @@ -243,7 +243,7 @@ public function testGetSelfURLMethods(): void ], '[ARRAY]', 'simplesaml'); $this->assertEquals( 'https://example.com/module.php/module/file.php?foo=bar', - $httpUtils->getSelfURL() + $httpUtils->getSelfURL(), ); $this->assertEquals('https://example.com', $httpUtils->getSelfURLHost()); $this->assertEquals('https://example.com/module.php/module/file.php', $httpUtils->getSelfURLNoQuery()); @@ -257,12 +257,12 @@ public function testGetSelfURLMethods(): void $this->setupEnvFromURL('http://www.example.org/simplesaml/module.php/module/file.php?foo=bar'); $this->assertEquals( 'http://www.example.org/simplesaml/module.php/module/file.php?foo=bar', - $httpUtils->getSelfURL() + $httpUtils->getSelfURL(), ); $this->assertEquals('http://www.example.org', $httpUtils->getSelfURLHost()); $this->assertEquals( 'http://www.example.org/simplesaml/module.php/module/file.php', - $httpUtils->getSelfURLNoQuery() + $httpUtils->getSelfURLNoQuery(), ); $this->assertFalse($httpUtils->isHTTPS()); $this->assertEquals('http://' . $httpUtils->getSelfHostWithNonStandardPort(), $httpUtils->getSelfURLHost()); @@ -274,12 +274,12 @@ public function testGetSelfURLMethods(): void $this->setupEnvFromURL('http://example.org:8080/simplesaml/module.php/module/file.php?foo=bar'); $this->assertEquals( 'http://example.org:8080/simplesaml/module.php/module/file.php?foo=bar', - $httpUtils->getSelfURL() + $httpUtils->getSelfURL(), ); $this->assertEquals('http://example.org:8080', $httpUtils->getSelfURLHost()); $this->assertEquals( 'http://example.org:8080/simplesaml/module.php/module/file.php', - $httpUtils->getSelfURLNoQuery() + $httpUtils->getSelfURLNoQuery(), ); $this->assertFalse($httpUtils->isHTTPS()); $this->assertEquals('http://' . $httpUtils->getSelfHostWithNonStandardPort(), $httpUtils->getSelfURLHost()); @@ -291,12 +291,12 @@ public function testGetSelfURLMethods(): void $this->setupEnvFromURL('https://example.org:8080/simplesaml/module.php/module/file.php?foo=bar'); $this->assertEquals( 'https://example.org:8080/simplesaml/module.php/module/file.php?foo=bar', - $httpUtils->getSelfURL() + $httpUtils->getSelfURL(), ); $this->assertEquals('https://example.org:8080', $httpUtils->getSelfURLHost()); $this->assertEquals( 'https://example.org:8080/simplesaml/module.php/module/file.php', - $httpUtils->getSelfURLNoQuery() + $httpUtils->getSelfURLNoQuery(), ); $this->assertTrue($httpUtils->isHTTPS()); $this->assertEquals('https://' . $httpUtils->getSelfHostWithNonStandardPort(), $httpUtils->getSelfURLHost()); @@ -465,8 +465,8 @@ public function testSetCookie(): void 'path' => '/ourPath', 'domain' => 'example.com', 'secure' => true, - 'httponly' => true - ] + 'httponly' => true, + ], ); $httpUtils->setCookie( 'RawCookie', @@ -477,8 +477,8 @@ public function testSetCookie(): void 'domain' => 'example.com', 'secure' => true, 'httponly' => true, - 'raw' => true - ] + 'raw' => true, + ], ); $headers = xdebug_get_headers(); @@ -492,7 +492,7 @@ public function testSetCookie(): void $this->assertStringContainsString('RawCookie=value%20;', $headers[1]); $this->assertMatchesRegularExpression( '/\b[Ee]xpires=([Mm]on|[Tt]ue|[Ww]ed|[Tt]hu|[Ff]ri|[Ss]at|[Ss]un)/', - $headers[1] + $headers[1], ); $this->assertMatchesRegularExpression('/\b[Pp]ath=\/ourPath(;|$)/', $headers[1]); $this->assertMatchesRegularExpression('/\b[Dd]omain=example.com(;|$)/', $headers[1]); @@ -592,7 +592,7 @@ public function detectSameSiteProvider(): array ['Mozilla/5.0 (Linux; U; Android 8.1.0; zh-CN; EML-AL00 Build/HUAWEIEML-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 baidu.sogo.uc.UCBrowser/11.9.4.974 UWS/2.13.1.48 Mobile Safari/537.36 AliApp(DingTalk/4.5.11) com.alibaba.android.rimet/10487439 Channel/227200 language/zh-CN', false], ['Mozilla/5.0 (Linux; U; Android 7.1.1; en-US; CPH1723 Build/N6F26Q) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.13.0.1207 Mobile Safari/537.36', false], // old embedded browser - ['Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko)', false] + ['Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko)', false], ]; // @codingStandardsIgnoreEnd } diff --git a/tests/src/SimpleSAML/Utils/SystemTest.php b/tests/src/SimpleSAML/Utils/SystemTest.php index 655b77fa04..6327f7caf2 100644 --- a/tests/src/SimpleSAML/Utils/SystemTest.php +++ b/tests/src/SimpleSAML/Utils/SystemTest.php @@ -42,7 +42,7 @@ public function setUp(): void null, [ self::DEFAULTTEMPDIR => [], - ] + ], ); $this->root_directory = vfsStream::url(self::ROOTDIRNAME); $this->sysUtils = new Utils\System(); diff --git a/tests/src/SimpleSAML/Utils/TimeTest.php b/tests/src/SimpleSAML/Utils/TimeTest.php index 1f59c7ba05..237e773738 100644 --- a/tests/src/SimpleSAML/Utils/TimeTest.php +++ b/tests/src/SimpleSAML/Utils/TimeTest.php @@ -30,7 +30,7 @@ public function testGenerateTimestamp(): void // test timestamp generation for current time $this->assertMatchesRegularExpression( '/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/', - $timeUtils->generateTimestamp() + $timeUtils->generateTimestamp(), ); } @@ -106,63 +106,63 @@ public function testParseDuration(): void $this->assertEquals( $second, $timeUtils->parseDuration('PT1S', $base), - "Failure checking for 1 second duration." + "Failure checking for 1 second duration.", ); // test minutes $this->assertEquals( $minute, $timeUtils->parseDuration('PT1M', $base), - "Failure checking for 1 minute duration." + "Failure checking for 1 minute duration.", ); // test hours $this->assertEquals( $hour, $timeUtils->parseDuration('PT1H', $base), - "Failure checking for 1 hour duration." + "Failure checking for 1 hour duration.", ); // test days $this->assertEquals( $day, $timeUtils->parseDuration('P1D', $base), - "Failure checking for 1 day duration." + "Failure checking for 1 day duration.", ); // test weeks $this->assertEquals( $week, $timeUtils->parseDuration('P1W', $base), - "Failure checking for 1 week duration." + "Failure checking for 1 week duration.", ); // test month $this->assertEquals( $month, $timeUtils->parseDuration('P1M', $base), - "Failure checking for 1 month duration." + "Failure checking for 1 month duration.", ); // test year $this->assertEquals( $year, $timeUtils->parseDuration('P1Y', $base), - "Failure checking for 1 year duration." + "Failure checking for 1 year duration.", ); // test months > 12 $this->assertEquals( $manymonths, $timeUtils->parseDuration('P14M', $base), - "Failure checking for 14 months duration (1 year and 2 months)." + "Failure checking for 14 months duration (1 year and 2 months).", ); // test negative months $this->assertEquals( $negmonths, $timeUtils->parseDuration('-P3M', $base), - "Failure checking for -3 months duration (-1 year + 9 months)." + "Failure checking for -3 months duration (-1 year + 9 months).", ); // test from current time @@ -170,7 +170,7 @@ public function testParseDuration(): void $this->assertGreaterThanOrEqual( $now + 60, $timeUtils->parseDuration('PT1M'), - "Failure testing for 1 minute over current time." + "Failure testing for 1 minute over current time.", ); // test invalid durations @@ -181,6 +181,7 @@ public function testParseDuration(): void } catch (InvalidArgumentException $e) { $this->assertStringStartsWith('Invalid ISO 8601 duration: ', $e->getMessage()); } + try { // missing T delimiter $timeUtils->parseDuration('P1S'); diff --git a/tests/src/SimpleSAML/XHTML/TemplateTranslationTest.php b/tests/src/SimpleSAML/XHTML/TemplateTranslationTest.php index 39388519a3..709e841c30 100644 --- a/tests/src/SimpleSAML/XHTML/TemplateTranslationTest.php +++ b/tests/src/SimpleSAML/XHTML/TemplateTranslationTest.php @@ -120,7 +120,7 @@ public function testAuthStatusTemplate(): void $this->assertStringContainsString( 'Your session is valid for ' . $t->data['remaining'] . ' seconds from now.', - $html + $html, ); } @@ -142,16 +142,16 @@ public function testValidateTwigFiles(): void 'asset', function () { return ''; - } - ) + }, + ), ); $twig->addFunction( new TwigFunction( 'moduleURL', function () { return ''; - } - ) + }, + ), ); // Fake filters @@ -161,16 +161,16 @@ function () { function () { return ''; }, - ['needs_context' => true] - ) + ['needs_context' => true], + ), ); $twig->addFilter( new TwigFilter( 'entityDisplayName', function () { return ''; - } - ) + }, + ), ); $files = Finder::create() @@ -178,8 +178,8 @@ function () { ->in( [ $root . '/templates', - $root . '/modules' - ] + $root . '/modules', + ], ); foreach ($files as $file) { diff --git a/tests/src/SimpleSAML/XML/ErrorsTest.php b/tests/src/SimpleSAML/XML/ErrorsTest.php index dec252ee45..f07352bfe1 100644 --- a/tests/src/SimpleSAML/XML/ErrorsTest.php +++ b/tests/src/SimpleSAML/XML/ErrorsTest.php @@ -33,7 +33,7 @@ public function loggingErrors(): void $this->assertEquals( "level=3,code=76,line=1,col=18,msg=Opening and ending tag mismatch: Test line 1 and test\n", - $errors + $errors, ); } @@ -54,7 +54,7 @@ public function formatErrors(): void $this->assertEquals( "level=3,code=76,line=1,col=18,msg=msg\nlevel=3,code=76,line=1,col=18,msg=msg\n", - $errors + $errors, ); } } diff --git a/tests/src/SimpleSAML/XML/ParserTest.php b/tests/src/SimpleSAML/XML/ParserTest.php index 077117ee40..7dcb7c5470 100644 --- a/tests/src/SimpleSAML/XML/ParserTest.php +++ b/tests/src/SimpleSAML/XML/ParserTest.php @@ -47,7 +47,7 @@ public function getValue(): void $result = $this->xml->getValue('/Root/Value', true); $this->assertEquals( 'Hello, World!', - $result + $result, ); } @@ -60,7 +60,7 @@ public function getEmptyValue(): void $result = $this->xml->getValue('/Root/Foo', false); $this->assertEquals( null, - $result + $result, ); } @@ -83,7 +83,7 @@ public function getDefaultValue(): void $result = $this->xml->getValueDefault('/Root/Other', 'Hello'); $this->assertEquals( 'Hello', - $result + $result, ); } @@ -97,13 +97,13 @@ public function getValueAlternatives(): void ->xml ->getValueAlternatives([ '/Root/Other', - '/Root/Value' + '/Root/Value', ], true) ; $this->assertEquals( 'Hello, World!', - $result + $result, ); } @@ -117,13 +117,13 @@ public function getEmptyValueAlternatives(): void ->xml ->getValueAlternatives([ '/Root/Foo', - '/Root/Bar' + '/Root/Bar', ], false) ; $this->assertEquals( null, - $result + $result, ); } @@ -137,9 +137,9 @@ public function getValueAlternativesException(): void $this->xml->getValueAlternatives( [ '/Root/Foo', - '/Root/Bar' + '/Root/Bar', ], - true + true, ); } } diff --git a/tests/src/SimpleSAML/XML/ValidatorTest.php b/tests/src/SimpleSAML/XML/ValidatorTest.php index a80a6c3cbb..d2e68e0977 100644 --- a/tests/src/SimpleSAML/XML/ValidatorTest.php +++ b/tests/src/SimpleSAML/XML/ValidatorTest.php @@ -74,7 +74,7 @@ public function testIsNodeValidatedSuccess(): void $validator = new Validator( $doc, 'node', - ['PEM' => $this->good_certificate] + ['PEM' => $this->good_certificate], ); $result = $validator->isNodeValidated($node); @@ -104,7 +104,7 @@ public function testIsNodeValidatedFailure(): void $validator = new Validator( $doc, 'node1', - ['PEM' => $this->good_certificate] + ['PEM' => $this->good_certificate], ); $result = $validator->isNodeValidated($node2); diff --git a/tests/www/IndexTest.php b/tests/www/IndexTest.php index cf66ba0525..5be54e8431 100644 --- a/tests/www/IndexTest.php +++ b/tests/www/IndexTest.php @@ -69,7 +69,7 @@ public function testRedirection(): void { // test most basic redirection $this->updateConfig([ - 'baseurlpath' => 'http://example.org/simplesaml/' + 'baseurlpath' => 'http://example.org/simplesaml/', ]); $resp = self::$server->get('/index.php', [], [ CURLOPT_FOLLOWLOCATION => 0, @@ -77,12 +77,12 @@ public function testRedirection(): void $this->assertEquals('303', $resp['code']); $this->assertEquals( 'http://example.org/simplesaml/module.php/core/welcome', - $resp['headers']['Location'] + $resp['headers']['Location'], ); // test non-default path and https $this->updateConfig([ - 'baseurlpath' => 'https://example.org/' + 'baseurlpath' => 'https://example.org/', ]); $resp = self::$server->get('/index.php', [], [ CURLOPT_FOLLOWLOCATION => 0, @@ -90,12 +90,12 @@ public function testRedirection(): void $this->assertEquals('303', $resp['code']); $this->assertEquals( 'https://example.org/module.php/core/welcome', - $resp['headers']['Location'] + $resp['headers']['Location'], ); // test URL guessing $this->updateConfig([ - 'baseurlpath' => '/simplesaml/' + 'baseurlpath' => '/simplesaml/', ]); $resp = self::$server->get('/index.php', [], [ CURLOPT_FOLLOWLOCATION => 0, @@ -103,7 +103,7 @@ public function testRedirection(): void $this->assertEquals('303', $resp['code']); $this->assertEquals( 'http://' . self::$server_addr . '/simplesaml/module.php/core/welcome', - $resp['headers']['Location'] + $resp['headers']['Location'], ); } @@ -113,7 +113,7 @@ public function testRedirection(): void public function testRedirectionFrontpageRedirectOption(): void { $this->updateConfig([ - 'frontpage.redirect' => 'https://www.example.edu/' + 'frontpage.redirect' => 'https://www.example.edu/', ]); $resp = self::$server->get('/index.php', [], [ CURLOPT_FOLLOWLOCATION => 0, @@ -121,7 +121,7 @@ public function testRedirectionFrontpageRedirectOption(): void $this->assertEquals('303', $resp['code']); $this->assertEquals( 'https://www.example.edu/', - $resp['headers']['Location'] + $resp['headers']['Location'], ); } diff --git a/tools/linters/.eslintrc.js b/tools/linters/.eslintrc.js new file mode 100644 index 0000000000..eeca409acb --- /dev/null +++ b/tools/linters/.eslintrc.js @@ -0,0 +1,14 @@ +module.exports = { + ignorePatterns: ["!/tools/linters/.eslintrc.yml", "!/tools/linters/.stylelintrc.json"], + parserOptions: { + ecmaVersion: 2015, + sourceType: "module" + }, + overrides: [ + { + files: ["*.json"], + extends: ["plugin:jsonc/recommended-with-json"], + parser: "jsonc-eslint-parser", + } + ] +}; diff --git a/tools/linters/.eslintrc.yml b/tools/linters/.eslintrc.yml deleted file mode 100644 index 5878995464..0000000000 --- a/tools/linters/.eslintrc.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- - -extends: ["plugin:json/recommended"] - -ignorePatterns: ["!/tools/linters/.eslintrc.yml", "!/tools/linters/.stylelintrc.json"] - -parserOptions: - sourceType: "module" - ecmaVersion: 2015