diff --git a/composer.json b/composer.json index 2485293576a1b3df38705ec4c360d932dc71ef9f..475ad79d09878d0bec77a0f1e51b61537d0b11df 100644 --- a/composer.json +++ b/composer.json @@ -39,9 +39,9 @@ "simplesamlphp/saml2": "^3.2", "robrichards/xmlseclibs": "^3.0", "whitehat101/apr1-md5": "~1.0", - "twig/twig": "~1.0", + "twig/twig": "~1.0 || ~2.0", "gettext/gettext": "^4.6", - "jaimeperez/twig-configurable-i18n": "^1.2" + "jaimeperez/twig-configurable-i18n": "^2.0" }, "require-dev": { "phpunit/phpunit": "~4.8.35", diff --git a/composer.lock b/composer.lock index 4045d285f227da1d159399d0db6483fb8ba69e8d..4054e22f02d7fd76fa0b105dce86da4c02a64a0a 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": "d628ce08777349918ca10b6c78d981c6", + "content-hash": "b9c34fc504ecc863bc6fe8fecd0f838e", "packages": [ { "name": "gettext/gettext", - "version": "v4.6.0", + "version": "v4.6.1", "source": { "type": "git", "url": "https://github.com/oscarotero/Gettext.git", - "reference": "cae84aff39a87e07bd6e5cddb5adb720a0ffa357" + "reference": "854ff5f5aaf92d2af7080ba8fc15718b27b5c89a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/oscarotero/Gettext/zipball/cae84aff39a87e07bd6e5cddb5adb720a0ffa357", - "reference": "cae84aff39a87e07bd6e5cddb5adb720a0ffa357", + "url": "https://api.github.com/repos/oscarotero/Gettext/zipball/854ff5f5aaf92d2af7080ba8fc15718b27b5c89a", + "reference": "854ff5f5aaf92d2af7080ba8fc15718b27b5c89a", "shasum": "" }, "require": { @@ -66,7 +66,7 @@ "po", "translation" ], - "time": "2018-06-26T16:51:09+00:00" + "time": "2018-08-27T15:40:19+00:00" }, { "name": "gettext/languages", @@ -131,16 +131,16 @@ }, { "name": "jaimeperez/twig-configurable-i18n", - "version": "v1.2", + "version": "v2.0", "source": { "type": "git", "url": "https://github.com/jaimeperez/twig-configurable-i18n.git", - "reference": "75d4926fd102c9e62219ad7f94a6136d2f2ccd93" + "reference": "4ccf150ba9f28d2e31d0622ecc9b81cdc6a2638b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jaimeperez/twig-configurable-i18n/zipball/75d4926fd102c9e62219ad7f94a6136d2f2ccd93", - "reference": "75d4926fd102c9e62219ad7f94a6136d2f2ccd93", + "url": "https://api.github.com/repos/jaimeperez/twig-configurable-i18n/zipball/4ccf150ba9f28d2e31d0622ecc9b81cdc6a2638b", + "reference": "4ccf150ba9f28d2e31d0622ecc9b81cdc6a2638b", "shasum": "" }, "require": { @@ -171,7 +171,7 @@ "translation", "twig" ], - "time": "2016-10-03T12:34:15+00:00" + "time": "2018-10-10T09:12:46+00:00" }, { "name": "psr/log", @@ -315,26 +315,143 @@ "description": "SAML2 PHP library from SimpleSAMLphp", "time": "2018-09-27T14:09:06+00:00" }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-08-06T14:22:27+00:00" + }, { "name": "twig/extensions", - "version": "v1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/twigphp/Twig-extensions.git", - "reference": "d188c76168b853481cc75879ea045bf93d718e9c" + "reference": "2c1a86526d0044065220d1b51ac08348bea5ca82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/d188c76168b853481cc75879ea045bf93d718e9c", - "reference": "d188c76168b853481cc75879ea045bf93d718e9c", + "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/2c1a86526d0044065220d1b51ac08348bea5ca82", + "reference": "2c1a86526d0044065220d1b51ac08348bea5ca82", "shasum": "" }, "require": { - "twig/twig": "~1.27|~2.0" + "twig/twig": "^1.27|^2.0" }, "require-dev": { - "symfony/phpunit-bridge": "~3.3@dev", - "symfony/translation": "~2.3|~3.0" + "symfony/phpunit-bridge": "^3.4", + "symfony/translation": "^2.7|^3.4" }, "suggest": { "symfony/translation": "Allow the time_diff output to be translated" @@ -364,29 +481,30 @@ } ], "description": "Common additional features for Twig that do not directly belong in core", - "homepage": "http://twig.sensiolabs.org/doc/extensions/index.html", "keywords": [ "i18n", "text" ], - "time": "2017-06-08T18:19:53+00:00" + "time": "2018-05-22T13:26:07+00:00" }, { "name": "twig/twig", - "version": "v1.35.3", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "b48680b6eb7d16b5025b9bfc4108d86f6b8af86f" + "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/b48680b6eb7d16b5025b9bfc4108d86f6b8af86f", - "reference": "b48680b6eb7d16b5025b9bfc4108d86f6b8af86f", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/6a5f676b77a90823c2d4eaf76137b771adf31323", + "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { "psr/container": "^1.0", @@ -396,7 +514,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.35-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -425,16 +543,16 @@ }, { "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", + "homepage": "https://twig.symfony.com/contributors", "role": "Contributors" } ], "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", + "homepage": "https://twig.symfony.com", "keywords": [ "templating" ], - "time": "2018-03-20T04:25:58+00:00" + "time": "2018-07-13T07:18:09+00:00" }, { "name": "whitehat101/apr1-md5", @@ -546,16 +664,16 @@ }, { "name": "composer/xdebug-handler", - "version": "1.1.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08" + "reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08", - "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/b8e9745fb9b06ea6664d8872c4505fb16df4611c", + "reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c", "shasum": "" }, "require": { @@ -586,39 +704,39 @@ "Xdebug", "performance" ], - "time": "2018-04-11T15:42:36+00:00" + "time": "2018-08-31T19:07:57+00:00" }, { "name": "doctrine/annotations", - "version": "v1.2.7", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + "reference": "54cacc9b81758b14e3ce750f205a393d52339e97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97", + "reference": "54cacc9b81758b14e3ce750f205a393d52339e97", "shasum": "" }, "require": { "doctrine/lexer": "1.*", - "php": ">=5.3.2" + "php": "^5.6 || ^7.0" }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "^5.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" } }, "notification-url": "https://packagist.org/downloads/", @@ -654,7 +772,7 @@ "docblock", "parser" ], - "time": "2015-08-31T12:32:49+00:00" + "time": "2017-02-24T16:22:25+00:00" }, { "name": "doctrine/instantiator", @@ -766,49 +884,51 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.2.20", + "version": "v2.13.0", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "f1631f0747ad2a9dd3de8d7873b71f6573f8d0c2" + "reference": "7136aa4e0c5f912e8af82383775460d906168a10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/f1631f0747ad2a9dd3de8d7873b71f6573f8d0c2", - "reference": "f1631f0747ad2a9dd3de8d7873b71f6573f8d0c2", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/7136aa4e0c5f912e8af82383775460d906168a10", + "reference": "7136aa4e0c5f912e8af82383775460d906168a10", "shasum": "" }, "require": { "composer/semver": "^1.4", - "composer/xdebug-handler": "^1.0", + "composer/xdebug-handler": "^1.2", "doctrine/annotations": "^1.2", "ext-json": "*", "ext-tokenizer": "*", - "php": "^5.3.6 || >=7.0 <7.3", - "sebastian/diff": "^1.4", - "symfony/console": "^2.4 || ^3.0 || ^4.0", - "symfony/event-dispatcher": "^2.1 || ^3.0 || ^4.0", - "symfony/filesystem": "^2.4 || ^3.0 || ^4.0", - "symfony/finder": "^2.2 || ^3.0 || ^4.0", - "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0", - "symfony/polyfill-php54": "^1.0", - "symfony/polyfill-php55": "^1.3", + "php": "^5.6 || >=7.0 <7.3", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.2 || ^4.0", + "symfony/event-dispatcher": "^3.0 || ^4.0", + "symfony/filesystem": "^3.0 || ^4.0", + "symfony/finder": "^3.0 || ^4.0", + "symfony/options-resolver": "^3.0 || ^4.0", "symfony/polyfill-php70": "^1.0", "symfony/polyfill-php72": "^1.4", - "symfony/process": "^2.3 || ^3.0 || ^4.0", - "symfony/stopwatch": "^2.5 || ^3.0 || ^4.0" + "symfony/process": "^3.0 || ^4.0", + "symfony/stopwatch": "^3.0 || ^4.0" }, "conflict": { - "hhvm": "<3.18" + "hhvm": "*" }, "require-dev": { - "johnkary/phpunit-speedtrap": "^1.0.1 || ^2.0 || ^3.0", + "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", "justinrainbow/json-schema": "^5.0", "keradus/cli-executor": "^1.1", "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^1.0.2", - "phpunit/phpunit": "^4.8.35 || ^5.4.3", - "symfony/phpunit-bridge": "^3.2.2 || ^4.0" + "php-coveralls/php-coveralls": "^2.1", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.0.1", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.0.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1", + "phpunitgoodpractices/traits": "^1.5.1", + "symfony/phpunit-bridge": "^4.0" }, "suggest": { "ext-mbstring": "For handling non-UTF8 characters in cache signature.", @@ -820,6 +940,11 @@ "php-cs-fixer" ], "type": "application", + "extra": { + "branch-alias": { + "dev-master": "2.13-dev" + } + }, "autoload": { "psr-4": { "PhpCsFixer\\": "src/" @@ -828,6 +953,7 @@ "tests/Test/AbstractFixerTestCase.php", "tests/Test/AbstractIntegrationCaseFactory.php", "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", "tests/Test/IntegrationCase.php", "tests/Test/IntegrationCaseFactory.php", "tests/Test/IntegrationCaseFactoryInterface.php", @@ -850,49 +976,7 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2018-06-02T17:26:04+00:00" - }, - { - "name": "ircmaxell/password-compat", - "version": "v1.0.4", - "source": { - "type": "git", - "url": "https://github.com/ircmaxell/password_compat.git", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "type": "library", - "autoload": { - "files": [ - "lib/password.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthony Ferrara", - "email": "ircmaxell@php.net", - "homepage": "http://blog.ircmaxell.com" - } - ], - "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", - "homepage": "https://github.com/ircmaxell/password_compat", - "keywords": [ - "hashing", - "password" - ], - "time": "2014-11-20T16:49:30+00:00" + "time": "2018-08-23T13:15:44+00:00" }, { "name": "mikey179/vfsStream", @@ -942,33 +1026,29 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.17", + "version": "v9.99.99", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": "^7" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -987,41 +1067,195 @@ "pseudorandom", "random" ], - "time": "2018-07-04T16:31:37+00:00" + "time": "2018-07-02T15:55:56+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "time": "2018-02-15T16:58:55+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "2.0.5", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b" + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b", - "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "phpDocumentor": [ + "psr-4": { + "phpDocumentor\\Reflection\\": [ "src/" ] } @@ -1033,23 +1267,23 @@ "authors": [ { "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" + "email": "me@mikevanriel.com" } ], - "time": "2016-01-25T08:17:30+00:00" + "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", - "version": "1.7.6", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { @@ -1061,12 +1295,12 @@ }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -1099,7 +1333,7 @@ "spy", "stub" ], - "time": "2018-04-18T13:57:24+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1851,37 +2085,45 @@ }, { "name": "symfony/console", - "version": "v2.8.42", + "version": "v3.4.17", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e8e59b74ad1274714dad2748349b55e3e6e630c7" + "reference": "3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e8e59b74ad1274714dad2748349b55e3e6e630c7", - "reference": "e8e59b74ad1274714dad2748349b55e3e6e630c7", + "url": "https://api.github.com/repos/symfony/console/zipball/3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b", + "reference": "3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/debug": "^2.7.2|~3.0.0", + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/polyfill-mbstring": "~1.0" }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/process": "~2.1|~3.0.0" + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" }, "suggest": { "psr/log-implementation": "For using the console logger", "symfony/event-dispatcher": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1908,37 +2150,36 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-05-15T21:17:45+00:00" + "time": "2018-10-02T16:33:53+00:00" }, { "name": "symfony/debug", - "version": "v2.8.42", + "version": "v3.4.17", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "a26ddce7fe4e884097d72435653bc7e703411f26" + "reference": "0a612e9dfbd2ccce03eb174365f31ecdca930ff6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/a26ddce7fe4e884097d72435653bc7e703411f26", - "reference": "a26ddce7fe4e884097d72435653bc7e703411f26", + "url": "https://api.github.com/repos/symfony/debug/zipball/0a612e9dfbd2ccce03eb174365f31ecdca930ff6", + "reference": "0a612e9dfbd2ccce03eb174365f31ecdca930ff6", "shasum": "" }, "require": { - "php": ">=5.3.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0" }, "conflict": { "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/class-loader": "~2.2|~3.0.0", - "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" + "symfony/http-kernel": "~2.8|~3.0|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1965,31 +2206,34 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-06-22T15:01:26+00:00" + "time": "2018-10-02T16:33:53+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.42", + "version": "v3.4.17", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9b69aad7d4c086dc94ebade2d5eb9145da5dac8c" + "reference": "b2e1f19280c09a42dc64c0b72b80fe44dd6e88fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9b69aad7d4c086dc94ebade2d5eb9145da5dac8c", - "reference": "9b69aad7d4c086dc94ebade2d5eb9145da5dac8c", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b2e1f19280c09a42dc64c0b72b80fe44dd6e88fb", + "reference": "b2e1f19280c09a42dc64c0b72b80fe44dd6e88fb", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0" }, "suggest": { "symfony/dependency-injection": "", @@ -1998,7 +2242,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -2025,30 +2269,30 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-04-06T07:35:03+00:00" + "time": "2018-07-26T09:06:28+00:00" }, { "name": "symfony/filesystem", - "version": "v2.8.42", + "version": "v3.4.17", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "0f685c099aca7ba86bcc31850186dbfe84a4a8a1" + "reference": "d69930fc337d767607267d57c20a7403d0a822a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/0f685c099aca7ba86bcc31850186dbfe84a4a8a1", - "reference": "0f685c099aca7ba86bcc31850186dbfe84a4a8a1", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d69930fc337d767607267d57c20a7403d0a822a4", + "reference": "d69930fc337d767607267d57c20a7403d0a822a4", "shasum": "" }, "require": { - "php": ">=5.3.9", + "php": "^5.5.9|>=7.0.8", "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -2075,29 +2319,29 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-06-21T09:24:14+00:00" + "time": "2018-10-02T12:28:39+00:00" }, { "name": "symfony/finder", - "version": "v2.8.42", + "version": "v3.4.17", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "995cd7c28a0778cece02e2133b4d813dc509dfc3" + "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/995cd7c28a0778cece02e2133b4d813dc509dfc3", - "reference": "995cd7c28a0778cece02e2133b4d813dc509dfc3", + "url": "https://api.github.com/repos/symfony/finder/zipball/54ba444dddc5bd5708a34bd095ea67c6eb54644d", + "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -2124,29 +2368,29 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-06-19T11:07:17+00:00" + "time": "2018-10-03T08:46:40+00:00" }, { "name": "symfony/options-resolver", - "version": "v2.8.42", + "version": "v3.4.17", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "d9077ee91fdd64695dc754dc153fc00ada7ade97" + "reference": "1cf7d8e704a9cc4164c92e430f2dfa3e6983661d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/d9077ee91fdd64695dc754dc153fc00ada7ade97", - "reference": "d9077ee91fdd64695dc754dc153fc00ada7ade97", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/1cf7d8e704a9cc4164c92e430f2dfa3e6983661d", + "reference": "1cf7d8e704a9cc4164c92e430f2dfa3e6983661d", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -2178,148 +2422,35 @@ "configuration", "options" ], - "time": "2018-05-30T04:18:42+00:00" + "time": "2018-09-17T17:29:18+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "time": "2018-04-30T19:57:29+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "3296adf6a6454a050679cde90f95350ad604b171" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", - "reference": "3296adf6a6454a050679cde90f95350ad604b171", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2018-04-26T10:06:28+00:00" - }, - { - "name": "symfony/polyfill-php54", - "version": "v1.8.0", + "name": "symfony/polyfill-php70", + "version": "v1.9.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php54.git", - "reference": "6c3a2b84c6025e4ea3f6a19feac35408c64b22e1" + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "1e24b0c4a56d55aaf368763a06c6d1c7d3194934" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/6c3a2b84c6025e4ea3f6a19feac35408c64b22e1", - "reference": "6c3a2b84c6025e4ea3f6a19feac35408c64b22e1", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/1e24b0c4a56d55aaf368763a06c6d1c7d3194934", + "reference": "1e24b0c4a56d55aaf368763a06c6d1c7d3194934", "shasum": "" }, "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php54\\": "" + "Symfony\\Polyfill\\Php70\\": "" }, "files": [ "bootstrap.php" @@ -2342,63 +2473,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2018-04-26T10:06:28+00:00" - }, - { - "name": "symfony/polyfill-php55", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "a39456128377a85f2c5707fcae458678560cba46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/a39456128377a85f2c5707fcae458678560cba46", - "reference": "a39456128377a85f2c5707fcae458678560cba46", - "shasum": "" - }, - "require": { - "ircmaxell/password-compat": "~1.0", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php55\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -2406,41 +2481,37 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.8.0", + "name": "symfony/polyfill-php72", + "version": "v1.9.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6" + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "95c50420b0baed23852452a7f0c7b527303ed5ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/77454693d8f10dd23bb24955cffd2d82db1007a6", - "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/95c50420b0baed23852452a7f0c7b527303ed5ae", + "reference": "95c50420b0baed23852452a7f0c7b527303ed5ae", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0", "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" + "Symfony\\Polyfill\\Php72\\": "" }, "files": [ "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2457,7 +2528,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -2465,37 +2536,37 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.8.0", + "name": "symfony/process", + "version": "v3.4.17", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46" + "url": "https://github.com/symfony/process.git", + "reference": "1dc2977afa7d70f90f3fefbcd84152813558910e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46", - "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46", + "url": "https://api.github.com/repos/symfony/process/zipball/1dc2977afa7d70f90f3fefbcd84152813558910e", + "reference": "1dc2977afa7d70f90f3fefbcd84152813558910e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" + "Symfony\\Component\\Process\\": "" }, - "files": [ - "bootstrap.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2504,50 +2575,44 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony Process Component", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-10-02T12:28:39+00:00" }, { - "name": "symfony/process", - "version": "v2.8.42", + "name": "symfony/stopwatch", + "version": "v3.4.17", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "542d88b350c42750fdc14e73860ee96dd423e95d" + "url": "https://github.com/symfony/stopwatch.git", + "reference": "05e52a39de52ba690aebaed462b2bc8a9649f0a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/542d88b350c42750fdc14e73860ee96dd423e95d", - "reference": "542d88b350c42750fdc14e73860ee96dd423e95d", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/05e52a39de52ba690aebaed462b2bc8a9649f0a4", + "reference": "05e52a39de52ba690aebaed462b2bc8a9649f0a4", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Component\\Stopwatch\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -2567,36 +2632,46 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-05-27T07:40:52+00:00" + "time": "2018-10-02T12:28:39+00:00" }, { - "name": "symfony/stopwatch", - "version": "v2.8.42", + "name": "symfony/yaml", + "version": "v3.4.17", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "57021208ad9830f8f8390c1a9d7bb390f32be89e" + "url": "https://github.com/symfony/yaml.git", + "reference": "640b6c27fed4066d64b64d5903a86043f4a4de7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/57021208ad9830f8f8390c1a9d7bb390f32be89e", - "reference": "57021208ad9830f8f8390c1a9d7bb390f32be89e", + "url": "https://api.github.com/repos/symfony/yaml/zipball/640b6c27fed4066d64b64d5903a86043f4a4de7f", + "reference": "640b6c27fed4066d64b64d5903a86043f4a4de7f", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" + "Symfony\\Component\\Yaml\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -2616,41 +2691,41 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Stopwatch Component", + "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:36:31+00:00" + "time": "2018-10-02T16:33:53+00:00" }, { - "name": "symfony/yaml", - "version": "v2.8.42", + "name": "webmozart/assert", + "version": "1.3.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "51356b7a2ff7c9fd06b2f1681cc463bb62b5c1ff" + "url": "https://github.com/webmozart/assert.git", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/51356b7a2ff7c9fd06b2f1681cc463bb62b5c1ff", - "reference": "51356b7a2ff7c9fd06b2f1681cc463bb62b5c1ff", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/polyfill-ctype": "~1.8" + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "1.3-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Webmozart\\Assert\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2658,17 +2733,17 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2018-05-01T22:52:40+00:00" + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-01-29T19:49:41+00:00" } ], "aliases": [], diff --git a/config-templates/config.php b/config-templates/config.php index 54121b5faac74832007f2a85bcba2c7490266098..50a08f9b9b749c3bbf6db5f6e60784b93f7d052c 100644 --- a/config-templates/config.php +++ b/config-templates/config.php @@ -384,6 +384,11 @@ $config = array( */ 'database.prefix' => '', + /* + * (Optional) Driver options + */ + 'database.driver_options' => array(), + /* * True or false if you would like a persistent database connection */ @@ -397,7 +402,7 @@ $config = array( * * Configuration options in the slave array are exactly the same as the * options for the master (shown above) with the exception of the table - * prefix. + * prefix and driver options. */ 'database.slaves' => array( /* diff --git a/dictionaries/admin.translation.json b/dictionaries/admin.translation.json index 28742f46bead11bf762aba2dcce6829192db3cbb..7f5f18abbdbc4d57dfdc8f92a55beafdc632eb34 100644 --- a/dictionaries/admin.translation.json +++ b/dictionaries/admin.translation.json @@ -885,8 +885,7 @@ "sr": "Shib 1.3 Davalac Identiteta (udaljeni)", "ro": "Furnizor de identitate Shib 1.3 (distant)", "ru": "\u041f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 Shib 1.3 (\u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435)", - "eu": "Shib 1.3 Identitate hornitzailea (Urrunekoa)", - "eu": "\u03a0\u03ac\u03c1\u03bf\u03c7\u03bf\u03c2 \u03a4\u03b1\u03c5\u03c4\u03cc\u03c4\u03b7\u03c4\u03b1\u03c2 Shib 1.3 (\u0391\u03c0\u03bf\u03bc\u03b1\u03ba\u03c1\u03c5\u03c3\u03bc\u03ad\u03bd\u03bf\u03c2)" + "eu": "Shib 1.3 Identitate hornitzailea (Urrunekoa)" }, "metaover_group_metadata.wsfed-sp-hosted": { "no": "WS-Federation tjenesteleverand\u00f8r (intern)", diff --git a/lib/SimpleSAML/Auth/LDAP.php b/lib/SimpleSAML/Auth/LDAP.php index d1ca13da9c07fada4530dcdc63d4ae225cabbef7..9f57a7eb2d12d610a644eb2e38c3591fd9681a45 100644 --- a/lib/SimpleSAML/Auth/LDAP.php +++ b/lib/SimpleSAML/Auth/LDAP.php @@ -70,11 +70,11 @@ class LDAP ) { // Debug Logger::debug('Library - LDAP __construct(): Setup LDAP with '. - 'host=\''.$hostname. - '\', tls='.var_export($enable_tls, true). - ', debug='.var_export($debug, true). - ', timeout='.var_export($timeout, true). - ', referrals='.var_export($referrals, true)); + 'host=\''.$hostname. + '\', tls='.var_export($enable_tls, true). + ', debug='.var_export($debug, true). + ', timeout='.var_export($timeout, true). + ', referrals='.var_export($referrals, true)); /* * Set debug level before calling connect. Note that this passes @@ -92,21 +92,27 @@ class LDAP */ $resource = @ldap_connect($hostname, $port); if ($resource === false) { - throw $this->makeException('Library - LDAP __construct(): Unable to connect to \''. - $hostname.'\'', ERR_INTERNAL); + throw $this->makeException( + 'Library - LDAP __construct(): Unable to connect to \''.$hostname.'\'', + ERR_INTERNAL + ); } $this->ldap = $resource; // Enable LDAP protocol version 3 if (!@ldap_set_option($this->ldap, LDAP_OPT_PROTOCOL_VERSION, 3)) { - throw $this->makeException('Library - LDAP __construct(): Failed to set LDAP Protocol'. - ' version (LDAP_OPT_PROTOCOL_VERSION) to 3', ERR_INTERNAL); + throw $this->makeException( + 'Library - LDAP __construct(): Failed to set LDAP Protocol version (LDAP_OPT_PROTOCOL_VERSION) to 3', + ERR_INTERNAL + ); } // Set referral option if (!@ldap_set_option($this->ldap, LDAP_OPT_REFERRALS, $referrals)) { - throw $this->makeException('Library - LDAP __construct(): Failed to set LDAP Referrals'. - ' (LDAP_OPT_REFERRALS) to '.$referrals, ERR_INTERNAL); + throw $this->makeException( + 'Library - LDAP __construct(): Failed to set LDAP Referrals (LDAP_OPT_REFERRALS) to '.$referrals, + ERR_INTERNAL + ); } // Set timeouts, if supported @@ -114,12 +120,14 @@ class LDAP $this->timeout = $timeout; if ($timeout > 0) { if (!@ldap_set_option($this->ldap, LDAP_OPT_NETWORK_TIMEOUT, $timeout)) { - Logger::warning('Library - LDAP __construct(): Unable to set timeouts'. - ' (LDAP_OPT_NETWORK_TIMEOUT) to '.$timeout); + Logger::warning( + 'Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_NETWORK_TIMEOUT) to '.$timeout + ); } if (!@ldap_set_option($this->ldap, LDAP_OPT_TIMELIMIT, $timeout)) { - Logger::warning('Library - LDAP __construct(): Unable to set timeouts'. - ' (LDAP_OPT_TIMELIMIT) to '.$timeout); + Logger::warning( + 'Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_TIMELIMIT) to '.$timeout + ); } } @@ -254,8 +262,9 @@ class LDAP } if ($result === false) { - throw $this->makeException('Library - LDAP search(): Failed search on base \''. - $base.'\' for \''.$filter.'\''); + throw $this->makeException( + 'Library - LDAP search(): Failed search on base \''.$base.'\' for \''.$filter.'\'' + ); } // Sanity checks on search results @@ -264,25 +273,32 @@ class LDAP throw $this->makeException('Library - LDAP search(): Failed to get number of entries returned'); } elseif ($count > 1) { // More than one entry is found. External error - throw $this->makeException('Library - LDAP search(): Found '.$count.' entries searching base \''. - $base.'\' for \''.$filter.'\'', ERR_AS_DATA_INCONSIST); + throw $this->makeException( + 'Library - LDAP search(): Found '.$count.' entries searching base \''.$base.'\' for \''.$filter.'\'', + ERR_AS_DATA_INCONSIST + ); } elseif ($count === 0) { // No entry is fond => wrong username is given (or not registered in the catalogue). User error - throw $this->makeException('Library - LDAP search(): Found no entries searching base \''. - $base.'\' for \''.$filter.'\'', ERR_NO_USER); + throw $this->makeException( + 'Library - LDAP search(): Found no entries searching base \''.$base.'\' for \''.$filter.'\'', + ERR_NO_USER + ); } // Resolve the DN from the search result $entry = @ldap_first_entry($this->ldap, $result); if ($entry === false) { - throw $this->makeException('Library - LDAP search(): Unable to retrieve result after searching base \''. - $base.'\' for \''.$filter.'\''); + throw $this->makeException( + 'Library - LDAP search(): Unable to retrieve result after searching base \''. + $base.'\' for \''.$filter.'\'' + ); } $dn = @ldap_get_dn($this->ldap, $entry); if ($dn === false) { - throw $this->makeException('Library - LDAP search(): Unable to get DN after searching base \''. - $base.'\' for \''.$filter.'\''); + throw $this->makeException( + 'Library - LDAP search(): Unable to get DN after searching base \''.$base.'\' for \''.$filter.'\'' + ); } return $dn; } @@ -358,7 +374,8 @@ class LDAP * * @throws \Exception * @param string|array $bases - * @param string|array $filters Array of 'attribute' => 'values' to be combined into the filter, or a raw filter string + * @param string|array $filters Array of 'attribute' => 'values' to be combined into the filter, + * or a raw filter string * @param string|array $attributes Array of attributes requested from LDAP * @param bool $and If multiple filters defined, then either bind them with & or | * @param bool $escape Weather to escape the filter values or not @@ -407,7 +424,7 @@ class LDAP foreach ($bases as $base) { if ($scope === 'base') { $result = @ldap_read($this->ldap, $base, $filter, $attributes, 0, 0, $this->timeout); - } else if ($scope === 'onelevel') { + } elseif ($scope === 'onelevel') { $result = @ldap_list($this->ldap, $base, $filter, $attributes, 0, 0, $this->timeout); } else { $result = @ldap_search($this->ldap, $base, $filter, $attributes, 0, 0, $this->timeout); @@ -606,7 +623,9 @@ class LDAP } $attributes = @ldap_get_attributes($this->ldap, $entry); // Recycling $attributes... Possibly bad practice. if ($attributes === false) { - throw $this->makeException('Library - LDAP getAttributes(): Could not get attributes of first entry from DN \''.$dn.'\''); + throw $this->makeException( + 'Library - LDAP getAttributes(): Could not get attributes of first entry from DN \''.$dn.'\'' + ); } // Parsing each found attribute into our result set @@ -629,7 +648,10 @@ class LDAP } // Base64 encode binary attributes - if (strtolower($name) === 'jpegphoto' || strtolower($name) === 'objectguid' || strtolower($name) === 'ms-ds-consistencyguid') { + if (strtolower($name) === 'jpegphoto' + || strtolower($name) === 'objectguid' + || strtolower($name) === 'ms-ds-consistencyguid' + ) { $values[] = base64_encode($value); } else { $values[] = $value; @@ -677,7 +699,9 @@ class LDAP // escape characters with a special meaning, also in the password $password = addcslashes($password, ',+"\\<>;*'); if (!$this->bind($dn, $password)) { - Logger::info('Library - LDAP validate(): Failed to authenticate \''.$username.'\' using DN \''.$dn.'\''); + Logger::info( + 'Library - LDAP validate(): Failed to authenticate \''.$username.'\' using DN \''.$dn.'\'' + ); return false; } } diff --git a/lib/SimpleSAML/Auth/ProcessingChain.php b/lib/SimpleSAML/Auth/ProcessingChain.php index b265ccd08588d0717e1278fe4894a4f8ec416b34..9ccda2ceab8ec2426405f53d14fe8d81e48d2803 100644 --- a/lib/SimpleSAML/Auth/ProcessingChain.php +++ b/lib/SimpleSAML/Auth/ProcessingChain.php @@ -336,10 +336,10 @@ class ProcessingChain if (isset($state['Destination']['userid.attribute'])) { $attributeName = $state['Destination']['userid.attribute']; - \SimpleSAML\Logger::warning("The 'userid.attribute' option has been deprecated."); + \SimpleSAML\Logger::debug("The 'userid.attribute' option has been deprecated."); } elseif (isset($state['Source']['userid.attribute'])) { $attributeName = $state['Source']['userid.attribute']; - \SimpleSAML\Logger::warning("The 'userid.attribute' option has been deprecated."); + \SimpleSAML\Logger::debug("The 'userid.attribute' option has been deprecated."); } else { // Default attribute $attributeName = 'eduPersonPrincipalName'; diff --git a/lib/SimpleSAML/AuthMemCookie.php b/lib/SimpleSAML/AuthMemCookie.php index da3b22f8f2f415778955641335361468919357f3..6b4455400c4a1709638da0f9747f1ed696c97362 100644 --- a/lib/SimpleSAML/AuthMemCookie.php +++ b/lib/SimpleSAML/AuthMemCookie.php @@ -120,8 +120,9 @@ class AuthMemCookie $class = class_exists('Memcache') ? '\Memcache' : (class_exists('Memcached') ? '\Memcached' : false); if (!$class) { - throw new \Exception('Missing Memcached implementation.'. - ' You must install either the Memcache or Memcached extension.'); + throw new \Exception( + 'Missing Memcached implementation. You must install either the Memcache or Memcached extension.' + ); } // Create the Memcache(d) object. diff --git a/lib/SimpleSAML/IdP.php b/lib/SimpleSAML/IdP.php index 6110df9c7abad24956ff47c8e434bf31609744fb..8e0d9511361cac9fd9fe6563597551fbb49c634c 100644 --- a/lib/SimpleSAML/IdP.php +++ b/lib/SimpleSAML/IdP.php @@ -485,7 +485,7 @@ class IdP if ($assocId !== null) { $this->terminateAssociation($assocId); $session = Session::getSessionFromRequest(); - $session->deleteData('core:idp-ssotime', $this->id.':'.$state['saml:SPEntityId']); + $session->deleteData('core:idp-ssotime', $this->id.';'.$state['saml:SPEntityId']); } // terminate the local session diff --git a/lib/SimpleSAML/Locale/Localization.php b/lib/SimpleSAML/Locale/Localization.php index faf54518489e40a96af09db1fc55f327f672a8a5..bbf64ae6ac9f758a9eaa29709a19c851d737560e 100644 --- a/lib/SimpleSAML/Locale/Localization.php +++ b/lib/SimpleSAML/Locale/Localization.php @@ -23,47 +23,65 @@ class Localization /** * The default gettext domain. + * + * @var string */ const DEFAULT_DOMAIN = 'messages'; /** * Old internationalization backend included in SimpleSAMLphp. + * + * @var string */ const SSP_I18N_BACKEND = 'SimpleSAMLphp'; /** * An internationalization backend implemented purely in PHP. + * + * @var string */ const GETTEXT_I18N_BACKEND = 'gettext/gettext'; /** * The default locale directory + * + * @var string */ private $localeDir; /** * Where specific domains are stored + * + * @var array */ private $localeDomainMap = array(); /** * Pointer to currently active translator + * + * @var \Gettext\Translator */ private $translator; /** * Pointer to current Language + * + * @var Language */ private $language; /** * Language code representing the current Language + * + * @var string */ private $langcode; /** * The language backend to use + * + * @var string */ public $i18nBackend; @@ -85,6 +103,8 @@ class Localization /** * Dump the default locale directory + * + * @return string */ public function getLocaleDir() { @@ -96,6 +116,8 @@ class Localization * Get the default locale dir for a specific module aka. domain * * @param string $domain Name of module/domain + * + * @return string */ public function getDomainLocaleDir($domain) { @@ -139,6 +161,8 @@ class Localization * * @param string $domain Name of localization domain * @throws Exception If the path does not exist even for the default, fallback language + * + * @return string */ public function getLangPath($domain = self::DEFAULT_DOMAIN) { @@ -230,6 +254,8 @@ class Localization * Test to check if backend is set to default * * (if false: backend unset/there's an error) + * + * @return bool */ public function isI18NBackendDefault() { @@ -257,6 +283,8 @@ class Localization /** * Show which domains are registered + * + * @return array */ public function getRegisteredDomains() { diff --git a/lib/SimpleSAML/Locale/Translate.php b/lib/SimpleSAML/Locale/Translate.php index 0e52228a1deb6221acb4ad1c29f3aa3de40a6b6c..7bffffedf1d5cefe41ad7f09c589eb9ea701f44b 100644 --- a/lib/SimpleSAML/Locale/Translate.php +++ b/lib/SimpleSAML/Locale/Translate.php @@ -19,15 +19,24 @@ class Translate */ private $configuration; + /** + * Associative array of languages. + * + * @var array + */ private $langtext = array(); /** * Associative array of dictionaries. + * + * @var array */ private $dictionaries = array(); /** * The default dictionary. + * + * @var string|null */ private $defaultDictionary = null; @@ -38,7 +47,6 @@ class Translate */ private $language; - /** * Constructor * @@ -66,7 +74,6 @@ class Translate } } - /** * Return the internal language object used by this translator. * @@ -77,7 +84,6 @@ class Translate return $this->language; } - /** * This method retrieves a dictionary with the name given. * @@ -107,7 +113,6 @@ class Translate return $this->dictionaries[$name]; } - /** * This method retrieves a tag as an array with language => string mappings. * @@ -145,7 +150,6 @@ class Translate return $dictionary[$tag]; } - /** * Retrieve the preferred translation of a given text. * @@ -186,7 +190,6 @@ class Translate throw new \Exception('Nothing to return from translation.'); } - /** * Translate the name of an attribute. * @@ -219,7 +222,6 @@ class Translate return $name; } - /** * Mark a string for translation without translating it. * @@ -232,7 +234,6 @@ class Translate return $tag; } - /** * Translate a tag into the current language, with a fallback to english. * @@ -321,7 +322,6 @@ class Translate return $translated; } - /** * Return the string that should be used when no translation was found. * @@ -340,7 +340,6 @@ class Translate } } - /** * Include a translation inline instead of putting translations in dictionaries. This function is recommended to be * used ONLY for variable data, or when the translation is already provided by an external source, as a database @@ -363,7 +362,6 @@ class Translate $this->langtext[$tag] = $translation; } - /** * Include a language file from the dictionaries directory. * @@ -386,7 +384,6 @@ class Translate $this->langtext = array_merge($this->langtext, $lang); } - /** * Read a dictionary file in JSON format. * @@ -419,7 +416,6 @@ class Translate return $lang; } - /** * Read a dictionary file in PHP format. * @@ -441,7 +437,6 @@ class Translate return array(); } - /** * Read a dictionary file. * @@ -471,7 +466,13 @@ class Translate return array(); } - + /** + * Translate a singular text. + * + * @param string $original The string before translation. + * + * @return string The translated string. + */ public static function translateSingularGettext($original) { $text = \Gettext\BaseTranslator::$current->gettext($original); @@ -485,7 +486,15 @@ class Translate return strtr($text, is_array($args[0]) ? $args[0] : $args); } - + /** + * Translate a plural text. + * + * @param string $original The string before translation. + * @param string $plural + * @param string $value + * + * @return string The translated string. + */ public static function translatePluralGettext($original, $plural, $value) { $text = \Gettext\BaseTranslator::$current->ngettext($original, $plural, $value); @@ -499,7 +508,6 @@ class Translate return strtr($text, is_array($args[0]) ? $args[0] : $args); } - /** * Pick a translation from a given array of translations for the current language. * @@ -528,14 +536,16 @@ class Translate // we don't have a translation for the current language, load alternative priorities $sspcfg = \SimpleSAML\Configuration::getInstance(); $langcfg = $sspcfg->getConfigItem('language', null); - $priorities = array(); + $priorities = []; if ($langcfg instanceof \SimpleSAML\Configuration) { $priorities = $langcfg->getArray('priorities', array()); } - foreach ($priorities[$context['currentLanguage']] as $lang) { - if (isset($translations[$lang])) { - return $translations[$lang]; + if ( !empty($priorities[$context['currentLanguage']]) ) { + foreach ($priorities[$context['currentLanguage']] as $lang) { + if (isset($translations[$lang])) { + return $translations[$lang]; + } } } diff --git a/lib/SimpleSAML/Memcache.php b/lib/SimpleSAML/Memcache.php index d0288d9f32c5e32d9921600ab968ecccf514563e..c348a966b9d721ac0f278971f2444e5514559375 100644 --- a/lib/SimpleSAML/Memcache.php +++ b/lib/SimpleSAML/Memcache.php @@ -60,7 +60,7 @@ class Memcache if ($serializedInfo === false) { // either the server is down, or we don't have the value stored on that server $mustUpdate = true; - $up = $server->getstats(); + $up = $server->getStats(); if ($up !== false) { $allDown = false; } @@ -306,8 +306,9 @@ class Memcache { $class = class_exists('\Memcache') ? '\Memcache' : (class_exists('\Memcached') ? '\Memcached' : false); if (!$class) { - throw new \Exception('Missing Memcached implementation.'. - ' You must install either the Memcache or Memcached extension.'); + throw new \Exception( + 'Missing Memcached implementation. You must install either the Memcache or Memcached extension.' + ); } self::$extension = strtolower($class); diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php index c1c7e6853ea022802f14acdd5ee9002eba15b2c1..9adae2f0b471460424b2f85f7397fb09278b7cd2 100644 --- a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php +++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php @@ -130,8 +130,9 @@ class MetaDataStorageHandlerSerialize extends MetaDataStorageSource $dh = @opendir($dir); if ($dh === false) { - \SimpleSAML\Logger::warning('Serialize metadata handler: Unable to open directory: '. - var_export($dir, true)); + \SimpleSAML\Logger::warning( + 'Serialize metadata handler: Unable to open directory: '.var_export($dir, true) + ); return $ret; } diff --git a/lib/SimpleSAML/Metadata/Signer.php b/lib/SimpleSAML/Metadata/Signer.php index 195cb02c53b59ab1367159885d0b8987240f86fb..1cb042017596e56b6b0930292371652b7816243a 100644 --- a/lib/SimpleSAML/Metadata/Signer.php +++ b/lib/SimpleSAML/Metadata/Signer.php @@ -229,8 +229,9 @@ class Signer $keyFile = \SimpleSAML\Utils\Config::getCertPath($keyCertFiles['privatekey']); if (!file_exists($keyFile)) { - throw new \Exception('Could not find private key file ['. - $keyFile.'], which is needed to sign the metadata'); + throw new \Exception( + 'Could not find private key file ['.$keyFile.'], which is needed to sign the metadata' + ); } $keyData = file_get_contents($keyFile); diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php index 30c8cdf7b9a62d5d1c6b908c4c34e3a0e556dd62..b21a6e7103c4b6bdfd8d7e15381601909ce6bbad 100644 --- a/lib/SimpleSAML/Session.php +++ b/lib/SimpleSAML/Session.php @@ -48,7 +48,6 @@ class Session implements \Serializable */ private static $instance = null; - /** * The session ID of this session. * @@ -56,7 +55,6 @@ class Session implements \Serializable */ private $sessionId; - /** * Transient session flag. * @@ -64,7 +62,6 @@ class Session implements \Serializable */ private $transient = false; - /** * The track id is a new random unique identifier that is generated for each session. * This is used in the debug logs and error messages to easily track more information @@ -74,10 +71,11 @@ class Session implements \Serializable */ private $trackid = null; - + /** + * @var integer|null + */ private $rememberMeExpire = null; - /** * Marks a session as modified, and therefore needs to be saved before destroying * this object. @@ -86,7 +84,6 @@ class Session implements \Serializable */ private $dirty = false; - /** * Tells the session object that the save callback has been registered and there's no need to register it again. * @@ -94,7 +91,6 @@ class Session implements \Serializable */ private $callback_registered = false; - /** * This is an array of objects which will expire automatically after a set time. It is used * where one needs to store some information - for example a logout request, but doesn't @@ -107,7 +103,6 @@ class Session implements \Serializable */ private $dataStore = array(); - /** * The list of IdP-SP associations. * @@ -118,7 +113,6 @@ class Session implements \Serializable */ private $associations = array(); - /** * The authentication token. * @@ -128,7 +122,6 @@ class Session implements \Serializable */ private $authToken; - /** * Authentication data. * @@ -138,7 +131,6 @@ class Session implements \Serializable */ private $authData = array(); - /** * Private constructor that restricts instantiation to either getSessionFromRequest() for the current session or * getSession() for a specific one. @@ -191,7 +183,6 @@ class Session implements \Serializable } } - /** * Serialize this session object. * @@ -205,7 +196,6 @@ class Session implements \Serializable return $serialized; } - /** * Unserialize a session object and load it.. * @@ -239,7 +229,6 @@ class Session implements \Serializable } } - /** * Retrieves the current session. Creates a new session if there's not one. * @@ -381,7 +370,6 @@ class Session implements \Serializable return $session; } - /** * Load a given session as the current one. * @@ -457,7 +445,6 @@ class Session implements \Serializable } } - /** * Save the current session and clean any left overs that could interfere with the normal application behaviour. * @@ -473,7 +460,6 @@ class Session implements \Serializable } } - /** * Mark this session as dirty. * @@ -494,7 +480,6 @@ class Session implements \Serializable $this->callback_registered = header_register_callback(array($this, 'save')); } - /** * Destroy the session. * @@ -1013,7 +998,6 @@ class Session implements \Serializable return $this->authData[$authority]; } - /** * Check whether the session cookie is set. * @@ -1027,7 +1011,6 @@ class Session implements \Serializable return $sh->hasSessionCookie(); } - /** * Add an SP association for an IdP. * @@ -1055,7 +1038,6 @@ class Session implements \Serializable $this->markDirty(); } - /** * Retrieve the associations for an IdP. * @@ -1091,7 +1073,6 @@ class Session implements \Serializable return $this->associations[$idp]; } - /** * Remove an SP association for an IdP. * @@ -1118,7 +1099,6 @@ class Session implements \Serializable $this->markDirty(); } - /** * Retrieve authentication data. * @@ -1138,7 +1118,6 @@ class Session implements \Serializable return $this->authData[$authority][$name]; } - /** * Retrieve a list of authorities (authentication sources) that are currently valid within * this session. diff --git a/lib/SimpleSAML/Utils/Auth.php b/lib/SimpleSAML/Utils/Auth.php index ad6c4df4b06a05fc40fbefbcffd95dd036c760fd..93dd529228871ca8e70b0f1d69ff41347bd8983d 100644 --- a/lib/SimpleSAML/Utils/Auth.php +++ b/lib/SimpleSAML/Utils/Auth.php @@ -31,6 +31,26 @@ class Auth return Module::getModuleURL('core/login-admin.php', array('ReturnTo' => $returnTo)); } + + /** + * Retrieve a admin logout URL. + * + * @param string|NULL $returnTo The URL the user should arrive on after admin authentication. Defaults to null. + * + * @return string A URL which can be used for logging out. + * @throws \InvalidArgumentException If $returnTo is neither a string nor null. + */ + public static function getAdminLogoutURL($returnTo = null) + { + if (!(is_string($returnTo) || is_null($returnTo))) { + throw new \InvalidArgumentException('Invalid input parameters.'); + } + + $as = new \SimpleSAML\Auth\Simple('admin'); + return $as->getLogoutURL($returnTo = null); + } + + /** * Check whether the current user is admin. * diff --git a/lib/SimpleSAML/XHTML/IdPDisco.php b/lib/SimpleSAML/XHTML/IdPDisco.php index 33faec23514e2b7a4115dc98e6496a4a9ef2f716..7957219add870706b4f8f0d3c7a25c2c96d194a1 100644 --- a/lib/SimpleSAML/XHTML/IdPDisco.php +++ b/lib/SimpleSAML/XHTML/IdPDisco.php @@ -512,7 +512,7 @@ class IdPDisco */ protected function start() { - $idp = $this->getTargetIdp(); + $idp = $this->getTargetIdP(); if ($idp !== null) { $extDiscoveryStorage = $this->config->getString('idpdisco.extDiscoveryStorage', null); if ($extDiscoveryStorage !== null) { @@ -587,7 +587,41 @@ class IdPDisco } $t = new Template($this->config, $templateFile, 'disco'); - $t->data['idplist'] = $idpList; + + $fallbackLanguage = 'en'; + $defaultLanguage = $this->config->getString('language.default', $fallbackLanguage); + $translator = $t->getTranslator(); + $language = $translator->getLanguage()->getLanguage(); + $tryLanguages = [0 => $language, 1 => $defaultLanguage, 2 => $fallbackLanguage]; + + $newlist = []; + foreach($idpList as $entityid => $data) { + $newlist[$entityid]['entityid'] = $entityid; + foreach ( $tryLanguages as $lang ) { + if ( $name = $this->getEntityDisplayName($data, $lang) ) { + $newlist[$entityid]['name'] = $name; + continue; + } + } + if ( empty($newlist[$entityid]['name']) ) { + $newlist[$entityid]['name'] = $entityid; + } + foreach ( $tryLanguages as $lang ) { + if ( !empty($data['description'][$lang]) ) { + $newlist[$entityid]['description'] = $data['description'][$lang]; + continue; + } + } + if ( !empty($data['icon']) ) { + $newlist[$entityid]['icon'] = $data['icon']; + $newlist[$entityid]['iconurl'] = \SimpleSAML\Utils\HTTP::resolveURL($data['icon']); + } + } + usort($newlist, function($idpentry1, $idpentry2) { + return strcasecmp($idpentry1['name'],$idpentry2['name']); + }); + + $t->data['idplist'] = $newlist; $t->data['preferredidp'] = $preferredIdP; $t->data['return'] = $this->returnURL; $t->data['returnIDParam'] = $this->returnIdParam; @@ -596,4 +630,16 @@ class IdPDisco $t->data['rememberenabled'] = $this->config->getBoolean('idpdisco.enableremember', false); $t->show(); } + + private function getEntityDisplayName(array $idpData, $language) + { + if(isset($idpData['UIInfo']['DisplayName'][$language]) ) { + return $idpData['UIInfo']['DisplayName'][$language]; + } elseif ( isset($idpData['name'][$language]) ) { + return $idpData['name'][$language]; + } elseif ( isset($idpData['OrganizationDisplayName'][$language]) ) { + return $idpData['OrganizationDisplayName'][$language]; + } + return null; + } } diff --git a/lib/SimpleSAML/XHTML/TemplateLoader.php b/lib/SimpleSAML/XHTML/TemplateLoader.php index 7c0ff97e902c4e6e971320c209db5627dbf4d1dc..ffa7e4a96064f63eaddd731344a4bde1a8bb5fe8 100644 --- a/lib/SimpleSAML/XHTML/TemplateLoader.php +++ b/lib/SimpleSAML/XHTML/TemplateLoader.php @@ -16,17 +16,25 @@ class TemplateLoader extends \Twig\Loader\FilesystemLoader * * @inheritdoc */ - protected function findTemplate($name) + protected function findTemplate($name, $throw = true) { - list($namespace, $shortname) = $this->parseName($name); + list($namespace, $shortname) = $this->parseModuleName($name); if (!in_array($namespace, $this->paths, true) && $namespace !== self::MAIN_NAMESPACE) { $this->addPath(self::getModuleTemplateDir($namespace), $namespace); } - return parent::findTemplate($name); + return parent::findTemplate($name, $throw); } - protected function parseName($name, $default = self::MAIN_NAMESPACE) + /** + * Parse the name of a template in a module. + * + * @param string $name The full name of the template, including namespace and template name / path. + * + * @return array An array with the corresponding namespace and name of the template. The namespace defaults to + * \Twig\Loader\FilesystemLoader::MAIN_NAMESPACE, if none was specified in $name. + */ + protected function parseModuleName($name, $default = self::MAIN_NAMESPACE) { if (strpos($name, ':')) { // we have our old SSP format @@ -37,7 +45,7 @@ class TemplateLoader extends \Twig\Loader\FilesystemLoader )); return array($namespace, $shortname); } - return parent::parseName($name, $default); + return [$default, $name]; } @@ -62,4 +70,3 @@ class TemplateLoader extends \Twig\Loader\FilesystemLoader return $templatedir; } } - diff --git a/lib/SimpleSAML/XML/Parser.php b/lib/SimpleSAML/XML/Parser.php index eaf530b643e9e46ebb2ced23471a0d148d1287a5..39287b2cb967edb1f4a0b7839a7860afb52f7cbb 100644 --- a/lib/SimpleSAML/XML/Parser.php +++ b/lib/SimpleSAML/XML/Parser.php @@ -52,8 +52,9 @@ class Parser $result = $this->simplexml->xpath($xpath); if (!is_array($result) || empty($result)) { if ($required) { - throw new \Exception('Could not get value from XML document'. - ' using the following XPath expression: '.$xpath); + throw new \Exception( + 'Could not get value from XML document using the following XPath expression: '.$xpath + ); } else { return null; } @@ -70,8 +71,9 @@ class Parser } } if ($required) { - throw new \Exception('Could not get value from XML document'. - ' using multiple alternative XPath expressions.'); + throw new \Exception( + 'Could not get value from XML document using multiple alternative XPath expressions.' + ); } else { return null; } diff --git a/lib/SimpleSAML/XML/Shib13/AuthnResponse.php b/lib/SimpleSAML/XML/Shib13/AuthnResponse.php index 6c8b7e62ffa3d106ceea865a8b1e0828097d172d..20b1db4b7a01856b6f6484fe5323c78c2259c65d 100644 --- a/lib/SimpleSAML/XML/Shib13/AuthnResponse.php +++ b/lib/SimpleSAML/XML/Shib13/AuthnResponse.php @@ -119,8 +119,9 @@ class AuthnResponse // Validate against CA $this->validator->validateCA(Config::getCertPath($md->getString('caFile'))); } else { - throw new \SimpleSAML\Error\Exception('Missing certificate in Shibboleth 1.3'. - ' IdP Remote metadata for identity provider ['.$issuer.'].'); + throw new \SimpleSAML\Error\Exception( + 'Missing certificate in Shibboleth 1.3 IdP Remote metadata for identity provider ['.$issuer.'].' + ); } return true; @@ -203,7 +204,7 @@ class AuthnResponse public function getAttributes() { $metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler(); - $md = $metadata->getMetadata($this->getIssuer(), 'shib13-idp-remote'); + $md = $metadata->getMetaData($this->getIssuer(), 'shib13-idp-remote'); $base64 = isset($md['base64attributes']) ? $md['base64attributes'] : false; if (!($this->dom instanceof \DOMDocument)) { @@ -362,7 +363,7 @@ class AuthnResponse $encodedattributes .= $subjectNode; foreach ($attributes as $name => $value) { - $encodedattributes .= $this->enc_attribute($name, $value, $base64, $scopedAttributes); + $encodedattributes .= $this->encAttribute($name, $value, $base64, $scopedAttributes); } $encodedattributes .= '</AttributeStatement>'; @@ -409,7 +410,7 @@ class AuthnResponse * @param array $scopedAttributes Array of attributes names which are scoped. * @return string The attribute encoded as an XML-string. */ - private function enc_attribute($name, $values, $base64, $scopedAttributes) + private function encAttribute($name, $values, $base64, $scopedAttributes) { assert(is_string($name)); assert(is_array($values)); diff --git a/lib/SimpleSAML/XML/Signer.php b/lib/SimpleSAML/XML/Signer.php index ae79c8a1d7d7aec99c79abc731d5a1ce37a81de9..3e3c86c09c42d672101cc8ddc1f2941529513d95 100644 --- a/lib/SimpleSAML/XML/Signer.php +++ b/lib/SimpleSAML/XML/Signer.php @@ -84,7 +84,7 @@ class Signer } if (array_key_exists('id', $options)) { - $this->setIdAttribute($options['id']); + $this->setIDAttribute($options['id']); } } diff --git a/modules/adfs/lib/IdP/ADFS.php b/modules/adfs/lib/IdP/ADFS.php index 8187aff89c12ad28206e9d0a22f1cba0e49e66c5..6a09ff988a0a918e0d554c84db3eafde49438873 100644 --- a/modules/adfs/lib/IdP/ADFS.php +++ b/modules/adfs/lib/IdP/ADFS.php @@ -36,7 +36,7 @@ class ADFS $state['adfs:wreply'] = \SimpleSAML\Utils\HTTP::checkURLAllowed($query['wreply']); } - $idp->handleAuthenticationRequest($state); + $idp->handleAuthenticationRequest($state); } private static function generateResponse($issuer, $target, $nameid, $attributes, $assertionLifetime) @@ -73,7 +73,10 @@ MSG; continue; } - list($namespace, $name) = \SimpleSAML\Utils\Attributes::getAttributeNamespace($name, 'http://schemas.xmlsoap.org/claims'); + list($namespace, $name) = \SimpleSAML\Utils\Attributes::getAttributeNamespace( + $name, + 'http://schemas.xmlsoap.org/claims' + ); foreach ($values as $value) { if ((!isset($value)) || ($value === '')) { continue; @@ -85,7 +88,6 @@ MSG; <saml:AttributeValue>$value</saml:AttributeValue> </saml:Attribute> MSG; - } } @@ -107,12 +109,13 @@ MSG; private static function signResponse($response, $key, $cert, $algo) { $objXMLSecDSig = new XMLSecurityDSig(); - $objXMLSecDSig->idKeys = array('AssertionID'); - $objXMLSecDSig->setCanonicalMethod(XMLSecurityDSig::EXC_C14N); + $objXMLSecDSig->idKeys = array('AssertionID'); + $objXMLSecDSig->setCanonicalMethod(XMLSecurityDSig::EXC_C14N); $responsedom = \SAML2\DOMDocumentFactory::fromString(str_replace("\r", "", $response)); $firstassertionroot = $responsedom->getElementsByTagName('Assertion')->item(0); $objXMLSecDSig->addReferenceList( - array($firstassertionroot), XMLSecurityDSig::SHA256, + array($firstassertionroot), + XMLSecurityDSig::SHA256, array('http://www.w3.org/2000/09/xmldsig#enveloped-signature', XMLSecurityDSig::EXC_C14N), array('id_name' => 'AssertionID') ); @@ -125,37 +128,29 @@ MSG; $objXMLSecDSig->add509Cert($public_cert, true); } $newSig = $responsedom->importNode($objXMLSecDSig->sigNode, true); - $firstassertionroot->appendChild($newSig); + $firstassertionroot->appendChild($newSig); return $responsedom->saveXML(); } private static function postResponse($url, $wresult, $wctx) { - $wresult = htmlspecialchars($wresult); - $wctx = htmlspecialchars($wctx); - - $post = <<<MSG - <body onload="document.forms[0].submit()"> - <form method="post" action="$url"> - <input type="hidden" name="wa" value="wsignin1.0"> - <input type="hidden" name="wresult" value="$wresult"> - <input type="hidden" name="wctx" value="$wctx"> - <noscript> - <input type="submit" value="Continue"> - </noscript> - </form> - </body> -MSG; - - echo $post; - exit; + $config = \SimpleSAML\Configuration::getInstance(); + $t = new \SimpleSAML\XHTML\Template($config, 'adfs:postResponse.twig'); + $t->data['baseurlpath'] = \SimpleSAML\Module::getModuleURL('adfs'); + $t->data['url'] = $url; + $t->data['wresult'] = $wresult; + $t->data['wctx'] = $wctx; + $t->show(); } public static function sendResponse(array $state) { $spMetadata = $state["SPMetadata"]; $spEntityId = $spMetadata['entityid']; - $spMetadata = \SimpleSAML\Configuration::loadFromArray($spMetadata, '$metadata['.var_export($spEntityId, true).']'); + $spMetadata = \SimpleSAML\Configuration::loadFromArray( + $spMetadata, + '$metadata['.var_export($spEntityId, true).']' + ); $attributes = $state['Attributes']; @@ -169,7 +164,7 @@ MSG; $nameid = \SimpleSAML\Utils\Random::generateID(); } - $idp = \SimpleSAML\IdP::getByState($state); + $idp = \SimpleSAML\IdP::getByState($state); $idpMetadata = $idp->getConfig(); $idpEntityId = $idpMetadata->getString('entityid'); @@ -204,7 +199,9 @@ MSG; { // NB:: we don't know from which SP the logout request came from $idpMetadata = $idp->getConfig(); - \SimpleSAML\Utils\HTTP::redirectTrustedURL($idpMetadata->getValue('redirect-after-logout', \SimpleSAML\Utils\HTTP::getBaseURL())); + \SimpleSAML\Utils\HTTP::redirectTrustedURL( + $idpMetadata->getValue('redirect-after-logout', \SimpleSAML\Utils\HTTP::getBaseURL()) + ); } public static function receiveLogoutMessage(\SimpleSAML\IdP $idp) @@ -220,7 +217,7 @@ MSG; 'Responder' => array('\SimpleSAML\Module\adfs\IdP\ADFS', 'sendLogoutResponse'), ); $assocId = null; - // TODO: verify that this is really no problem for: + // TODO: verify that this is really no problem for: // a) SSP, because there's no caller SP. // b) ADFS SP because caller will be called back.. $idp->handleLogoutRequest($state, $assocId); @@ -231,7 +228,9 @@ MSG; { $metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler(); $spMetadata = $metadata->getMetaDataConfig($association['adfs:entityID'], 'adfs-sp-remote'); - $returnTo = \SimpleSAML\Module::getModuleURL('adfs/idp/prp.php?assocId='.urlencode($association["id"]).'&relayState='.urlencode($relayState)); + $returnTo = \SimpleSAML\Module::getModuleURL( + 'adfs/idp/prp.php?assocId='.urlencode($association["id"]).'&relayState='.urlencode($relayState) + ); return $spMetadata->getValue('prp').'?wa=wsignoutcleanup1.0&wreply='.urlencode($returnTo); } } diff --git a/modules/adfs/templates/postResponse.twig b/modules/adfs/templates/postResponse.twig new file mode 100644 index 0000000000000000000000000000000000000000..857aa8d7ab6fcd28e21630ea84031a22452840a4 --- /dev/null +++ b/modules/adfs/templates/postResponse.twig @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> + <head> + <script src="{{ baseurlpath }}/assets/js/postResponse.js"></script> + </head> + <body> + <form method="post" action="{{ url }}"> + <input type="hidden" name="wa" value="wsignin1.0"> + <input type="hidden" name="wresult" value="{{ wresult|escape('html') }}"> + <input type="hidden" name="wctx" value="{{ wctx|escape('html') }}"> + <noscript> + <input type="submit" value="Continue"> + </noscript> + </form> + </body> +</html> diff --git a/modules/adfs/www/assets/js/postReponse.js b/modules/adfs/www/assets/js/postReponse.js new file mode 100644 index 0000000000000000000000000000000000000000..a813b92cbec83b7ac265163431ac1f0d7d5f00e3 --- /dev/null +++ b/modules/adfs/www/assets/js/postReponse.js @@ -0,0 +1,3 @@ +document.addEventListener('DOMContentLoaded', function () { + document.forms[0].submit(); +}); diff --git a/modules/adfs/www/idp/metadata.php b/modules/adfs/www/idp/metadata.php index 652da7e2f8eb6efaa36ba3c405203e6f7c52b0d5..b7a0f972193892a4969d133f989c2ca769bb63b1 100644 --- a/modules/adfs/www/idp/metadata.php +++ b/modules/adfs/www/idp/metadata.php @@ -150,8 +150,14 @@ try { $certdata = array(); foreach (array_keys($availableCerts) as $availableCert) { $certdata[$availableCert]['name'] = $availableCert; - $certdata[$availableCert]['url'] = \SimpleSAML\Module::getModuleURL('saml/idp/certs.php').'/'.$availableCert; - $certdata[$availableCert]['comment'] = ($availableCerts[$availableCert]['certFingerprint'][0] === 'afe71c28ef740bc87425be13a2263d37971da1f9' ? 'This is the default certificate. Generate a new certificate if this is a production system.' : ''); + $certdata[$availableCert]['url'] = \SimpleSAML\Module::getModuleURL('saml/idp/certs.php'). + '/'.$availableCert; + + $certdata[$availableCert]['comment'] = ''; + if ($availableCerts[$availableCert]['certFingerprint'][0] === 'afe71c28ef740bc87425be13a2263d37971da1f9') { + $certdata[$availableCert]['comment'] = 'This is the default certificate.'. + ' Generate a new certificate if this is a production system.'; + } } $t->data['certdata'] = $certdata; $t->data['header'] = 'adfs-idp'; // TODO: Replace with headerString in 2.0 diff --git a/modules/adfs/www/idp/prp.php b/modules/adfs/www/idp/prp.php index da86ec88fcb96ef79effa02e3df81cca93d0ed97..03a973b11656b4d2a020e79d0a4834c9ab8a265d 100644 --- a/modules/adfs/www/idp/prp.php +++ b/modules/adfs/www/idp/prp.php @@ -16,7 +16,7 @@ $idp = \SimpleSAML\IdP::getById('adfs:'.$idpEntityId); if (isset($_GET['wa'])) { if ($_GET['wa'] === 'wsignout1.0') { \SimpleSAML\Module\adfs\IdP\ADFS::receiveLogoutMessage($idp); - } else if ($_GET['wa'] === 'wsignin1.0') { + } elseif ($_GET['wa'] === 'wsignin1.0') { \SimpleSAML\Module\adfs\IdP\ADFS::receiveAuthnRequest($idp); } assert(false); diff --git a/modules/authX509/lib/Auth/Process/ExpiryWarning.php b/modules/authX509/lib/Auth/Process/ExpiryWarning.php index a5286c7bfd0e60663e9d1e1c4e8661e85b89cea5..6943e6dfd09a923626286f8c61cc9cd19b6ff2a4 100644 --- a/modules/authX509/lib/Auth/Process/ExpiryWarning.php +++ b/modules/authX509/lib/Auth/Process/ExpiryWarning.php @@ -95,5 +95,4 @@ class ExpiryWarning extends \SimpleSAML\Auth\ProcessingFilter $url = \SimpleSAML\Module::getModuleURL('authX509/expirywarning.php'); \SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id)); } - } diff --git a/modules/authX509/templates/X509error.php b/modules/authX509/templates/X509error.php index 3eb08fd13ff8d353ad6a41c4a9ada97f9ddb7c47..b7f8d42802a9a48e5923fd52e0d577909e409dd2 100644 --- a/modules/authX509/templates/X509error.php +++ b/modules/authX509/templates/X509error.php @@ -3,27 +3,24 @@ $this->data['header'] = $this->t('{authX509:X509error:certificate_header}'); $this->includeAtTemplateBase('includes/header.php'); -?> - -<?php if ($this->data['errorcode'] !== null) { ?> - <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5"> - <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px" alt="" /> - <h2><?php echo $this->t('{login:error_header}'); ?></h2> - <p><b><?php echo $this->t($this->data['errorcodes']['title'][$this->data['errorcode']]); ?></b></p> - <p><?php echo $this->t($this->data['errorcodes']['descr'][$this->data['errorcode']]); ?></p> - </div> + <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5"> + <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px" alt="" /> + <h2><?php echo $this->t('{login:error_header}'); ?></h2> + <p><b><?php echo $this->t($this->data['errorcodes']['title'][$this->data['errorcode']]); ?></b></p> + <p><?php echo $this->t($this->data['errorcodes']['descr'][$this->data['errorcode']]); ?></p> + </div> <?php } ?> - <h2 style="break: both"><?php echo $this->t('{authX509:X509error:certificate_header}'); ?></h2> + <h2 style="break: both"><?php echo $this->t('{authX509:X509error:certificate_header}'); ?></h2> - <p><?php echo $this->t('{authX509:X509error:certificate_text}'); ?></p> + <p><?php echo $this->t('{authX509:X509error:certificate_text}'); ?></p> - <a href="<?php echo htmlspecialchars(\SimpleSAML\Utils\HTTP::getSelfURL()); ?>"> - <?php echo $this->t('{login:login_button}'); ?> - </a> + <a href="<?php echo htmlspecialchars(\SimpleSAML\Utils\HTTP::getSelfURL()); ?>"> + <?php echo $this->t('{login:login_button}'); ?> + </a> <?php if (!empty($this->data['links'])) { diff --git a/modules/authX509/templates/X509error.twig b/modules/authX509/templates/X509error.twig index c350ea53f1692b86911f6b9fa5a9ea3da0f5257a..becaebdb722c7d0067293661a350520a77df917a 100644 --- a/modules/authX509/templates/X509error.twig +++ b/modules/authX509/templates/X509error.twig @@ -4,8 +4,8 @@ {% if errorcode -%} <h2>{% trans 'Error' %}</h2> - <h3>{% trans errortitle %}</h3> - <p>{% trans errordescr %}</p> +<h3>{% trans errortitle %}</h3> +<p>{% trans errordescr %}</p> {% endif -%} <h2>{% trans 'X509 certificate authentication' %}</h2> diff --git a/modules/authX509/templates/X509warning.php b/modules/authX509/templates/X509warning.php index dfe69cbbec7e3aa9af856eb03dccfa950eb3e0c1..a3daa806463d6449fd76aa888f2f7d7d095746e4 100644 --- a/modules/authX509/templates/X509warning.php +++ b/modules/authX509/templates/X509warning.php @@ -32,10 +32,10 @@ $this->includeAtTemplateBase('includes/header.php'); <form style="display: inline; margin: 0px; padding: 0px" action="<?php echo htmlspecialchars($this->data['target']); ?>"> <?php - // Embed hidden fields... - foreach ($this->data['data'] as $name => $value) { - echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'; - } + // Embed hidden fields... + foreach ($this->data['data'] as $name => $value) { + echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'; + } ?> <p><?php echo $warning; ?></p> diff --git a/modules/authX509/templates/X509warning.twig b/modules/authX509/templates/X509warning.twig index 59a65f64f0f30f533aaaa64864fcc6d4047cfcaa..b75f7c370fd773ef4c52aa0a26114e7f5cb8893d 100644 --- a/modules/authX509/templates/X509warning.twig +++ b/modules/authX509/templates/X509warning.twig @@ -1,5 +1,3 @@ -{% set autofocus = 'proceedbutton' %} - {% extends "base.twig" %} {% block content %} @@ -8,7 +6,7 @@ <form action="{{ target | escape }}"> {% for name, value in data -%} - <input type="hidden" name="{{ name }}" value="{{ value }}" /> + <input type="hidden" name="{{ name }}" value="{{ value }}"> {%- endfor %} <p>{% trans %}Your certificate will expire in {{ daysleft }} days.{% endtrans %}</p> @@ -19,7 +17,7 @@ <p>{% trans 'Please renew your certificate in time.' %}</p> {% endif -%} - <p><input type="submit" name="proceed" id="proceedbutton" value="{% trans 'Proceed' %}" /></p> + <p><input type="submit" name="proceed" id="proceedbutton" value="{% trans 'Proceed' %}" autofocus></p> </form> diff --git a/modules/authYubiKey/lib/Auth/Process/OTP2YubiPrefix.php b/modules/authYubiKey/lib/Auth/Process/OTP2YubiPrefix.php index 3a1c3175b126ffe392245a4105c16a12d7b0699d..98391a72e1f168fa09f38d69de22709908a7db30 100644 --- a/modules/authYubiKey/lib/Auth/Process/OTP2YubiPrefix.php +++ b/modules/authYubiKey/lib/Auth/Process/OTP2YubiPrefix.php @@ -37,7 +37,7 @@ namespace SimpleSAML\Module\authYubiKey\Auth\Process; * * You use it by adding it as an authentication filter in config.php: * - * 'authproc.idp' => array( + * 'authproc.idp' => array( * ... * 90 => 'authYubiKey:OTP2YubiPrefix', * ... @@ -69,7 +69,9 @@ class OTP2YubiPrefix extends \SimpleSAML\Auth\ProcessingFilter $attributes['yubiPrefix'] = array($identity); - \SimpleSAML\Logger::info('OTP2YubiPrefix: otp: '.$otp.' identity: '.$identity.' (otp keys: '.implode(',', array_keys($otps)).')'); + \SimpleSAML\Logger::info( + 'OTP2YubiPrefix: otp: '.$otp.' identity: '.$identity.' (otp keys: '.implode(',', array_keys($otps)).')' + ); unset($attributes['otp']); diff --git a/modules/authYubiKey/lib/Auth/Source/YubiKey.php b/modules/authYubiKey/lib/Auth/Source/YubiKey.php index b4377847369e6f3c06b3c9711f631b935b5f7919..23ace3a39744a0d8f3890c69c250038d6637774a 100644 --- a/modules/authYubiKey/lib/Auth/Source/YubiKey.php +++ b/modules/authYubiKey/lib/Auth/Source/YubiKey.php @@ -27,14 +27,14 @@ namespace SimpleSAML\Module\authYubiKey\Auth\Source; /** * YubiKey authentication module, see http://www.yubico.com/developers/intro/ - * * + * * Configure it by adding an entry to config/authsources.php such as this: * - * 'yubikey' => array( - * 'authYubiKey:YubiKey', - * 'id' => 997, - * 'key' => 'b64hmackey', - * ), + * 'yubikey' => array( + * 'authYubiKey:YubiKey', + * 'id' => 997, + * 'key' => 'b64hmackey', + * ), * * To generate your own client id/key you will need one YubiKey, and then * go to http://yubico.com/developers/api/ @@ -193,11 +193,15 @@ class YubiKey extends \SimpleSAML\Auth\Source $uid = self::getYubiKeyPrefix($otp); $attributes = array('uid' => array($uid)); } catch (\Exception $e) { - \SimpleSAML\Logger::info('YubiKey:'.$this->authId.': Validation error (otp '.$otp.'), debug output: '.$yubi->getLastResponse()); + \SimpleSAML\Logger::info( + 'YubiKey:'.$this->authId.': Validation error (otp '.$otp.'), debug output: '.$yubi->getLastResponse() + ); throw new \SimpleSAML\Error\Error('WRONGUSERPASS', $e); } - \SimpleSAML\Logger::info('YubiKey:'.$this->authId.': YubiKey otp '.$otp.' validated successfully: '.$yubi->getLastResponse()); + \SimpleSAML\Logger::info( + 'YubiKey:'.$this->authId.': YubiKey otp '.$otp.' validated successfully: '.$yubi->getLastResponse() + ); return $attributes; } } diff --git a/modules/authYubiKey/libextinc/Yubico.php b/modules/authYubiKey/libextinc/Yubico.php index 12d2d8b4de0d167ecc5c584d07ea5029391930c3..e9af3632295130e6e4b23a9b2a496e354868ed61 100644 --- a/modules/authYubiKey/libextinc/Yubico.php +++ b/modules/authYubiKey/libextinc/Yubico.php @@ -66,19 +66,19 @@ class Auth_Yubico * Yubico client ID * @var string */ - private $_id; + private $id; /** * Yubico client key * @var string */ - private $_key; + private $key; /** * Response from server * @var string */ - private $_response; + private $response; /** * Constructor @@ -90,19 +90,19 @@ class Auth_Yubico */ public function __construct($id, $key = '') { - $this->_id = $id; - $this->_key = base64_decode($key); + $this->id = $id; + $this->key = base64_decode($key); } /** * Return the last data received from the server, if any. * - * @return string Output from server. + * @return string Output from server. * @access public */ public function getLastResponse() { - return $this->_response; + return $this->response; } // TODO? Add functions to get parsed parts of server response? @@ -116,10 +116,10 @@ class Auth_Yubico */ public function verify($token) { - $parameters = "id=".$this->_id."&otp=".$token; + $parameters = "id=".$this->id."&otp=".$token; // Generate signature - if ($this->_key <> "") { - $signature = base64_encode(hash_hmac('sha1', $parameters, $this->_key, true)); + if ($this->key <> "") { + $signature = base64_encode(hash_hmac('sha1', $parameters, $this->key, true)); $parameters .= '&h='.$signature; } // Support https @@ -134,7 +134,7 @@ class Auth_Yubico $status = $out[1]; // Verify signature - if ($this->_key <> "") { + if ($this->key <> "") { $rows = explode("\r\n", $responseMsg); $response = array(); foreach ($rows as $val) { @@ -145,7 +145,7 @@ class Auth_Yubico } $check = 'status='.$response['status'].'&t='.$response['t']; - $checksignature = base64_encode(hash_hmac('sha1', $check, $this->_key, true)); + $checksignature = base64_encode(hash_hmac('sha1', $check, $this->key, true)); if ($response['h'] != $checksignature) { throw new Exception('Checked Signature failed'); diff --git a/modules/authYubiKey/templates/yubikeylogin.php b/modules/authYubiKey/templates/yubikeylogin.php index 104941b7976fab1f01367f935c0546d97b797643..693e4c374c60eda7fa69608daef796e1a0f19927 100644 --- a/modules/authYubiKey/templates/yubikeylogin.php +++ b/modules/authYubiKey/templates/yubikeylogin.php @@ -2,44 +2,34 @@ $this->includeAtTemplateBase('includes/header.php'); -?> - -<?php if ($this->data['errorCode'] !== null) { ?> - <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5"> - <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px" alt="" /> - <h2><?php echo $this->t('{login:error_header}'); ?></h2> - <p><b><?php echo $this->t($this->data['errorcodes']['title'][$this->data['errorcode']]); ?></b></p> - <p><?php echo $this->t($this->data['errorcodes']['descr'][$this->data['errorcode']]); ?></p> - </div> + <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5"> + <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px" alt="" /> + <h2><?php echo $this->t('{login:error_header}'); ?></h2> + <p><b><?php echo $this->t($this->data['errorcodes']['title'][$this->data['errorcode']]); ?></b></p> + <p><?php echo $this->t($this->data['errorcodes']['descr'][$this->data['errorcode']]); ?></p> + </div> <?php } ?> + <img style="float: right" src="<?php echo($this->data['logoUrl']); ?>" alt="" /> + <img style="clear: right; float: right" src="<?php echo($this->data['devicepicUrl']); ?>" alt="YubiKey" /> - <img style="float: right" src="<?php echo($this->data['logoUrl']); ?>" alt="" /> - <img style="clear: right; float: right" src="<?php echo($this->data['devicepicUrl']); ?>" alt="YubiKey" /> - - - <h2 style=""><?php echo $this->data['header']; ?></h2> - - <form action="?" method="post" name="f"> - - <p><?php echo $this->t('{authYubiKey:yubikey:intro}'); ?></p> - - <p><input id="otp" style="border: 1px solid #ccc; background: #eee; padding: .5em; font-size: medium; width: 70%; color: #aaa" type="text" tabindex="2" name="otp" /></p> + <h2 style=""><?php echo $this->data['header']; ?></h2> + <form action="?" method="post" name="f"> + <p><?php echo $this->t('{authYubiKey:yubikey:intro}'); ?></p> + <p><input id="otp" style="border: 1px solid #ccc; background: #eee; padding: .5em; font-size: medium; width: 70%; color: #aaa" type="text" tabindex="2" name="otp" /></p> <?php foreach ($this->data['stateParams'] as $name => $value) { echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'; } ?> - - </form> - + </form> <?php $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/authYubiKey/templates/yubikeylogin.twig b/modules/authYubiKey/templates/yubikeylogin.twig index 8c01c4cddc2ccf7dbd140827b25c881ea55713bc..e01432c0103afe8eb9b5ab9e94de38f97e366f51 100644 --- a/modules/authYubiKey/templates/yubikeylogin.twig +++ b/modules/authYubiKey/templates/yubikeylogin.twig @@ -2,7 +2,7 @@ {% extends "base.twig" %} {% block preload %} - <link rel="stylesheet" type="text/css" href="{{ baseurlpath }}assets/css/yubikey.css" /> + <link rel="stylesheet" type="text/css" href="{{ baseurlpath }}assets/css/yubikey.css"> {% endblock %} {% block postload %} @@ -19,15 +19,15 @@ </div> {% endif %} - <img style="float: right" src="{{ logoUrl }}" alt="" /> - <img style="clear: right; float: right" src="{{ devicepicUrl }}" alt="YubiKey" /> + <img style="float: right" src="{{ logoUrl }}" alt=""> + <img style="clear: right; float: right" src="{{ devicepicUrl }}" alt="YubiKey"> <h2>{{ '{authYubiKey:yubikey:header}'|trans }}</h2> <form action="?" method="post" name="f"> <p>{{ '{authYubiKey:yubikey:intro}'|trans }}</p> - <p><input id="otp" type="text" tabindex="2" name="otp" /></p> + <p><input id="otp" type="text" tabindex="2" name="otp" autofocus></p> {% for key, value in stateParams %} - <input type="hidden" name="{{ key|escape('html') }}" value="{{ value|escape('html') }}"/> + <input type="hidden" name="{{ key|escape('html') }}" value="{{ value|escape('html') }}"> {% endfor %} </form> {% endblock %} diff --git a/modules/authfacebook/extlibinc/base_facebook.php b/modules/authfacebook/extlibinc/base_facebook.php index 09e2c2a10b714de4abeb3a60e03dcf16be318861..1df472e45feed38bf979a838aa6deaf5b2ff7850 100644 --- a/modules/authfacebook/extlibinc/base_facebook.php +++ b/modules/authfacebook/extlibinc/base_facebook.php @@ -48,10 +48,10 @@ class FacebookApiException extends Exception if (isset($result['error_description'])) { // OAuth 2.0 Draft 10 style $msg = $result['error_description']; - } else if (isset($result['error']) && is_array($result['error'])) { + } elseif (isset($result['error']) && is_array($result['error'])) { // OAuth 2.0 Draft 00 style $msg = $result['error']['message']; - } else if (isset($result['error_msg'])) { + } elseif (isset($result['error_msg'])) { // Rest server style $msg = $result['error_msg']; } else { @@ -84,7 +84,7 @@ class FacebookApiException extends Exception if (is_string($error)) { // OAuth 2.0 Draft 10 style return $error; - } else if (is_array($error)) { + } elseif (is_array($error)) { // OAuth 2.0 Draft 00 style if (isset($error['type'])) { return $error['type']; @@ -359,7 +359,7 @@ abstract class BaseFacebook // need to circumvent json_decode by calling _oauthRequest // directly, since response isn't JSON format $access_token_response = $this->_oauthRequest( - $this->getUrl('graph', '/oauth/access_token'), + $this->getUrl('graph', '/oauth/access_token'), $params = array( 'client_id' => $this->getAppId(), 'client_secret' => $this->getAppSecret(), @@ -387,7 +387,8 @@ abstract class BaseFacebook $this->destroySession(); $this->setPersistentData( - 'access_token', $response_params['access_token'] + 'access_token', + $response_params['access_token'] ); } @@ -498,10 +499,12 @@ abstract class BaseFacebook if (!$this->signedRequest) { if (!empty($_REQUEST['signed_request'])) { $this->signedRequest = $this->parseSignedRequest( - $_REQUEST['signed_request']); - } else if (!empty($_COOKIE[$this->getSignedRequestCookieName()])) { + $_REQUEST['signed_request'] + ); + } elseif (!empty($_COOKIE[$this->getSignedRequestCookieName()])) { $this->signedRequest = $this->parseSignedRequest( - $_COOKIE[$this->getSignedRequestCookieName()]); + $_COOKIE[$this->getSignedRequestCookieName()] + ); } } return $this->signedRequest; @@ -600,11 +603,15 @@ abstract class BaseFacebook return $this->getUrl( 'www', 'dialog/oauth', - array_merge(array( + array_merge( + array( 'client_id' => $this->getAppId(), 'redirect_uri' => $currentUrl, // possibly overwritten - 'state' => $this->state), - $params)); + 'state' => $this->state + ), + $params + ) + ); } /** @@ -708,8 +715,8 @@ abstract class BaseFacebook if (isset($_REQUEST['code'])) { if ($this->state !== null && isset($_REQUEST['state']) && - $this->state === $_REQUEST['state']) { - + $this->state === $_REQUEST['state'] + ) { // CSRF state has done its job, so clear it $this->state = null; $this->clearPersistentData('state'); @@ -797,10 +804,13 @@ abstract class BaseFacebook $access_token_response = $this->_oauthRequest( $this->getUrl('graph', '/oauth/access_token'), - $params = array('client_id' => $this->getAppId(), - 'client_secret' => $this->getAppSecret(), - 'redirect_uri' => $redirect_uri, - 'code' => $code)); + $params = array( + 'client_id' => $this->getAppId(), + 'client_secret' => $this->getAppSecret(), + 'redirect_uri' => $redirect_uri, + 'code' => $code + ) + ); } catch (FacebookApiException $e) { self::errorLog($e->getMessage()); // most likely that user very recently revoked authorization. @@ -809,13 +819,13 @@ abstract class BaseFacebook } if (empty($access_token_response)) { - self::errorlog('No access token response'); + self::errorLog('No access token response'); return false; } $response_params = json_decode($access_token_response, true); if (!isset($response_params['access_token'])) { - self::errorlog('No access token in response. ' . $access_token_response); + self::errorLog('No access token in response. ' . $access_token_response); return false; } @@ -1036,8 +1046,7 @@ abstract class BaseFacebook } // check sig - $expected_sig = hash_hmac('sha256', $payload, - $this->getAppSecret(), $raw = true); + $expected_sig = hash_hmac('sha256', $payload, $this->getAppSecret(), $raw = true); if ($sig !== $expected_sig) { self::errorLog('Bad Signed JSON signature!'); return null; @@ -1056,7 +1065,8 @@ abstract class BaseFacebook { if (!is_array($data)) { throw new InvalidArgumentException( - 'makeSignedRequest expects an array. Got: '.print_r($data, true)); + 'makeSignedRequest expects an array. Got: '.print_r($data, true) + ); } $data['algorithm'] = self::SIGNED_REQUEST_ALGORITHM; $data['issued_at'] = time(); @@ -1141,7 +1151,7 @@ abstract class BaseFacebook $name = 'api'; if (isset($READ_ONLY_CALLS[strtolower($method)])) { $name = 'api_read'; - } else if (strtolower($method) == 'video.upload') { + } elseif (strtolower($method) == 'video.upload') { $name = 'api_video'; } return $this->getUrl($name, 'restserver.php'); diff --git a/modules/authfacebook/lib/Auth/Source/Facebook.php b/modules/authfacebook/lib/Auth/Source/Facebook.php index 40d5438561501e9f3004ef64c2f95b107dd683d2..86d592458fefbf298dbb65193bb504c667f68e91 100644 --- a/modules/authfacebook/lib/Auth/Source/Facebook.php +++ b/modules/authfacebook/lib/Auth/Source/Facebook.php @@ -72,8 +72,11 @@ class Facebook extends \SimpleSAML\Auth\Source // Call the parent constructor first, as required by the interface parent::__construct($info, $config); - $cfgParse = \SimpleSAML\Configuration::loadFromArray($config, 'authsources['.var_export($this->authId, true).']'); - + $cfgParse = \SimpleSAML\Configuration::loadFromArray( + $config, + 'authsources['.var_export($this->authId, true).']' + ); + $this->api_key = $cfgParse->getString('api_key'); $this->secret = $cfgParse->getString('secret'); $this->req_perms = $cfgParse->getString('req_perms', null); @@ -93,8 +96,11 @@ class Facebook extends \SimpleSAML\Auth\Source // We are going to need the authId in order to retrieve this authentication source later $state[self::AUTHID] = $this->authId; \SimpleSAML\Auth\State::saveState($state, self::STAGE_INIT); - - $facebook = new Module\authfacebook\Facebook(array('appId' => $this->api_key, 'secret' => $this->secret), $state); + + $facebook = new Module\authfacebook\Facebook( + array('appId' => $this->api_key, 'secret' => $this->secret), + $state + ); $facebook->destroySession(); $linkback = Module::getModuleURL('authfacebook/linkback.php'); @@ -103,13 +109,16 @@ class Facebook extends \SimpleSAML\Auth\Source \SimpleSAML\Utils\HTTP::redirectTrustedURL($url); } - + public function finalStep(&$state) { assert(is_array($state)); - $facebook = new Module\authfacebook\Facebook(array('appId' => $this->api_key, 'secret' => $this->secret), $state); + $facebook = new Module\authfacebook\Facebook( + array('appId' => $this->api_key, 'secret' => $this->secret), + $state + ); $uid = $facebook->getUser(); if (isset($uid) && $uid) { @@ -123,7 +132,7 @@ class Facebook extends \SimpleSAML\Auth\Source if (!isset($info)) { throw new \SimpleSAML\Error\AuthSource($this->authId, 'Error getting user profile.'); } - + $attributes = array(); foreach ($info as $key => $value) { if (is_string($value) && !empty($value)) { @@ -143,7 +152,7 @@ class Facebook extends \SimpleSAML\Auth\Source \SimpleSAML\Logger::debug('Facebook Returned Attributes: '.implode(", ", array_keys($attributes))); $state['Attributes'] = $attributes; - + $facebook->destroySession(); } } diff --git a/modules/authfacebook/www/linkback.php b/modules/authfacebook/www/linkback.php index 904b33ba26f1e7a56dd64524e4841105f03cc46f..6a24590194e4ec6a3e390386b5f937853fec4e86 100644 --- a/modules/authfacebook/www/linkback.php +++ b/modules/authfacebook/www/linkback.php @@ -6,22 +6,32 @@ // For backwards compatability look for AuthState first if (array_key_exists('AuthState', $_REQUEST) && !empty($_REQUEST['AuthState'])) { - $state = \SimpleSAML\Auth\State::loadState($_REQUEST['AuthState'], \SimpleSAML\Module\authfacebook\Auth\Source\Facebook::STAGE_INIT); + $state = \SimpleSAML\Auth\State::loadState( + $_REQUEST['AuthState'], + \SimpleSAML\Module\authfacebook\Auth\Source\Facebook::STAGE_INIT + ); } elseif (array_key_exists('state', $_REQUEST) && !empty($_REQUEST['state'])) { - $state = \SimpleSAML\Auth\State::loadState($_REQUEST['state'], \SimpleSAML\Module\authfacebook\Auth\Source\Facebook::STAGE_INIT); + $state = \SimpleSAML\Auth\State::loadState( + $_REQUEST['state'], + \SimpleSAML\Module\authfacebook\Auth\Source\Facebook::STAGE_INIT + ); } else { throw new \SimpleSAML\Error\BadRequest('Missing state parameter on facebook linkback endpoint.'); } // Find authentication source if (!array_key_exists(\SimpleSAML\Module\authfacebook\Auth\Source\Facebook::AUTHID, $state)) { - throw new \SimpleSAML\Error\BadRequest('No data in state for '.\SimpleSAML\Module\authfacebook\Auth\Source\Facebook::AUTHID); + throw new \SimpleSAML\Error\BadRequest( + 'No data in state for '.\SimpleSAML\Module\authfacebook\Auth\Source\Facebook::AUTHID + ); } $sourceId = $state[\SimpleSAML\Module\authfacebook\Auth\Source\Facebook::AUTHID]; $source = \SimpleSAML\Auth\Source::getById($sourceId); if ($source === null) { - throw new \SimpleSAML\Error\BadRequest('Could not find authentication source with id '.var_export($sourceId, true)); + throw new \SimpleSAML\Error\BadRequest( + 'Could not find authentication source with id '.var_export($sourceId, true) + ); } try { @@ -33,7 +43,10 @@ try { } catch (\SimpleSAML\Error\Exception $e) { \SimpleSAML\Auth\State::throwException($state, $e); } catch (\Exception $e) { - \SimpleSAML\Auth\State::throwException($state, new \SimpleSAML\Error\AuthSource($sourceId, 'Error on facebook linkback endpoint.', $e)); + \SimpleSAML\Auth\State::throwException( + $state, + new \SimpleSAML\Error\AuthSource($sourceId, 'Error on facebook linkback endpoint.', $e) + ); } \SimpleSAML\Auth\Source::completeAuth($state); diff --git a/modules/authlinkedin/lib/Auth/Source/LinkedIn.php b/modules/authlinkedin/lib/Auth/Source/LinkedIn.php index 91b0003de744fdbe37a2d81683ae4ac836494afe..215d7c3423a32d8cbe9ebba433ceee8db9c70c57 100644 --- a/modules/authlinkedin/lib/Auth/Source/LinkedIn.php +++ b/modules/authlinkedin/lib/Auth/Source/LinkedIn.php @@ -84,7 +84,9 @@ class LinkedIn extends \SimpleSAML\Auth\Source // Get the request token $requestToken = $consumer->getRequestToken( 'https://api.linkedin.com/uas/oauth/requestToken', - array('oauth_callback' => \SimpleSAML\Module::getModuleUrl('authlinkedin').'/linkback.php?stateid='.$stateID) + array( + 'oauth_callback' => \SimpleSAML\Module::getModuleURL('authlinkedin').'/linkback.php?stateid='.$stateID + ) ); \SimpleSAML\Logger::debug( @@ -115,7 +117,8 @@ class LinkedIn extends \SimpleSAML\Auth\Source // Replace the request token with an access token (via GET method) $accessToken = $consumer->getAccessToken( - 'https://api.linkedin.com/uas/oauth/accessToken', $requestToken, + 'https://api.linkedin.com/uas/oauth/accessToken', + $requestToken, array('oauth_verifier' => $state['authlinkedin:oauth_verifier']) ); @@ -126,7 +129,7 @@ class LinkedIn extends \SimpleSAML\Auth\Source $userdata = $consumer->getUserInfo( 'https://api.linkedin.com/v1/people/~:('.$this->attributes.')', - $accessToken, + $accessToken, array('http' => array('header' => 'x-li-format: json')) ); diff --git a/modules/authlinkedin/www/linkback.php b/modules/authlinkedin/www/linkback.php index bc2abdca47e5872c428442b91a679948035497f4..157525ab29b505ada5462f70bd368fb4b74495c8 100644 --- a/modules/authlinkedin/www/linkback.php +++ b/modules/authlinkedin/www/linkback.php @@ -7,7 +7,10 @@ if (!array_key_exists('stateid', $_REQUEST)) { throw new \Exception('Lost OAuth Client State'); } -$state = \SimpleSAML\Auth\State::loadState($_REQUEST['stateid'], \SimpleSAML\Module\authlinkedin\Auth\Source\LinkedIn::STAGE_INIT); +$state = \SimpleSAML\Auth\State::loadState( + $_REQUEST['stateid'], + \SimpleSAML\Module\authlinkedin\Auth\Source\LinkedIn::STAGE_INIT +); // http://developer.linkedin.com/docs/DOC-1008#2_Redirect_the_User_to_our_Authorization_Server if (array_key_exists('oauth_verifier', $_REQUEST)) { @@ -28,4 +31,3 @@ if ($source === null) { $source->finalStep($state); \SimpleSAML\Auth\Source::completeAuth($state); - diff --git a/modules/authorize/lib/Auth/Process/Authorize.php b/modules/authorize/lib/Auth/Process/Authorize.php index 63b5770125273c3c4c6ca6dc1ae8f8cc6efb018c..e546f341782ebd410d9d3c41b70b3d55662e8c7f 100644 --- a/modules/authorize/lib/Auth/Process/Authorize.php +++ b/modules/authorize/lib/Auth/Process/Authorize.php @@ -65,11 +65,16 @@ class Authorize extends \SimpleSAML\Auth\ProcessingFilter $values = array($values); } if (!is_array($values)) { - throw new \Exception('Filter Authorize: Attribute values is neither string nor array: '.var_export($attribute, true)); + throw new \Exception( + 'Filter Authorize: Attribute values is neither string nor array: '.var_export($attribute, true) + ); } foreach ($values as $value) { if (!is_string($value)) { - throw new \Exception('Filter Authorize: Each value should be a string for attribute: '.var_export($attribute, true).' value: '.var_export($value, true).' Config is: '.var_export($config, true)); + throw new \Exception( + 'Filter Authorize: Each value should be a string for attribute: '.var_export($attribute, true). + ' value: '.var_export($value, true).' Config is: '.var_export($config, true) + ); } } $this->valid_attribute_values[$attribute] = $values; @@ -130,10 +135,8 @@ class Authorize extends \SimpleSAML\Auth\ProcessingFilter protected function unauthorized(&$request) { // Save state and redirect to 403 page - $id = \SimpleSAML\Auth\State::saveState($request, - 'authorize:Authorize'); - $url = \SimpleSAML\Module::getModuleURL( - 'authorize/authorize_403.php'); + $id = \SimpleSAML\Auth\State::saveState($request, 'authorize:Authorize'); + $url = \SimpleSAML\Module::getModuleURL('authorize/authorize_403.php'); \SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id)); } } diff --git a/modules/authorize/templates/authorize_403.php b/modules/authorize/templates/authorize_403.php index ee16d96a78b2bffb5ef237aa4e95ada165042659..43ab320336655dd097035b51c6e6c092ab40efb6 100644 --- a/modules/authorize/templates/authorize_403.php +++ b/modules/authorize/templates/authorize_403.php @@ -14,15 +14,11 @@ $this->data['403_header'] = $this->t('{authorize:Authorize:403_header}'); $this->data['403_text'] = $this->t('{authorize:Authorize:403_text}'); $this->includeAtTemplateBase('includes/header.php'); -?> -<h1><?php echo $this->data['403_header']; ?></h1> -<p><?php echo $this->data['403_text']; ?></p> -<?php -if (isset($this->data['LogoutURL'])) { -?> -<p><a href="<?php echo htmlspecialchars($this->data['LogoutURL']); ?>"><?php echo $this->t('{status:logout}'); ?></a></p> -<?php + +echo '<h1>'.$this->data['403_header'].'</h1>'; +echo '<p>'.$this->data['403_text'].'</p>'; +if (isset($this->data['logoutURL'])) { + echo '<p><a href="'.htmlspecialchars($this->data['logoutURL']).'">'.$this->t('{status:logout}').'</a></p>'; } -?> -<?php + $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/authorize/templates/authorize_403.twig b/modules/authorize/templates/authorize_403.twig index 1a60813dc7ca1a832c0d4e9bfd00f6e84975baa8..3f6402e923d727e04a639f9a7c92686979574677 100644 --- a/modules/authorize/templates/authorize_403.twig +++ b/modules/authorize/templates/authorize_403.twig @@ -3,9 +3,9 @@ {% block content %} <h1>{{ '{authorize:Authorize:403_header}'|trans }}</h1> <p>{{ '{authorize:Authorize:403_text}'|trans }}</p> - {% if LogoutURL is defined %} + {% if logoutURL is defined %} <p> - <a href="{{ LogoutURL|escape('html') }}">{{ '{status:logout}'|trans }}</a> + <a href="{{ logoutURL|escape('html') }}">{{ '{status:logout}'|trans }}</a> </p> {% endif %} {% endblock%} diff --git a/modules/authorize/www/authorize_403.php b/modules/authorize/www/authorize_403.php index 158fe11a9bffdf51348937aa09427d8a77238e00..4fe73632e498b5191037b5eb91ec9edf6ec86dfc 100644 --- a/modules/authorize/www/authorize_403.php +++ b/modules/authorize/www/authorize_403.php @@ -13,7 +13,10 @@ $state = \SimpleSAML\Auth\State::loadState($_REQUEST['StateId'], 'authorize:Auth $globalConfig = \SimpleSAML\Configuration::getInstance(); $t = new \SimpleSAML\XHTML\Template($globalConfig, 'authorize:authorize_403.php'); if (isset($state['Source']['auth'])) { - $t->data['LogoutURL'] = \SimpleSAML\Module::getModuleURL('core/authenticate.php', array('as' => $state['Source']['auth']))."&logout"; + $t->data['logoutURL'] = \SimpleSAML\Module::getModuleURL( + 'core/authenticate.php', + array('as' => $state['Source']['auth']) + )."&logout"; } header('HTTP/1.0 403 Forbidden'); $t->show(); diff --git a/modules/authtwitter/lib/Auth/Source/Twitter.php b/modules/authtwitter/lib/Auth/Source/Twitter.php index 3079d20ebcafea024a375dd6e44cfa4944aaba94..6b004b6fb0604a63b0aea82f43147e838acca5da 100644 --- a/modules/authtwitter/lib/Auth/Source/Twitter.php +++ b/modules/authtwitter/lib/Auth/Source/Twitter.php @@ -57,7 +57,10 @@ class Twitter extends \SimpleSAML\Auth\Source // Call the parent constructor first, as required by the interface parent::__construct($info, $config); - $configObject = \SimpleSAML\Configuration::loadFromArray($config, 'authsources['.var_export($this->authId, true).']'); + $configObject = \SimpleSAML\Configuration::loadFromArray( + $config, + 'authsources['.var_export($this->authId, true).']' + ); $this->key = $configObject->getString('key'); $this->secret = $configObject->getString('secret'); @@ -82,7 +85,10 @@ class Twitter extends \SimpleSAML\Auth\Source $consumer = new \SimpleSAML\Module\oauth\Consumer($this->key, $this->secret); // Get the request token $linkback = \SimpleSAML\Module::getModuleURL('authtwitter/linkback.php', array('AuthState' => $stateID)); - $requestToken = $consumer->getRequestToken('https://api.twitter.com/oauth/request_token', array('oauth_callback' => $linkback)); + $requestToken = $consumer->getRequestToken( + 'https://api.twitter.com/oauth/request_token', + array('oauth_callback' => $linkback) + ); \SimpleSAML\Logger::debug("Got a request token from the OAuth service provider [". $requestToken->key."] with the secret [".$requestToken->secret."]"); @@ -120,7 +126,11 @@ class Twitter extends \SimpleSAML\Auth\Source $requestToken->key."] with the secret [".$requestToken->secret."]"); // Replace the request token with an access token - $accessToken = $consumer->getAccessToken('https://api.twitter.com/oauth/access_token', $requestToken, $parameters); + $accessToken = $consumer->getAccessToken( + 'https://api.twitter.com/oauth/access_token', + $requestToken, + $parameters + ); \SimpleSAML\Logger::debug("Got an access token from the OAuth service provider [". $accessToken->key."] with the secret [".$accessToken->secret."]"); @@ -131,20 +141,23 @@ class Twitter extends \SimpleSAML\Auth\Source $userdata = $consumer->getUserInfo($verify_credentials_url, $accessToken); if (!isset($userdata['id_str']) || !isset($userdata['screen_name'])) { - throw new \SimpleSAML\Error\AuthSource($this->authId, 'Authentication error: id_str and screen_name not set.'); + throw new \SimpleSAML\Error\AuthSource( + $this->authId, + 'Authentication error: id_str and screen_name not set.' + ); } $attributes = array(); foreach ($userdata as $key => $value) { if (is_string($value)) { $attributes['twitter.'.$key] = array((string) $value); + } } - } - $attributes['twitter_at_screen_name'] = array('@'.$userdata['screen_name']); - $attributes['twitter_screen_n_realm'] = array($userdata['screen_name'].'@twitter.com'); - $attributes['twitter_targetedID'] = array('http://twitter.com!'.$userdata['id_str']); + $attributes['twitter_at_screen_name'] = array('@'.$userdata['screen_name']); + $attributes['twitter_screen_n_realm'] = array($userdata['screen_name'].'@twitter.com'); + $attributes['twitter_targetedID'] = array('http://twitter.com!'.$userdata['id_str']); - $state['Attributes'] = $attributes; + $state['Attributes'] = $attributes; } } diff --git a/modules/authtwitter/www/linkback.php b/modules/authtwitter/www/linkback.php index ebba693a4ac5d60d71a2c95e44802e8afbb60618..cbeed68a7be8028ae0e217cadb15d199948b56af 100644 --- a/modules/authtwitter/www/linkback.php +++ b/modules/authtwitter/www/linkback.php @@ -7,17 +7,24 @@ if (!array_key_exists('AuthState', $_REQUEST) || empty($_REQUEST['AuthState'])) { throw new \SimpleSAML\Error\BadRequest('Missing state parameter on twitter linkback endpoint.'); } -$state = \SimpleSAML\Auth\State::loadState($_REQUEST['AuthState'], \SimpleSAML\Module\authtwitter\Auth\Source\Twitter::STAGE_INIT); +$state = \SimpleSAML\Auth\State::loadState( + $_REQUEST['AuthState'], + \SimpleSAML\Module\authtwitter\Auth\Source\Twitter::STAGE_INIT +); // Find authentication source if (!array_key_exists(\SimpleSAML\Module\authtwitter\Auth\Source\Twitter::AUTHID, $state)) { - throw new \SimpleSAML\Error\BadRequest('No data in state for '.\SimpleSAML\Module\authtwitter\Auth\Source\Twitter::AUTHID); + throw new \SimpleSAML\Error\BadRequest( + 'No data in state for '.\SimpleSAML\Module\authtwitter\Auth\Source\Twitter::AUTHID + ); } $sourceId = $state[\SimpleSAML\Module\authtwitter\Auth\Source\Twitter::AUTHID]; $source = \SimpleSAML\Auth\Source::getById($sourceId); if ($source === null) { - throw new \SimpleSAML\Error\BadRequest('Could not find authentication source with id '.var_export($sourceId, true)); + throw new \SimpleSAML\Error\BadRequest( + 'Could not find authentication source with id '.var_export($sourceId, true) + ); } try { @@ -28,7 +35,10 @@ try { } catch (\SimpleSAML\Error\Exception $e) { \SimpleSAML\Auth\State::throwException($state, $e); } catch (\Exception $e) { - \SimpleSAML\Auth\State::throwException($state, new \SimpleSAML\Error\AuthSource($sourceId, 'Error on authtwitter linkback endpoint.', $e)); + \SimpleSAML\Auth\State::throwException( + $state, + new \SimpleSAML\Error\AuthSource($sourceId, 'Error on authtwitter linkback endpoint.', $e) + ); } \SimpleSAML\Auth\Source::completeAuth($state); diff --git a/modules/authwindowslive/lib/Auth/Source/LiveID.php b/modules/authwindowslive/lib/Auth/Source/LiveID.php index 45488abe294b68836e8095d9239df47c8e7d1c95..facac508ea05474188ca566dd974c9bf619d6e33 100644 --- a/modules/authwindowslive/lib/Auth/Source/LiveID.php +++ b/modules/authwindowslive/lib/Auth/Source/LiveID.php @@ -76,7 +76,7 @@ class LiveID extends \SimpleSAML\Auth\Source '?client_id='.$this->key. '&response_type=code'. '&response_mode=query'. - '&redirect_uri='.urlencode(\SimpleSAML\Module::getModuleUrl('authwindowslive').'/linkback.php'). + '&redirect_uri='.urlencode(\SimpleSAML\Module::getModuleURL('authwindowslive').'/linkback.php'). '&state='.urlencode($stateID). '&scope='.urlencode('openid https://graph.microsoft.com/user.read') ; @@ -102,7 +102,7 @@ class LiveID extends \SimpleSAML\Auth\Source '&client_secret='.urlencode($this->secret). '&scope='.urlencode('https://graph.microsoft.com/user.read'). '&grant_type=authorization_code'. - '&redirect_uri='.urlencode(\SimpleSAML\Module::getModuleUrl('authwindowslive').'/linkback.php'). + '&redirect_uri='.urlencode(\SimpleSAML\Module::getModuleURL('authwindowslive').'/linkback.php'). '&code='.urlencode($state['authwindowslive:verification_code']); $context = array( diff --git a/modules/authwindowslive/www/linkback.php b/modules/authwindowslive/www/linkback.php index 31637deb7578f4e357a54ff9d7c3a79c0dd00c6a..758bdd215f6b490ef11b8b554e1cf2914929595b 100644 --- a/modules/authwindowslive/www/linkback.php +++ b/modules/authwindowslive/www/linkback.php @@ -7,7 +7,10 @@ if (!array_key_exists('state', $_REQUEST)) { throw new \Exception('Lost OAuth Client State'); } -$state = \SimpleSAML\Auth\State::loadState($_REQUEST['state'], \SimpleSAML\Module\authwindowslive\Auth\Source\LiveID::STAGE_INIT); +$state = \SimpleSAML\Auth\State::loadState( + $_REQUEST['state'], + \SimpleSAML\Module\authwindowslive\Auth\Source\LiveID::STAGE_INIT +); // http://msdn.microsoft.com/en-us/library/ff749771.aspx if (array_key_exists('code', $_REQUEST)) { diff --git a/modules/cas/lib/Auth/Source/CAS.php b/modules/cas/lib/Auth/Source/CAS.php index 9ae671a76bfd3bf9ab562c92c0c18b5d154314e6..3ab8cfd7a967eb1043bd1e85a49b48d5fa7fb8cd 100644 --- a/modules/cas/lib/Auth/Source/CAS.php +++ b/modules/cas/lib/Auth/Source/CAS.php @@ -26,22 +26,23 @@ class CAS extends \SimpleSAML\Auth\Source /** * @var array with ldap configuration */ - private $_ldapConfig; + private $ldapConfig; /** * @var cas configuration */ - private $_casConfig; + private $casConfig; /** * @var string cas chosen validation method */ - private $_validationMethod; + private $validationMethod; + /** * @var string cas login method */ - private $_loginMethod; + private $loginMethod; /** * Constructor for this authentication source. @@ -65,19 +66,19 @@ class CAS extends \SimpleSAML\Auth\Source throw new \Exception('ldap authentication source is not properly configured: missing [ldap]'); } - $this->_casConfig = $config['cas']; - $this->_ldapConfig = $config['ldap']; + $this->casConfig = $config['cas']; + $this->ldapConfig = $config['ldap']; - if (isset($this->_casConfig['serviceValidate'])) { - $this->_validationMethod = 'serviceValidate'; - } elseif (isset($this->_casConfig['validate'])) { - $this->_validationMethod = 'validate'; + if (isset($this->casConfig['serviceValidate'])) { + $this->validationMethod = 'serviceValidate'; + } elseif (isset($this->casConfig['validate'])) { + $this->validationMethod = 'validate'; } else { throw new \Exception("validate or serviceValidate not specified"); } - if (isset($this->_casConfig['login'])) { - $this->_loginMethod = $this->_casConfig['login']; + if (isset($this->casConfig['login'])) { + $this->loginMethod = $this->casConfig['login']; } else { throw new \Exception("cas login URL not specified"); } @@ -94,7 +95,7 @@ class CAS extends \SimpleSAML\Auth\Source */ private function casValidate($ticket, $service) { - $url = \SimpleSAML\Utils\HTTP::addURLParameters($this->_casConfig['validate'], array( + $url = \SimpleSAML\Utils\HTTP::addURLParameters($this->casConfig['validate'], array( 'ticket' => $ticket, 'service' => $service, )); @@ -120,7 +121,7 @@ class CAS extends \SimpleSAML\Auth\Source private function casServiceValidate($ticket, $service) { $url = \SimpleSAML\Utils\HTTP::addURLParameters( - $this->_casConfig['serviceValidate'], + $this->casConfig['serviceValidate'], array( 'ticket' => $ticket, 'service' => $service, @@ -137,7 +138,7 @@ class CAS extends \SimpleSAML\Auth\Source throw new \Exception("Error when validating CAS service ticket: ".$failure->item(0)->textContent); } else { $attributes = array(); - if ($casattributes = $this->_casConfig['attributes']) { + if ($casattributes = $this->casConfig['attributes']) { // Some has attributes in the xml - attributes is a list of XPath expressions to get them foreach ($casattributes as $name => $query) { $attrs = $xPath->query($query); @@ -163,7 +164,7 @@ class CAS extends \SimpleSAML\Auth\Source */ protected function casValidation($ticket, $service) { - switch ($this->_validationMethod) { + switch ($this->validationMethod) { case 'validate': return $this->casValidate($ticket, $service); case 'serviceValidate': @@ -187,9 +188,11 @@ class CAS extends \SimpleSAML\Auth\Source list($username, $casattributes) = $this->casValidation($ticket, $service); $ldapattributes = array(); - $config = \SimpleSAML\Configuration::loadFromArray($this->_ldapConfig, - 'Authentication source '.var_export($this->authId, true)); - if ($this->_ldapConfig['servers']) { + $config = \SimpleSAML\Configuration::loadFromArray( + $this->ldapConfig, + 'Authentication source '.var_export($this->authId, true) + ); + if ($this->ldapConfig['servers']) { $ldap = new \SimpleSAML\Auth\LDAP( $config->getString('servers'), $config->getBoolean('enable_tls', false), @@ -198,7 +201,7 @@ class CAS extends \SimpleSAML\Auth\Source $config->getInteger('port', 389), $config->getBoolean('referrals', true) ); - $ldapattributes = $ldap->validate($this->_ldapConfig, $username); + $ldapattributes = $ldap->validate($this->ldapConfig, $username); } $attributes = array_merge_recursive($casattributes, $ldapattributes); $state['Attributes'] = $attributes; @@ -223,7 +226,7 @@ class CAS extends \SimpleSAML\Auth\Source $serviceUrl = \SimpleSAML\Module::getModuleURL('cas/linkback.php', array('stateID' => $stateID)); - \SimpleSAML\Utils\HTTP::redirectTrustedURL($this->_loginMethod, array('service' => $serviceUrl)); + \SimpleSAML\Utils\HTTP::redirectTrustedURL($this->loginMethod, array('service' => $serviceUrl)); } @@ -243,7 +246,7 @@ class CAS extends \SimpleSAML\Auth\Source public function logout(&$state) { assert(is_array($state)); - $logoutUrl = $this->_casConfig['logout']; + $logoutUrl = $this->casConfig['logout']; \SimpleSAML\Auth\State::deleteState($state); // we want cas to log us out diff --git a/modules/cas/www/linkback.php b/modules/cas/www/linkback.php index e547a9afeb0ff18cdba5fce89b282f96e891089c..366583c8a7e572099e66cfaad716faaa084f3788 100644 --- a/modules/cas/www/linkback.php +++ b/modules/cas/www/linkback.php @@ -24,5 +24,3 @@ if ($source === null) { } $source->finalStep($state); - - diff --git a/modules/cdc/lib/Server.php b/modules/cdc/lib/Server.php index 4292ce53fee306a0a306f8c18e3a6e661be6144d..7414004b028332947d5445a88d672af3b0e1cb55 100644 --- a/modules/cdc/lib/Server.php +++ b/modules/cdc/lib/Server.php @@ -66,7 +66,9 @@ class Server $this->cookieLifetime = $config->getInteger('cookie.lifetime', 0); if ($this->key === 'ExampleSharedKey') { - throw new \SimpleSAML\Error\Exception('Key for CDC domain '.var_export($domain, true).' not changed from default.'); + throw new \SimpleSAML\Error\Exception( + 'Key for CDC domain '.var_export($domain, true).' not changed from default.' + ); } } diff --git a/modules/consent/default-enable b/modules/consent/default-disable similarity index 59% rename from modules/consent/default-enable rename to modules/consent/default-disable index 25615cb47c350d23033eb9801627ed8330bcc3e9..fa0bd82e2df7bd79d57593d35bc53c1f9d3ef71f 100644 --- a/modules/consent/default-enable +++ b/modules/consent/default-disable @@ -1,3 +1,3 @@ This file indicates that the default state of this module -is enabled. To disable, create a file named disable in the +is disabled. To enable, create a file named enable in the same directory as this file. diff --git a/modules/consent/lib/Auth/Process/Consent.php b/modules/consent/lib/Auth/Process/Consent.php index 7dbacd4a6359f57494cd7d3a79ffcf462cc5a608..f19c2b20ef0d39d76c0ee08bbf1e00e1e6537145 100644 --- a/modules/consent/lib/Auth/Process/Consent.php +++ b/modules/consent/lib/Auth/Process/Consent.php @@ -23,49 +23,49 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter * * @var string|null */ - private $_focus = null; + private $focus = null; /** * Include attribute values * * @var bool */ - private $_includeValues = false; + private $includeValues = false; /** * Check remember consent * * @var bool */ - private $_checked = false; + private $checked = false; /** * Consent backend storage configuration * * @var \SimpleSAML\Module\consent\Store|null */ - private $_store = null; + private $store = null; /** * Attributes where the value should be hidden * * @var array */ - private $_hiddenAttributes = array(); + private $hiddenAttributes = array(); /** * Attributes which should not require consent * * @var array */ - private $_noconsentattributes = array(); + private $noconsentattributes = array(); /** * Whether we should show the "about service"-link on the no consent page. * * @var bool */ - private $_showNoConsentAboutService = true; + private $showNoConsentAboutService = true; /** @@ -90,7 +90,7 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter var_export($config['includeValues'], true).' given.' ); } - $this->_includeValues = $config['includeValues']; + $this->includeValues = $config['includeValues']; } if (array_key_exists('checked', $config)) { @@ -100,7 +100,7 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter var_export($config['checked'], true).' given.' ); } - $this->_checked = $config['checked']; + $this->checked = $config['checked']; } if (array_key_exists('focus', $config)) { @@ -110,7 +110,7 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter var_export($config['focus'], true).' given.' ); } - $this->_focus = $config['focus']; + $this->focus = $config['focus']; } if (array_key_exists('hiddenAttributes', $config)) { @@ -120,7 +120,7 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter var_export($config['hiddenAttributes'], true).' given.' ); } - $this->_hiddenAttributes = $config['hiddenAttributes']; + $this->hiddenAttributes = $config['hiddenAttributes']; } if (array_key_exists('attributes.exclude', $config)) { @@ -130,7 +130,7 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter var_export($config['attributes.exclude'], true).' given.' ); } - $this->_noconsentattributes = $config['attributes.exclude']; + $this->noconsentattributes = $config['attributes.exclude']; } elseif (array_key_exists('noconsentattributes', $config)) { Logger::warning("The 'noconsentattributes' option has been deprecated in favour of 'attributes.exclude'."); if (!is_array($config['noconsentattributes'])) { @@ -139,12 +139,12 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter var_export($config['noconsentattributes'], true).' given.' ); } - $this->_noconsentattributes = $config['noconsentattributes']; + $this->noconsentattributes = $config['noconsentattributes']; } if (array_key_exists('store', $config)) { try { - $this->_store = \SimpleSAML\Module\consent\Store::parseStoreConfig($config['store']); + $this->store = \SimpleSAML\Module\consent\Store::parseStoreConfig($config['store']); } catch (\Exception $e) { Logger::error( 'Consent: Could not create consent storage: '. @@ -157,7 +157,7 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter if (!is_bool($config['showNoConsentAboutService'])) { throw new \SimpleSAML\Error\Exception('Consent: showNoConsentAboutService must be a boolean.'); } - $this->_showNoConsentAboutService = $config['showNoConsentAboutService']; + $this->showNoConsentAboutService = $config['showNoConsentAboutService']; } } @@ -276,14 +276,14 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter return; } - if ($this->_store !== null) { + if ($this->store !== null) { $source = $state['Source']['metadata-set'].'|'.$idpEntityId; $destination = $state['Destination']['metadata-set'].'|'.$spEntityId; $attributes = $state['Attributes']; // Remove attributes that do not require consent foreach ($attributes as $attrkey => $attrval) { - if (in_array($attrkey, $this->_noconsentattributes, true)) { + if (in_array($attrkey, $this->noconsentattributes, true)) { unset($attributes[$attrkey]); } } @@ -294,7 +294,7 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter $userId = self::getHashedUserID($state['UserID'], $source); $targetedId = self::getTargetedID($state['UserID'], $source, $destination); - $attributeSet = self::getAttributeHash($attributes, $this->_includeValues); + $attributeSet = self::getAttributeHash($attributes, $this->includeValues); Logger::debug( 'Consent: hasConsent() ['.$userId.'|'.$targetedId.'|'. @@ -302,7 +302,7 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter ); try { - if ($this->_store->hasConsent($userId, $targetedId, $attributeSet)) { + if ($this->store->hasConsent($userId, $targetedId, $attributeSet)) { // Consent already given Logger::stats('consent found'); Stats::log('consent:found', $statsData); @@ -312,7 +312,7 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter Logger::stats('consent notfound'); Stats::log('consent:notfound', $statsData); - $state['consent:store'] = $this->_store; + $state['consent:store'] = $this->store; $state['consent:store.userId'] = $userId; $state['consent:store.destination'] = $targetedId; $state['consent:store.attributeSet'] = $attributeSet; @@ -326,18 +326,18 @@ class Consent extends \SimpleSAML\Auth\ProcessingFilter Stats::log('consent:nostorage', $statsData); } - $state['consent:focus'] = $this->_focus; - $state['consent:checked'] = $this->_checked; - $state['consent:hiddenAttributes'] = $this->_hiddenAttributes; - $state['consent:noconsentattributes'] = $this->_noconsentattributes; - $state['consent:showNoConsentAboutService'] = $this->_showNoConsentAboutService; + $state['consent:focus'] = $this->focus; + $state['consent:checked'] = $this->checked; + $state['consent:hiddenAttributes'] = $this->hiddenAttributes; + $state['consent:noconsentattributes'] = $this->noconsentattributes; + $state['consent:showNoConsentAboutService'] = $this->showNoConsentAboutService; // user interaction necessary. Throw exception on isPassive request if (isset($state['isPassive']) && $state['isPassive'] === true) { Stats::log('consent:nopassive', $statsData); throw new Module\saml\Error\NoPassive( - \SAML2\Constants::STATUS_REQUESTER, - 'Unable to give consent on passive request.' + \SAML2\Constants::STATUS_REQUESTER, + 'Unable to give consent on passive request.' ); } diff --git a/modules/consent/lib/Consent/Store/Cookie.php b/modules/consent/lib/Consent/Store/Cookie.php index 52ea5f9520e238fb1d03f2ddf440acb7597c6d83..19ab9b4019d0b1e40ec9131899751fb5a588f8d8 100644 --- a/modules/consent/lib/Consent/Store/Cookie.php +++ b/modules/consent/lib/Consent/Store/Cookie.php @@ -42,7 +42,7 @@ class Cookie extends \SimpleSAML\Module\consent\Store assert(is_string($destinationId)); assert(is_string($attributeSet)); - $cookieName = self::_getCookieName($userId, $destinationId); + $cookieName = self::getCookieName($userId, $destinationId); $data = $userId.':'.$attributeSet.':'.$destinationId; @@ -62,7 +62,7 @@ class Cookie extends \SimpleSAML\Module\consent\Store return false; } - $data = self::_sign($data); + $data = self::sign($data); if ($_COOKIE[$cookieName] !== $data) { \SimpleSAML\Logger::info( @@ -97,13 +97,13 @@ class Cookie extends \SimpleSAML\Module\consent\Store assert(is_string($destinationId)); assert(is_string($attributeSet)); - $name = self::_getCookieName($userId, $destinationId); + $name = self::getCookieName($userId, $destinationId); $value = $userId.':'.$attributeSet.':'.$destinationId; \SimpleSAML\Logger::debug('Consent cookie - Set ['.$value.']'); - $value = self::_sign($value); - $this->_setConsentCookie($name, $value); + $value = self::sign($value); + $this->setConsentCookie($name, $value); } @@ -122,8 +122,8 @@ class Cookie extends \SimpleSAML\Module\consent\Store assert(is_string($userId)); assert(is_string($destinationId)); - $name = self::_getCookieName($userId, $destinationId); - $this->_setConsentCookie($name, null); + $name = self::getCookieName($userId, $destinationId); + $this->setConsentCookie($name, null); } @@ -169,7 +169,7 @@ class Cookie extends \SimpleSAML\Module\consent\Store continue; } - $value = self::_verify($value); + $value = self::verify($value); if ($value === false) { continue; } @@ -204,7 +204,7 @@ class Cookie extends \SimpleSAML\Module\consent\Store * * @return string The signed data. */ - private static function _sign($data) + private static function sign($data) { assert(is_string($data)); @@ -223,7 +223,7 @@ class Cookie extends \SimpleSAML\Module\consent\Store * * @return string|false The data, or false if the signature is invalid. */ - private static function _verify($signedData) + private static function verify($signedData) { assert(is_string($signedData)); @@ -234,7 +234,7 @@ class Cookie extends \SimpleSAML\Module\consent\Store } $data = $data[1]; - $newSignedData = self::_sign($data); + $newSignedData = self::sign($data); if ($newSignedData !== $signedData) { \SimpleSAML\Logger::warning('Consent cookie: Invalid signature.'); return false; @@ -254,7 +254,7 @@ class Cookie extends \SimpleSAML\Module\consent\Store * * @return string The cookie name */ - private static function _getCookieName($userId, $destinationId) + private static function getCookieName($userId, $destinationId) { assert(is_string($userId)); assert(is_string($destinationId)); @@ -271,7 +271,7 @@ class Cookie extends \SimpleSAML\Module\consent\Store * * @return void */ - private function _setConsentCookie($name, $value) + private function setConsentCookie($name, $value) { assert(is_string($name)); assert(is_string($value) || $value === null); diff --git a/modules/consent/lib/Consent/Store/Database.php b/modules/consent/lib/Consent/Store/Database.php index 35f438f16716c41004cd4d2f69620638262ec498..5f5f3b12642ae37976a8e7e160fce7bc09580d02 100644 --- a/modules/consent/lib/Consent/Store/Database.php +++ b/modules/consent/lib/Consent/Store/Database.php @@ -24,46 +24,46 @@ class Database extends \SimpleSAML\Module\consent\Store /** * DSN for the database. */ - private $_dsn; + private $dsn; /** * The DATETIME SQL function to use */ - private $_dateTime; + private $dateTime; /** * Username for the database. */ - private $_username; + private $username; /** * Password for the database; */ - private $_password; + private $password; /** * Options for the database; */ - private $_options; + private $options; /** * Table with consent. */ - private $_table; + private $table; /** * The timeout of the database connection. * * @var int|null */ - private $_timeout = null; + private $timeout = null; /** * Database handle. * * This variable can't be serialized. */ - private $_db; + private $db; /** @@ -86,49 +86,49 @@ class Database extends \SimpleSAML\Module\consent\Store throw new \Exception('consent:Database - \'dsn\' is supposed to be a string.'); } - $this->_dsn = $config['dsn']; - $this->_dateTime = (0 === strpos($this->_dsn, 'sqlite:')) ? 'DATETIME("NOW")' : 'NOW()'; + $this->dsn = $config['dsn']; + $this->dateTime = (0 === strpos($this->dsn, 'sqlite:')) ? 'DATETIME("NOW")' : 'NOW()'; if (array_key_exists('username', $config)) { if (!is_string($config['username'])) { throw new \Exception('consent:Database - \'username\' is supposed to be a string.'); } - $this->_username = $config['username']; + $this->username = $config['username']; } else { - $this->_username = null; + $this->username = null; } if (array_key_exists('password', $config)) { if (!is_string($config['password'])) { throw new \Exception('consent:Database - \'password\' is supposed to be a string.'); } - $this->_password = $config['password']; + $this->password = $config['password']; } else { - $this->_password = null; + $this->password = null; } if (array_key_exists('options', $config)) { if (!is_array($config['options'])) { throw new \Exception('consent:Database - \'options\' is supposed to be an array.'); } - $this->_options = $config['options']; + $this->options = $config['options']; } else { - $this->_options = null; + $this->options = null; } if (array_key_exists('table', $config)) { if (!is_string($config['table'])) { throw new \Exception('consent:Database - \'table\' is supposed to be a string.'); } - $this->_table = $config['table']; + $this->table = $config['table']; } else { - $this->_table = 'consent'; + $this->table = 'consent'; } if (isset($config['timeout'])) { if (!is_int($config['timeout'])) { throw new \Exception('consent:Database - \'timeout\' is supposed to be an integer.'); } - $this->_timeout = $config['timeout']; + $this->timeout = $config['timeout']; } } @@ -141,12 +141,12 @@ class Database extends \SimpleSAML\Module\consent\Store public function __sleep() { return array( - '_dsn', - '_dateTime', - '_username', - '_password', - '_table', - '_timeout', + 'dsn', + 'dateTime', + 'username', + 'password', + 'table', + 'timeout', ); } @@ -170,9 +170,9 @@ class Database extends \SimpleSAML\Module\consent\Store assert(is_string($destinationId)); assert(is_string($attributeSet)); - $st = $this->_execute( - 'UPDATE '.$this->_table.' '. - 'SET usage_date = '.$this->_dateTime.' '. + $st = $this->execute( + 'UPDATE '.$this->table.' '. + 'SET usage_date = '.$this->dateTime.' '. 'WHERE hashed_user_id = ? AND service_id = ? AND attribute = ?', array($userId, $destinationId, $attributeSet) ); @@ -211,9 +211,9 @@ class Database extends \SimpleSAML\Module\consent\Store assert(is_string($attributeSet)); // Check for old consent (with different attribute set) - $st = $this->_execute( - 'UPDATE '.$this->_table.' '. - 'SET consent_date = '.$this->_dateTime.', usage_date = '.$this->_dateTime.', attribute = ? '. + $st = $this->execute( + 'UPDATE '.$this->table.' '. + 'SET consent_date = '.$this->dateTime.', usage_date = '.$this->dateTime.', attribute = ? '. 'WHERE hashed_user_id = ? AND service_id = ?', array($attributeSet, $userId, $destinationId) ); @@ -229,9 +229,9 @@ class Database extends \SimpleSAML\Module\consent\Store } // Add new consent - $st = $this->_execute( - 'INSERT INTO '.$this->_table.' ('.'consent_date, usage_date, hashed_user_id, service_id, attribute'. - ') '.'VALUES ('.$this->_dateTime.', '.$this->_dateTime.', ?, ?, ?)', + $st = $this->execute( + 'INSERT INTO '.$this->table.' ('.'consent_date, usage_date, hashed_user_id, service_id, attribute'. + ') '.'VALUES ('.$this->dateTime.', '.$this->dateTime.', ?, ?, ?)', array($userId, $destinationId, $attributeSet) ); @@ -257,8 +257,8 @@ class Database extends \SimpleSAML\Module\consent\Store assert(is_string($userId)); assert(is_string($destinationId)); - $st = $this->_execute( - 'DELETE FROM '.$this->_table.' WHERE hashed_user_id = ? AND service_id = ?;', + $st = $this->execute( + 'DELETE FROM '.$this->table.' WHERE hashed_user_id = ? AND service_id = ?;', array($userId, $destinationId) ); @@ -288,8 +288,8 @@ class Database extends \SimpleSAML\Module\consent\Store { assert(is_string($userId)); - $st = $this->_execute( - 'DELETE FROM '.$this->_table.' WHERE hashed_user_id = ?', + $st = $this->execute( + 'DELETE FROM '.$this->table.' WHERE hashed_user_id = ?', array($userId) ); @@ -321,8 +321,8 @@ class Database extends \SimpleSAML\Module\consent\Store $ret = array(); - $st = $this->_execute( - 'SELECT service_id, attribute, consent_date, usage_date FROM '.$this->_table. + $st = $this->execute( + 'SELECT service_id, attribute, consent_date, usage_date FROM '.$this->table. ' WHERE hashed_user_id = ?', array($userId) ); @@ -350,12 +350,12 @@ class Database extends \SimpleSAML\Module\consent\Store * * @return \PDOStatement|false The statement, or false if execution failed. */ - private function _execute($statement, $parameters) + private function execute($statement, $parameters) { assert(is_string($statement)); assert(is_array($parameters)); - $db = $this->_getDB(); + $db = $this->getDB(); if ($db === false) { return false; } @@ -364,7 +364,7 @@ class Database extends \SimpleSAML\Module\consent\Store if ($st === false) { \SimpleSAML\Logger::error( 'consent:Database - Error preparing statement \''. - $statement.'\': '.self::_formatError($db->errorInfo()) + $statement.'\': '.self::formatError($db->errorInfo()) ); return false; } @@ -372,7 +372,7 @@ class Database extends \SimpleSAML\Module\consent\Store if ($st->execute($parameters) !== true) { \SimpleSAML\Logger::error( 'consent:Database - Error executing statement \''. - $statement.'\': '.self::_formatError($st->errorInfo()) + $statement.'\': '.self::formatError($st->errorInfo()) ); return false; } @@ -396,7 +396,7 @@ class Database extends \SimpleSAML\Module\consent\Store $ret = array(); // Get total number of consents - $st = $this->_execute('SELECT COUNT(*) AS no FROM '.$this->_table, array()); + $st = $this->execute('SELECT COUNT(*) AS no FROM '.$this->table, array()); if ($st === false) { return array(); @@ -407,9 +407,9 @@ class Database extends \SimpleSAML\Module\consent\Store } // Get total number of users that has given consent - $st = $this->_execute( + $st = $this->execute( 'SELECT COUNT(*) AS no '. - 'FROM (SELECT DISTINCT hashed_user_id FROM '.$this->_table.' ) AS foo', + 'FROM (SELECT DISTINCT hashed_user_id FROM '.$this->table.' ) AS foo', array() ); @@ -422,8 +422,8 @@ class Database extends \SimpleSAML\Module\consent\Store } // Get total number of services that has been given consent to - $st = $this->_execute( - 'SELECT COUNT(*) AS no FROM (SELECT DISTINCT service_id FROM '.$this->_table.') AS foo', + $st = $this->execute( + 'SELECT COUNT(*) AS no FROM (SELECT DISTINCT service_id FROM '.$this->table.') AS foo', array() ); @@ -444,25 +444,25 @@ class Database extends \SimpleSAML\Module\consent\Store * * @return \PDO|false Database handle, or false if we fail to connect. */ - private function _getDB() + private function getDB() { - if ($this->_db !== null) { - return $this->_db; + if ($this->db !== null) { + return $this->db; } $driver_options = array(); - if (isset($this->_timeout)) { - $driver_options[\PDO::ATTR_TIMEOUT] = $this->_timeout; + if (isset($this->timeout)) { + $driver_options[\PDO::ATTR_TIMEOUT] = $this->timeout; } - if (isset($this->_options)) { - $this->_options = array_merge($driver_options, $this->_options); + if (isset($this->options)) { + $this->options = array_merge($driver_options, $this->options); } else { - $this->_options = $driver_options; + $this->options = $driver_options; } - $this->_db = new \PDO($this->_dsn, $this->_username, $this->_password, $this->_options); + $this->db = new \PDO($this->dsn, $this->username, $this->password, $this->options); - return $this->_db; + return $this->db; } @@ -475,7 +475,7 @@ class Database extends \SimpleSAML\Module\consent\Store * * @return string Error text. */ - private static function _formatError($error) + private static function formatError($error) { assert(is_array($error)); assert(count($error) >= 3); @@ -491,8 +491,8 @@ class Database extends \SimpleSAML\Module\consent\Store */ public function selftest() { - $st = $this->_execute( - 'SELECT * FROM '.$this->_table.' WHERE hashed_user_id = ? AND service_id = ? AND attribute = ?', + $st = $this->execute( + 'SELECT * FROM '.$this->table.' WHERE hashed_user_id = ? AND service_id = ? AND attribute = ?', array('test', 'test', 'test') ); diff --git a/modules/consent/templates/consentform.php b/modules/consent/templates/consentform.php index 399fa6bedb37c2bcf9a4717c45bec0f99959ee8e..90907e0ed2812bd8654edfa8c10f1b54320b7670 100644 --- a/modules/consent/templates/consentform.php +++ b/modules/consent/templates/consentform.php @@ -19,7 +19,7 @@ $srcName = $this->data['srcName']; $this->data['header'] = $this->t('{consent:consent:consent_header}'); $this->data['head'] = '<link rel="stylesheet" type="text/css" href="'. - SimpleSAML\Module::getModuleURL("consent/assets/consent.css").'" />'."\n"; + SimpleSAML\Module::getModuleURL("consent/assets/css/consent.css").'" />'."\n"; $this->includeAtTemplateBase('includes/header.php'); ?> @@ -59,11 +59,7 @@ if ($this->data['sppp'] !== false) { echo "</p>"; } -echo '<h3 id="attributeheader">'. - $this->t( - '{consent:consent:consent_attributes_header}', - array('SPNAME' => $dstName, 'IDPNAME' => $srcName) - ).'</h3>'; +echo '<h3 id="attributeheader">'.$this->data['consent_attributes_header'].'</h3>'; echo $this->data['attributes_html']; diff --git a/modules/consent/templates/consentform.twig b/modules/consent/templates/consentform.twig index ca07f84f7e6c7e041370a354284aa4d8ef51ff3f..b1433046a9e07af6757ec0453c9b2c14c715f98b 100644 --- a/modules/consent/templates/consentform.twig +++ b/modules/consent/templates/consentform.twig @@ -2,7 +2,7 @@ {% extends "base.twig" %} {% block preload %} -<link rel="stylesheet" type="text/css" href="{{ baseurlpath }}assets/consent.css" /> +<link rel="stylesheet" type="text/css" href="{{ baseurlpath }}assets/css/consent.css" /> {% endblock %} {% block content %} @@ -19,12 +19,12 @@ {% endif %} <input type="hidden" name="StateId" value="{{ stateId }}" /> - <button type="submit" name="yes" class="btn" id="yesbutton">{{ '{consent:consent:yes}'|trans }}</button> + <button type="submit" name="yes" class="btn" id="yesbutton"{%- if autofocus == 'yesbutton' %} autofocus{% endif -%}>{{ '{consent:consent:yes}'|trans }}</button> </form> <form id="consent_no" action="{{ noTarget }}"> <input type="hidden" name="StateId" value="{{ stateId }}" /> - <button type="submit" class="btn" name="no" id="nobutton">{{ '{consent:consent:no}'|trans }}</button> + <button type="submit" class="btn" name="no" id="nobutton"{%- if autofocus == 'nobutton' %} autofocus{% endif -%}>{{ '{consent:consent:no}'|trans }}</button> </form> {% if sppp != false %} diff --git a/modules/consent/www/assets/css/consent.css b/modules/consent/www/assets/css/consent.css new file mode 100644 index 0000000000000000000000000000000000000000..33bef3d64a6c17123c12518e796453e5c1465dd4 --- /dev/null +++ b/modules/consent/www/assets/css/consent.css @@ -0,0 +1,54 @@ +fieldset { + padding: 0px; +} + +fieldset legend { + background: #eee; +} + +h3#attributeheader { + margin: 1.5em 0em 0.5em 0em; +} + +table#table_with_attributes .attrname { + text-align: right; + font-weight: bold; +} + +table#table_with_attributes .attrvalue { + padding-left: 1em; + margin: 0.5em 0em; +} + +table#table_with_attributes tr:last-child td { + border-bottom: none; +} + +table#table_with_attributes img { + border: 1px solid #777; + margin: 4px; +} + +table#table_with_attributes ul { + margin: 0px; + padding-left: 1em; +} + +form#consent_yes { + display: inline; + margin: 0px; + padding: 0px; +} + +form#consent_no { + display: inline; + margin-left: .5em; +} + +.hidden { + display: none; +} + +td.td_odd { + padding: 2em; +} diff --git a/modules/consent/www/getconsent.php b/modules/consent/www/getconsent.php index 2bdfc82b8c4e66e1eb1b5ab02912980625a7223b..24fe3b52844a7c62a0317b62fb83a26800d678c5 100644 --- a/modules/consent/www/getconsent.php +++ b/modules/consent/www/getconsent.php @@ -6,11 +6,10 @@ * authorizes the release of attributes. * * @package SimpleSAMLphp - */ -/** - * Explicit instruct consent page to send no-cache header to browsers to make + * + * Explicit instruct consent page to send no-cache header to browsers to make * sure the users attribute information are not store on client disk. - * + * * In an vanilla apache-php installation is the php variables set to: * * session.cache_limiter = nocache @@ -34,7 +33,7 @@ $state = \SimpleSAML\Auth\State::loadState($id, 'consent:request'); if (array_key_exists('core:SP', $state)) { $spentityid = $state['core:SP']; -} else if (array_key_exists('saml:sp:State', $state)) { +} elseif (array_key_exists('saml:sp:State', $state)) { $spentityid = $state['saml:sp:State']['core:SP']; } else { $spentityid = 'UNKNOWN'; @@ -57,7 +56,7 @@ if (array_key_exists('yes', $_REQUEST)) { } \SimpleSAML\Stats::log('consent:accept', $statsInfo); - if (array_key_exists('consent:store', $state) + if (array_key_exists('consent:store', $state) && array_key_exists('saveconsent', $_REQUEST) && $_REQUEST['saveconsent'] === '1' ) { @@ -69,7 +68,7 @@ if (array_key_exists('yes', $_REQUEST)) { \SimpleSAML\Logger::debug( 'Consent - saveConsent() : ['.$userId.'|'.$targetedId.'|'.$attributeSet.']' - ); + ); try { $store->saveConsent($userId, $targetedId, $attributeSet); } catch (\Exception $e) { @@ -169,7 +168,7 @@ if (array_key_exists('privacypolicy', $state['Destination'])) { if ($privacypolicy !== false) { $privacypolicy = str_replace( '%SPENTITYID%', - urlencode($spentityid), + urlencode($spentityid), $privacypolicy ); } diff --git a/modules/consentAdmin/dictionaries/consentadmin.definition.json b/modules/consentAdmin/dictionaries/consentadmin.definition.json index a887cf3b7681cb12db9758f1495e2e035b39a827..01a48eddb226ef703cd0a5699798c73772e27000 100644 --- a/modules/consentAdmin/dictionaries/consentadmin.definition.json +++ b/modules/consentAdmin/dictionaries/consentadmin.definition.json @@ -1,7 +1,4 @@ { - "sp_empty_name": { - "en": "(name not specified)" - }, "sp_empty_description": { "en": "(no description)" }, @@ -62,4 +59,4 @@ "consentadmin_purpose": { "en": "The purpose of the service is" } -} \ No newline at end of file +} diff --git a/modules/consentAdmin/dictionaries/consentadmin.translation.json b/modules/consentAdmin/dictionaries/consentadmin.translation.json index 7a874d0ac9cb77929c6f9d299ac999407680c0b2..18af923572217905c30575593f096aad44162623 100644 --- a/modules/consentAdmin/dictionaries/consentadmin.translation.json +++ b/modules/consentAdmin/dictionaries/consentadmin.translation.json @@ -1,34 +1,4 @@ { - "sp_empty_name": { - "da": "(navn ikke angivet)", - "no": "(navn ikke spesifisert)", - "de": "(Name nicht angegeben)", - "sl": "(brez naziva)", - "pt": "(nome n\u00e3o especificado)", - "sv": "(namn ej angivet)", - "fr": "(nom non indiqu\u00e9)", - "hr": "(naziv nije specificiran)", - "hu": "(nincs n\u00e9v)", - "it": "(nome non specificato)", - "es": "(nombre no especificado)", - "lt": "(pavadinimas nenurodytas)", - "nl": "(naam niet opgegeven)", - "ja": "(\u540d\u524d\u7121\u3057)", - "zh-tw": "(\u672a\u5b9a\u7fa9\u540d\u7a31)", - "nn": "(namn ikkje spesifisert)", - "et": "(nimi m\u00e4\u00e4ramata)", - "he": "(\u05dc\u05d0 \u05e0\u05d9\u05ea\u05df \u05e9\u05dd)", - "zh": "\uff08\u6ca1\u6709\u6307\u5b9a\u540d\u5b57\uff09", - "ar": "\u0627\u0644\u0627\u0633\u0645 \u063a\u064a\u0631 \u0645\u062d\u062f\u062f", - "lv": "(v\u0101rds nav nor\u0101d\u012bts)", - "id": "(Nama tidak diisi)", - "sr": "(ime nije specificirano)", - "ro": "(nu a fost specificat numele)", - "ru": "(\u0438\u043c\u044f \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e)", - "cs": "(jm\u00e9no nespecifikov\u00e1no)", - "eu": "(izena ez da zehaztu)", - "el": "(\u03c7\u03c9\u03c1\u03af\u03c2 \u03cc\u03bd\u03bf\u03bc\u03b1)" - }, "sp_empty_description": { "da": "(ingen beskrivelse)", "no": "(ingen beskrivelse)", diff --git a/modules/consentAdmin/locales/ar/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/ar/LC_MESSAGES/consentAdmin.po index ed203049a1c3669f338dd9deeda66db2ace19d31..d778277bbbd973ea9b48e4d9d45be983a28cf369 100644 --- a/modules/consentAdmin/locales/ar/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/ar/LC_MESSAGES/consentAdmin.po @@ -55,9 +55,6 @@ msgstr "لا يوجد وصÙ" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "مشغلي الخدمة Ù„" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "الاسم غير Ù…Øدد" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "Ù„Øذ٠مواÙقتك</h3>الغي صندوق مشغل الخدمة<h3>روابط</h3> <ul> <li><a " diff --git a/modules/consentAdmin/locales/cs/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/cs/LC_MESSAGES/consentAdmin.po index 7709b6911b51c29f44ac9425b9e81a8b0f749645..42b3f5277700f88d87b40fc7041f039fecf67bf0 100644 --- a/modules/consentAdmin/locales/cs/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/cs/LC_MESSAGES/consentAdmin.po @@ -55,9 +55,6 @@ msgstr "(žádný popis)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Poskytovatelé služeb pro" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(jméno nespecifikováno)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Jak smazat vaÅ¡e povolenÃ</h3> OdznaÄte polÃÄko odpovÃdajÃcà " diff --git a/modules/consentAdmin/locales/da/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/da/LC_MESSAGES/consentAdmin.po index 8961aba8256d658aec74a165ea31c0b1dfac5fb1..bdd2573a1065490cef72ee1eb106c9f952eb0ae2 100644 --- a/modules/consentAdmin/locales/da/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/da/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(ingen beskrivelse)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Service Providers for" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(navn ikke angivet)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>SÃ¥dan sletter du et samtykke</h3>Fjern fluebenet ud for tjenesten, " diff --git a/modules/consentAdmin/locales/de/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/de/LC_MESSAGES/consentAdmin.po index 2e53b5ce2cac6344e26fcd5942c89dcff33fddbb..72b0ae0fa94fba55e3b92e7b3a2c030c0b78de71 100644 --- a/modules/consentAdmin/locales/de/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/de/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(keine Beschreibung)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Diensteanbieter für" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(Name nicht angegeben)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Wie Sie Ihre Einverständniserklärung löschen</h3> Entfernen Sie das " diff --git a/modules/consentAdmin/locales/el/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/el/LC_MESSAGES/consentAdmin.po index 207fb949db09116809c6fb1aa71512d5679c445e..15e128a24f917975089837dc7d006911fafc8ed6 100644 --- a/modules/consentAdmin/locales/el/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/el/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(χωÏίς πεÏιγÏαφή)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "ΠάÏοχοι ΥπηÏεσιών για" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(χωÏίς όνομα)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Î ÏŽÏ‚ να αναιÏÎσετε τη συγκατάθεσή σας</h3>ΑποεπιλÎξτε το κουτί " diff --git a/modules/consentAdmin/locales/en/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/en/LC_MESSAGES/consentAdmin.po index 9d68f7f24ba110af81afb3da516e9db56563c63e..ea3d3207f8797a56112448c1a83f502544d8d7cd 100644 --- a/modules/consentAdmin/locales/en/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/en/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(no description)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Service Providers for" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(name not specified)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "\n" diff --git a/modules/consentAdmin/locales/es/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/es/LC_MESSAGES/consentAdmin.po index 8ddfa631c742ae1a76aebbe0c935da710a006a49..6d937dde8fbd11e3432a25e23aca819de8925cef 100644 --- a/modules/consentAdmin/locales/es/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/es/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(sin descripción)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Proveedores de servicio para" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(nombre no especificado)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Como eliminar su consentimiento</h3> Desmarque la opción " diff --git a/modules/consentAdmin/locales/et/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/et/LC_MESSAGES/consentAdmin.po index 37219898d7f72962d99ed837c73fce14cdcc8dcd..4a815ad5bddb7ad81c3820f8965419c0b8a00233 100644 --- a/modules/consentAdmin/locales/et/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/et/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(kirjeldus puudub)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Teenusepakkujad" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(nimi määramata)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Kuidas eemaldada nõusolekut</h3> Eemalda vastava teenusepakkuja " diff --git a/modules/consentAdmin/locales/eu/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/eu/LC_MESSAGES/consentAdmin.po index 6d67389b76bc15aaf17aaa0df8b9507cc3f4e8d1..adeb050e0426a80810a2b97c469529d8f224343a 100644 --- a/modules/consentAdmin/locales/eu/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/eu/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(deskribapenik gabe)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Zerbitzu hornitzaileak hontarako: " -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(izena ez da zehaztu)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Zure onespena nola ezabatu</h3> Zerbitzu hornitzaileari dagokion " diff --git a/modules/consentAdmin/locales/fr/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/fr/LC_MESSAGES/consentAdmin.po index ca3bde7f1215e6c84a940016d6e13c84c3aafe59..65abab4fd1a305ab9fa691c6799fbab8a4070d80 100644 --- a/modules/consentAdmin/locales/fr/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/fr/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(pas de description)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Fournisseurs de service pour" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(nom non indiqué)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Comment révoquer un consentement</h3>Décochez la case correspondante " diff --git a/modules/consentAdmin/locales/he/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/he/LC_MESSAGES/consentAdmin.po index 30a632e9d8898500052c4420d0ddb5e778d66051..4cb1b7703ef9f872146d4b0046b6cc5c7401c04b 100644 --- a/modules/consentAdmin/locales/he/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/he/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(×ין תי×ור)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "ספקי שירות עבור" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(×œ× × ×™×ª×Ÿ ש×)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>×יך להסיר ×ת הסכמתך</h3> לחץ בתיבה המת×ימה לספק השירות " diff --git a/modules/consentAdmin/locales/hr/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/hr/LC_MESSAGES/consentAdmin.po index 46436725170845942314a291a4089488ddafaf94..b7be441fd7c5e13fc64e0b9d049fcd27d56e62c0 100644 --- a/modules/consentAdmin/locales/hr/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/hr/LC_MESSAGES/consentAdmin.po @@ -55,9 +55,6 @@ msgstr "(nema opisa)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Davatelji usluga za" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(naziv nije specificiran)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Kako obrisati dozvolu</h3> Maknite kvaÄicu iz polja koje se odnosi na" diff --git a/modules/consentAdmin/locales/hu/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/hu/LC_MESSAGES/consentAdmin.po index 78b785ca9b07bdf8827a759a2bdefd57d674e93f..51f0166a1313e3fe22cc6bc400707742668ca2be 100644 --- a/modules/consentAdmin/locales/hu/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/hu/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(nincs leÃrás)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Szolgáltató" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(nincs név)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Hogyan kell visszavonni egy hozzájárulást?</h3> A szolgáltatóhoz " diff --git a/modules/consentAdmin/locales/id/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/id/LC_MESSAGES/consentAdmin.po index 04468f2620a739789bfd096cf0a00a1da6472808..64e517dbd6b58654d7a3738ace30fb8accd80089 100644 --- a/modules/consentAdmin/locales/id/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/id/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(Tidak ada penjelasan)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Service Provider untuk" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(Nama tidak diisi)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Bagaimana cara menghapus consent anda</h3> Hapus centak pada kotak " diff --git a/modules/consentAdmin/locales/it/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/it/LC_MESSAGES/consentAdmin.po index 6b4875d91ef234dbbf4cbd563febf38cb2dd171a..10b213d142448ecf0ffb5b63a0864c6e889bb019 100644 --- a/modules/consentAdmin/locales/it/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/it/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(nessuna descrizione)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Service provider per" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(nome non specificato)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Come rimuovere il consenso></h3> Togliere il segno di spunta al " diff --git a/modules/consentAdmin/locales/ja/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/ja/LC_MESSAGES/consentAdmin.po index 6cf0c9dc019f10a1f4e00307000fa46134b10a61..5a26c6aa45459759d116c5feef45794524daa12c 100644 --- a/modules/consentAdmin/locales/ja/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/ja/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(記述無ã—)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "サービスプãƒãƒã‚¤ãƒ€ - " -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(åå‰ç„¡ã—)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>承èªã®å‰Šé™¤æ–¹æ³•</h3> 該当ã™ã‚‹ã‚µãƒ¼ãƒ“スプãƒãƒã‚¤ãƒ€ã®ãƒã‚§ãƒƒã‚¯ã‚’外ã—ã¾ã™ã€‚<h3>リンク</h3> <ul> <li><a " diff --git a/modules/consentAdmin/locales/lt/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/lt/LC_MESSAGES/consentAdmin.po index 41e8fb3b0d09f57a617bb267e417be9fe12e7b01..7596d5e822d2e09388136a49a82a403b06322d5f 100644 --- a/modules/consentAdmin/locales/lt/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/lt/LC_MESSAGES/consentAdmin.po @@ -55,9 +55,6 @@ msgstr "(apibÅ«dinimas nenurodytas)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Paslaugos tiekÄ—jai" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(pavadinimas nenurodytas)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Kaip paÅ¡alinti savo leidimÄ…</h3> Panaikinkite pažymÄ—jimÄ… ties " diff --git a/modules/consentAdmin/locales/lv/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/lv/LC_MESSAGES/consentAdmin.po index fea6d8bd60879d9a6b63aff98b4b3a1f2d30c3ec..6f5ff436fccd52f22f89e44860a9d7d03abf4a8c 100644 --- a/modules/consentAdmin/locales/lv/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/lv/LC_MESSAGES/consentAdmin.po @@ -55,9 +55,6 @@ msgstr "(nav apraksta)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Servisa piegÄdÄtÄji priekÅ¡" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(vÄrds nav norÄdÄ«ts)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>KÄ dzÄ“st noteikumus</h3> Izņemiet Ä·eksÄ«ti pie atbilstoÅ¡Ä servisa " diff --git a/modules/consentAdmin/locales/nb/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/nb/LC_MESSAGES/consentAdmin.po index c6d1c68b309c614fa525c5e00e8c16e8f3157547..d981bba9d2827e2f8b6cb04274cb75b6f7263237 100644 --- a/modules/consentAdmin/locales/nb/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/nb/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(ingen beskrivelse)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Tjenesteleverandører for" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(navn ikke spesifisert)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Hvordan trekke samtykke tilbake</h3> Fjern haken i boksen for gitte " diff --git a/modules/consentAdmin/locales/nl/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/nl/LC_MESSAGES/consentAdmin.po index e763eda1a8dbdb4decca76524ca3d70117c853a6..77c74edc95b9b1b5616238ff9dadb6133771a107 100644 --- a/modules/consentAdmin/locales/nl/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/nl/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(geen omschrijving)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Service Providers voor" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(naam niet opgegeven)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Hoe verwijdert u toestemmingen</h3> Vinkt u het vakje af dat " diff --git a/modules/consentAdmin/locales/nn/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/nn/LC_MESSAGES/consentAdmin.po index 35aba2cd0132416dc9132c35f2a68444877007c5..dcfd7cba639b552d509c9cf1116c7db5571215ad 100644 --- a/modules/consentAdmin/locales/nn/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/nn/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(mangler informasjon)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Tenesteleverandør for " -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(namn ikkje spesifisert)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Korleis dra tilbake samtykke</h3> Fjern haka i boksen for enkelte " diff --git a/modules/consentAdmin/locales/pt/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/pt/LC_MESSAGES/consentAdmin.po index 0673dcb7e9dd1c3eaaf247d63f1ca414429b80b0..85983c36f722c0a1222a87fc79261f044b969a1b 100644 --- a/modules/consentAdmin/locales/pt/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/pt/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(sem descrição)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Fornecedores de Serviços para" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(nome não especificado)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Como remover o seu consentimento</h3> Retire a marca correspondente " diff --git a/modules/consentAdmin/locales/ro/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/ro/LC_MESSAGES/consentAdmin.po index e83dbf971376c429f7379b9fc77ae4919ba15f93..6c1943bfc757495f46d83fcf2e76732383d62b77 100644 --- a/modules/consentAdmin/locales/ro/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/ro/LC_MESSAGES/consentAdmin.po @@ -55,9 +55,6 @@ msgstr "(fără descriere)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Furnizori de servicii pentru" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(nu a fost specificat numele)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Cum poate fi anulat acordul dumneavoastră</h3>DebifaÈ›i căsuÈ›a " diff --git a/modules/consentAdmin/locales/ru/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/ru/LC_MESSAGES/consentAdmin.po index 9169cfd9130b0f950e37357b677c460e435cff4b..a641ee0e4cc58939b9aef9aea5f0da0a36d8cce7 100644 --- a/modules/consentAdmin/locales/ru/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/ru/LC_MESSAGES/consentAdmin.po @@ -55,9 +55,6 @@ msgstr "(опиÑание отÑутÑтвует)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Ð¡ÐµÑ€Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð²Ð°Ð¹Ð´ÐµÑ€Ñ‹ длÑ" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(Ð¸Ð¼Ñ Ð½Ðµ указано)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Как удалить ваше ÑоглаÑие</h3> Снимите выделение Ñ ÑÐµÑ€Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð²Ð°Ð¹Ð´ÐµÑ€Ð° " diff --git a/modules/consentAdmin/locales/sl/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/sl/LC_MESSAGES/consentAdmin.po index 7afe72a12de1174e0cd4acc94ccc563b8b1e32cb..915d1669df449f9c89a576b2a8e74040ad42808c 100644 --- a/modules/consentAdmin/locales/sl/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/sl/LC_MESSAGES/consentAdmin.po @@ -55,9 +55,6 @@ msgstr "(brez opisa)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Ponudniki storitev za" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(brez naziva)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Kako razveljavim dano privolitev?</h3> Odstranite kljukico pred " diff --git a/modules/consentAdmin/locales/sr/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/sr/LC_MESSAGES/consentAdmin.po index 5cd0b78871f939ea3419e2bbbec6906e409f6d5a..6099ce86fc2b0291084bfe30dc98fda6b3834e51 100644 --- a/modules/consentAdmin/locales/sr/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/sr/LC_MESSAGES/consentAdmin.po @@ -55,9 +55,6 @@ msgstr "(nema opisa)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Davaoci Servisa za" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(ime nije specificirano)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Kako obrisati dozvolu</h3> Uklonite kvaÄicu iz polja koje se odnosi " diff --git a/modules/consentAdmin/locales/sv/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/sv/LC_MESSAGES/consentAdmin.po index d825178b11084d6263753a422eb21332b9754a23..6777d22f6b70fbd554d3866d917683109ca50dea 100644 --- a/modules/consentAdmin/locales/sv/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/sv/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(ingen beskrivning)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "Tjänsteleverantörer för" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(namn ej angivet)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>Hur du tar bort ditt samtycke</h3> Ta bort markeringen i rutan " diff --git a/modules/consentAdmin/locales/zh-tw/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/zh-tw/LC_MESSAGES/consentAdmin.po index b7d2e43bea97dfd1f6777ed056b0f36662932f44..79766547053c53e48b0d5ad4390f0e4893e05be0 100644 --- a/modules/consentAdmin/locales/zh-tw/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/zh-tw/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(ç„¡æè¿°)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "æœå‹™æ供者的" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(未定義å稱)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>在這刪除您的授權</h3> å–消勾é¸æœå‹™æ供者å°æ‡‰çš„æ ¸å–方塊 <h3>連çµ</h3> <ul> <li><a " diff --git a/modules/consentAdmin/locales/zh/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/zh/LC_MESSAGES/consentAdmin.po index 0a3b247785351bba5d0793d8c792aa76bcd5fbfa..ab6ab8d229baa7f56d50013f391ffb47c212f4e6 100644 --- a/modules/consentAdmin/locales/zh/LC_MESSAGES/consentAdmin.po +++ b/modules/consentAdmin/locales/zh/LC_MESSAGES/consentAdmin.po @@ -54,9 +54,6 @@ msgstr "(没有æ述)" msgid "{consentAdmin:consentadmin:service_providers_for}" msgstr "æœåŠ¡æ供商æœåŠ¡äºŽ" -msgid "{consentAdmin:consentadmin:sp_empty_name}" -msgstr "(没有指定åå—)" - msgid "{consentAdmin:consentadmin:consentadmin_description2}" msgstr "" "<h3>å¦‚ä½•åˆ é™¤ä½ çš„è®¸å¯</h3>å选相应的SP选择框<h3>Links</h3> <ul> <li><a " diff --git a/modules/consentAdmin/templates/consentadmin.php b/modules/consentAdmin/templates/consentadmin.php index b0a5b21bd5bdcb84961e9316b09c6748a6d00363..b9bc74667a0b53dbee2af90fee0fdf7126a7e7d1 100644 --- a/modules/consentAdmin/templates/consentadmin.php +++ b/modules/consentAdmin/templates/consentadmin.php @@ -1,7 +1,8 @@ -<?php - $this->data['head'] = '<link rel="stylesheet" type="text/css" href="'.SimpleSAML\Module::getModuleURL("consentAdmin/assets/css/consentAdmin.css").'" />'."\n"; - $this->data['head'] .= '<script type="text/javascript" src="'.SimpleSAML\Module::getModuleURL("consentAdmin/assets/js/consentAdmin.js").'"></script>'; - $this->data['head'] .= '<script type="text/javascript" src="'.SimpleSAML\Module::getModuleURL("consentAdmin/assets/js/consentSimpleAjax.js").'"></script>'; +<?php + $this->data['head'] = '<link rel="stylesheet" type="text/css" href="'. + SimpleSAML\Module::getModuleURL("consentAdmin/assets/css/consentAdmin.css").'" />'."\n"; + $this->data['head'] .= '<script type="text/javascript" src="'. + SimpleSAML\Module::getModuleURL("consentAdmin/assets/js/consentAdmin.js").'"></script>'; // default theme $this->includeAtTemplateBase('includes/header.php'); ?> @@ -13,7 +14,7 @@ <table> <tr> <th width="80%"><?php echo $this->t('{consentAdmin:consentadmin:service_provider_header}') ?></th> - <th width="140"><?php echo $this->t('{consentAdmin:consentadmin:status_header}') ?></th> + <th><?php echo $this->t('{consentAdmin:consentadmin:status_header}') ?></th> </tr> <?php $spList = $this->data['spList']; @@ -22,14 +23,13 @@ $hide_text = $this->t('{consentAdmin:consentadmin:hide}'); $attributes_text = $this->t('{consentAdmin:consentadmin:attributes_text}'); foreach ($spList as $spName => $spValues) { - $this->getTranslator()->includeInlineTranslation('spname', $spValues['name']); - $this->getTranslator()->includeInlineTranslation('spdescription', $spValues['description']); if (!is_null($spValues['serviceurl'])) { - $htmlSpName = '<a href="'.$spValues['serviceurl'].'" style="color: black; font-weight: bold;">'.htmlspecialchars($this->t('spname', array(), false, true)).'</a>'; + $htmlSpName = '<a class="serviceUrl" href="'.$spValues['serviceurl'].'">'. + htmlspecialchars($spValues['name']).'</a>'; } else { - $htmlSpName = htmlspecialchars($this->t('spname', array(), false, true)); + $htmlSpName = htmlspecialchars($spValues['name']); } - $spDescription = htmlspecialchars($this->t('spdescription', array(), false, true)); + $spDescription = htmlspecialchars($spValues['description']); $checkedAttr = $spValues['consentStatus'] == 'ok' ? 'checked="checked"' : ''; $consentValue = $spValues['consentValue']; $consentText = $spValues['consentStatus'] == 'changed' ? "attributes has changed" : ""; @@ -38,8 +38,11 @@ <tr class="$row_class"> <td> <table> - <tr class="$row_class"><td><span class='caSPName'><span title='$spDescription'>$htmlSpName</span> <span style="font-size: 80%;"onclick="javascript:toggleShowAttributes('$show_spid');"><span id='showing_$show_spid'>$show_text</span><span id='hiding_$show_spid' style='display:none;'>$hide_text</span>$attributes_text</span></span></td></tr> - <tr><td colspan="2" class="caAttributes"><div id="attributes_$show_spid" style="display: none;"> + <tr class="$row_class"> + <td><span class='caSPName'><span title='$spDescription'>$htmlSpName</span>  + <span class="show_hide" id="show_hide_$show_spid"><span id='showing_$show_spid'>$show_text</span> + <span id='hiding_$show_spid'>$hide_text</span> $attributes_text</span></span></td></tr> + <tr><td colspan="2" class="caAttributes"><div id="attributes_$show_spid"> TRSTART; $attributes = $spValues['attributes_by_sp']; if ($this->data['showDescription']) { @@ -47,12 +50,7 @@ TRSTART; } echo "\n<ul>\n"; foreach ($attributes as $name => $value) { - - if (isset($this->data['attribute_'.htmlspecialchars(strtolower($name))])) { - $name = $this->data['attribute_'.htmlspecialchars(strtolower($name))]; - } - $name = $this->getTranslator()->getAttributeTranslation($name); // translate - if (sizeof($value) > 1) { + if (sizeof($value) > 1) { echo "<li>".htmlspecialchars($name).":\n<ul>\n"; foreach ($value as $v) { echo '<li>'.htmlspecialchars($v)."</li>\n"; @@ -68,7 +66,9 @@ TRSTART; </table> </td> -<td class='caAllowed'><input onclick="javascript:checkConsent(this.value, $show_spid, this.checked)" value='$consentValue' type='checkbox' $checkedAttr /><span id="consentText$show_spid">$consentText</span></td> +<td class='caAllowed'> + <input id="checkbox_$show_spid" class="checkbox" value='$consentValue' type='checkbox' $checkedAttr /> + <span id="consentText_$show_spid">$consentText</span></td> TRSTART; echo "</tr>\n"; $show_spid++; @@ -80,7 +80,11 @@ TRSTART; <?php echo $this->t('{consentAdmin:consentadmin:consentadmin_description2}') ?> </p> <h2>Logout</h2> - - <p><a href="<?php echo \SimpleSAML\Module::getModuleURL('consentAdmin/consentAdmin.php', array('logout' => 1)); ?>">Logout</a></p> + <p> + <a href=" + <?php + echo \SimpleSAML\Module::getModuleURL('consentAdmin/consentAdmin.php', array('logout' => 1)); + ?>">Logout</a> + </p> <?php $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/consentAdmin/templates/consentadmin.twig b/modules/consentAdmin/templates/consentadmin.twig new file mode 100644 index 0000000000000000000000000000000000000000..d27b8a63d399432c22585deb97e35d6aa7f54156 --- /dev/null +++ b/modules/consentAdmin/templates/consentadmin.twig @@ -0,0 +1,82 @@ +{% set pagetitle = '{consentAdmin:consentadmin:consentadmin_header}'|trans %} +{% extends "base.twig" %} + +{% block preload %} +<link rel="stylesheet" type="text/css" href="{{ basepathurl }}assets/css/consentAdmin.css" /> +{% endblock %} + +{% block postload %} +<script src="{{ baseurlpath }}assets/js/consentAdmin.js"></script> +{% endblock %} + +{% block content %} + +<h2>{{ '{consentAdmin:consentadmin:consentadmin_header}'|trans }}</h2> +<p>{{ '{consentAdmin:consentadmin:consentadmin_description1}'|trans }}</p> + +<table> + <tr> + <th colspan="2" width="80%">{{ '{consentAdmin:consentadmin:service_provider_header}'|trans }}</th> + <th width="140">{{ '{consentAdmin:consentadmin:status_header}'|trans }}</th> + </tr> + +{% for spName, spValues in spList %} + + {% if loop.index0 % 2 == 0 %} + {% set rowClass = 'row0' %} + {% else %} + {% set rowClass = 'row1' %} + {% endif %} + + <tr class="{{ rowClass }}"> + <td> + <span class='caSPName'> + <span title='{{ spValues.description|escape('html') }}'> + {% if spValues.serviceurl is defined %} + {{ spValues.name|escape('html') }} + {% else %} + <a class="serviceUrl" href="{{ spValues.serviceurl }}">{{ spValues.name|escape('html') }}</a> + {% endif %} + </span> + <span class="show_hide" id="show_hide_{{ loop.index0 }}"> + <span id="showing_{{ loop.index0 }}">{{ '{consentAdmin:consentadmin:show}'|trans }}</span> + <span id="hiding_{{ loop.index0 }}">{{ '{consentAdmin:consentadmin:hide}'|trans }}</span> + {{ '{consentAdmin:consentadmin:attributes_text}'|trans }} + </span> + </span> + </td> + <td class="caAttributes"> + <div id="attributes_{{ loop.index0 }}"> + {% if showDescription %} + <p>{{ '{consentAdmin:consentadmin:consentadmin_purpose}'|trans }}{{ spValues.description|escape('html') }}</p> + {% endif %} + <ul> + {% for attrName, attrValue in spValues.attributes_by_sp %} + {% if attrValue|length > 1 %} + <li>{{ attrName|escape('html') }}: + <ul> + {% for valKey, value in attrValue %} + <li>{{ value|escape('html') }}</li> + {% endfor %} + </ul> + </li> + {% else %} + <li>{{ attrName|escape('html') }}: {{ attrValue|first|escape('html') }}</li> + {% endif %} + {% endfor %} + </ul> + </div> + </td> + <td class="caAllowed"> + <input class="checkbox" id="checkbox_{{ loop.index0 }}" value='{{ spValues.consentValue }}' type='checkbox'{% if spValues.consentStatus == 'ok'%} checked="checked"{% endif %} /><span id="consentText_{{ loop.index0 }}">{% if spValues.consentStatus == 'changed' %}attributes has changed{% endif %}</span> + </td> + </tr> +{% endfor %} +</table> + +<p>{{ '{consentAdmin:consentadmin:consentadmin_description2}'|trans|raw }}</p> + +<h2>Logout</h2> +<p><a href="{{ baseurlpath }}consentAdmin.php?logout=1">Logout</a></p> + +{% endblock %} diff --git a/modules/consentAdmin/templates/consentadminajax.php b/modules/consentAdmin/templates/consentadminajax.php index f6d54c72dba3b5641842f0798d8cdd967714430c..c8520b085576ddfdde6850fd8920f5566a022d2d 100644 --- a/modules/consentAdmin/templates/consentadminajax.php +++ b/modules/consentAdmin/templates/consentadminajax.php @@ -1,2 +1,2 @@ -<?php +<?php echo $res; diff --git a/modules/consentAdmin/www/assets/css/consentAdmin.css b/modules/consentAdmin/www/assets/css/consentAdmin.css index 86735025420d0b54880d7d0971d430b12c6200a9..94c4a190c4c796224a8ad9a7c9ed4b6449552a9f 100644 --- a/modules/consentAdmin/www/assets/css/consentAdmin.css +++ b/modules/consentAdmin/www/assets/css/consentAdmin.css @@ -20,3 +20,20 @@ tr.row1 td { a.orange { color: #ffd633; } + +span.show_hide { + font-size: 80%; +} + +a.serviceUrl { + color: black; + font-weight: bold; +} + +span[id^='hiding_'], span[id*='hiding_'] { + display: none; +} + +div[id^='attributes_'], div[id*='attributes_'] { + display: none; +} diff --git a/modules/consentAdmin/www/assets/js/consentAdmin.js b/modules/consentAdmin/www/assets/js/consentAdmin.js index cfe0fb71ae4148f0e12cef49453901896b67d971..59cf4e17b4bbf471ed32249df7df163e45be1368 100644 --- a/modules/consentAdmin/www/assets/js/consentAdmin.js +++ b/modules/consentAdmin/www/assets/js/consentAdmin.js @@ -1,3 +1,79 @@ -function setConsentText(consentStatus, show_spid) { - document.getElementById("consentText" + show_spid).innerHTML = consentStatus; +var xmlHttp; + +function checkConsent() +{ + var show_spid = this.id.charAt(this.id.length-1); + var checkbox = document.getElementById("checkbox_"+show_spid); + + xmlHttp = GetXmlHttpObject() + if (xmlHttp == null) { + alert("Browser does not support HTTP Request") + return + } + + var url = "consentAdmin.php" + url = url+"?cv="+checkbox.value + url = url+"&action="+checkbox.checked + url = url+"&sid="+Math.random() + + xmlHttp.onreadystatechange = function () { + if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete") { + document.getElementById("consentText_" + show_spid).innerHTML = xmlHttp.responseText; + } + } + + xmlHttp.open("GET", url, true) + xmlHttp.send(null) } + +// This function creates an XMLHttpRequest +function GetXmlHttpObject() +{ + var xmlHttp = null; + try { + // Firefox, Opera 8.0+, Safari + xmlHttp = new XMLHttpRequest(); + } catch (e) { + //Internet Explorer + try { + xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); + } + } + return xmlHttp; +} + +function toggleShowAttributes() +{ + var show_spid = this.id.charAt(this.id.length-1); + + var disp = document.getElementById('attributes_' + show_spid); + var showing = document.getElementById('showing_' + show_spid); + var hiding = document.getElementById('hiding_' + show_spid); + + disp.style.display = (disp.style.display == 'none' ? 'block' : 'none'); + showing.style.display = (disp.style.display == 'none' ? 'inline' : 'none'); + hiding.style.display = (disp.style.display == 'none' ? 'none' : 'inline'); +} + +document.addEventListener( + 'DOMContentLoaded', + function () { + var show_hide = document.getElementsByClassName("show_hide"); + for (var i = 0; i < show_hide.length; i++) { + show_hide[i].addEventListener( + 'click', + toggleShowAttributes + ); + } + + var checkbox = document.getElementsByClassName("checkbox"); + for (var i = 0; i < checkbox.length; i++) { + checkbox[i].addEventListener( + 'click', + checkConsent + ); + } + } +); diff --git a/modules/consentAdmin/www/assets/js/consentSimpleAjax.js b/modules/consentAdmin/www/assets/js/consentSimpleAjax.js deleted file mode 100644 index 7ea896c630fa05a2f269330d63f7d70a4837232f..0000000000000000000000000000000000000000 --- a/modules/consentAdmin/www/assets/js/consentSimpleAjax.js +++ /dev/null @@ -1,70 +0,0 @@ -var xmlHttp; - -function checkConsent(consentValue, show_spid, checkAction) -{ - xmlHttp=GetXmlHttpObject() - if (xmlHttp==null) { - alert ("Browser does not support HTTP Request") - - return - } - - var url="consentAdmin.php" - url=url+"?cv="+consentValue - url=url+"&action="+checkAction - url=url+"&sid="+Math.random() - xmlHttp.onreadystatechange=function() { - if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") - { - setConsentText(xmlHttp.responseText, show_spid); - } -} - - xmlHttp.open("GET",url,true) - xmlHttp.send(null) -} - -// This function will be automaticly called when the Ajax call is done returning data -function stateChanged() { - if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") - { - //Alert("Status of consent:" + xmlHttp.responseText ); - } -} - -// This function creates an XMLHttpRequest -function GetXmlHttpObject() { - var xmlHttp=null; - try - { - // Firefox, Opera 8.0+, Safari - xmlHttp=new XMLHttpRequest(); - } - catch (e) - { - //Internet Explorer - try - { - xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); - } - catch (e) - { - xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); - } - } - - return xmlHttp; -} - -function toggleShowAttributes(show_spid) { - var disp = document.getElementById('attributes_' + show_spid); - //var showhide = document.getElementById('showhide_' + show_spid); - var showing = document.getElementById('showing_' + show_spid); - var hiding = document.getElementById('hiding_' + show_spid); - - disp.style.display = (disp.style.display == 'none' ? 'block' : 'none'); - //showhide.innerHTML = (disp.style.display == 'none' ? 'Show' : 'Hide') - showing.style.display = (disp.style.display == 'none' ? 'inline' : 'none'); - hiding.style.display = (disp.style.display == 'none' ? 'none' : 'inline'); - //alert('hiding display'+hiding.display); -} diff --git a/modules/consentAdmin/www/consentAdmin.php b/modules/consentAdmin/www/consentAdmin.php index 5477786c3951eba333d4cdf95f487259257f895a..8591a9c62cb9a2e1813c3161d48a1c644856769d 100644 --- a/modules/consentAdmin/www/consentAdmin.php +++ b/modules/consentAdmin/www/consentAdmin.php @@ -24,8 +24,7 @@ function driveProcessingChain( $userid, $hashAttributes = false, $excludeAttributes = array() -) -{ +) { /* * Create a new processing chain */ @@ -122,7 +121,11 @@ if ($as->getAuthData('saml:sp:IdP') !== null) { } // Get user ID -$userid_attributename = (isset($idp_metadata['userid.attribute']) && is_string($idp_metadata['userid.attribute'])) ? $idp_metadata['userid.attribute'] : 'eduPersonPrincipalName'; +if (isset($idp_metadata['userid.attribute']) && is_string($idp_metadata['userid.attribute'])) { + $userid_attributename = $idp_metadata['userid.attribute']; +} else { + $userid_attributename = 'eduPersonPrincipalName'; +} $userids = $attributes[$userid_attributename]; @@ -150,7 +153,7 @@ if (!empty($_GET['action'])) { // Remove services, whitch have consent disabled if (isset($idp_metadata['consent.disable'])) { - foreach ($idp_metadata['consent.disable'] AS $disable) { + foreach ($idp_metadata['consent.disable'] as $disable) { if (array_key_exists($disable, $all_sp_metadata)) { unset($all_sp_metadata[$disable]); } @@ -168,14 +171,26 @@ $hashed_user_id = \SimpleSAML\Module\consent\Auth\Process\Consent::getHashedUser // If a checkbox have been clicked if ($action !== null && $sp_entityid !== null) { // init template to enable translation of status messages - $template = new \SimpleSAML\XHTML\Template($config, 'consentAdmin:consentadminajax.php', 'consentAdmin:consentadmin'); + $template = new \SimpleSAML\XHTML\Template( + $config, + 'consentAdmin:consentadminajax.php', + 'consentAdmin:consentadmin' + ); // Get SP metadata $sp_metadata = $metadata->getMetaData($sp_entityid, 'saml20-sp-remote'); // Run AuthProc filters - list($targeted_id, $attribute_hash, $attributes_new) = driveProcessingChain($idp_metadata, $source, $sp_metadata, - $sp_entityid, $attributes, $userid, $hashAttributes, $excludeAttributes); + list($targeted_id, $attribute_hash, $attributes_new) = driveProcessingChain( + $idp_metadata, + $source, + $sp_metadata, + $sp_entityid, + $attributes, + $userid, + $hashAttributes, + $excludeAttributes + ); // Add a consent (or update if attributes have changed and old consent for SP and IdP exists) if ($action == 'true') { @@ -219,7 +234,7 @@ $template_sp_content = array(); $template = new \SimpleSAML\XHTML\Template($config, 'consentAdmin:consentadmin.php', 'consentAdmin:consentadmin'); $translator = $template->getTranslator(); $translator->includeLanguageFile('attributes'); // attribute listings translated by this dictionary -$sp_empty_name = $translator->getTag('sp_empty_name'); + $sp_empty_description = $translator->getTag('sp_empty_description'); // Process consents for all SP @@ -228,8 +243,27 @@ foreach ($all_sp_metadata as $sp_entityid => $sp_values) { $sp_metadata = $metadata->getMetaData($sp_entityid, 'saml20-sp-remote'); // Run attribute filters - list($targeted_id, $attribute_hash, $attributes_new) = driveProcessingChain($idp_metadata, $source, $sp_metadata, - $sp_entityid, $attributes, $userid, $hashAttributes, $excludeAttributes); + list($targeted_id, $attribute_hash, $attributes_new) = driveProcessingChain( + $idp_metadata, + $source, + $sp_metadata, + $sp_entityid, + $attributes, + $userid, + $hashAttributes, + $excludeAttributes + ); + + // Translate attribute-names + foreach ($attributes_new as $orig_name => $value) { + if (isset($template->data['attribute_'.htmlspecialchars(strtolower($orig_name))])) { + $old_name = $template->data['attribute_'.htmlspecialchars(strtolower($orig_name))]; + } + $name = $translator->getAttributeTranslation(strtolower($orig_name)); // translate + + $attributes_new[$name] = $value; + unset($attributes_new[$orig_name]); + } // Check if consent exists if (array_key_exists($targeted_id, $user_consent)) { @@ -255,7 +289,7 @@ foreach ($all_sp_metadata as $sp_entityid => $sp_values) { } elseif (isset($sp_values['OrganizationDisplayName']) && is_array($sp_values['OrganizationDisplayName'])) { $sp_name = $sp_metadata['OrganizationDisplayName']; } else { - $sp_name = $sp_empty_name; + $sp_name = $sp_entityid; } } @@ -269,6 +303,13 @@ foreach ($all_sp_metadata as $sp_entityid => $sp_values) { // Add a URL to the service if present in metadata $sp_service_url = isset($sp_metadata['ServiceURL']) ? $sp_metadata['ServiceURL'] : null; + // Translate SP name and description + $translator->includeInlineTranslation('spname', $sp_name); + $translator->includeInlineTranslation('spdescription', $sp_description); + + $sp_name = $translator->getPreferredTranslation($translator->getTag('spname')); + $sp_description = $translator->getPreferredTranslation($translator->getTag('spdescription')); + // Fill out array for the template $sp_list[$sp_entityid] = array( 'spentityid' => $sp_entityid, diff --git a/modules/core/dictionaries/frontpage.definition.json b/modules/core/dictionaries/frontpage.definition.json index c470b5ba82bed86ce9c485f8b80fa007fe5b574f..bb5b229a8b7548462dcc06fb8cf08a0013b01715 100644 --- a/modules/core/dictionaries/frontpage.definition.json +++ b/modules/core/dictionaries/frontpage.definition.json @@ -17,12 +17,6 @@ "checkphp": { "en": "Checking your PHP installation" }, - "about_header": { - "en": "About SimpleSAMLphp" - }, - "about_text": { - "en": "This SimpleSAMLphp thing is pretty cool, where can I read more about it? You can find more information about it at the <a href=\"https:\/\/simplesamlphp.org\/\">SimpleSAMLphp web page <\/a> over at <a href=\"http:\/\/uninett.no\">UNINETT<\/a>." - }, "required": { "en": "Required" }, @@ -137,6 +131,9 @@ "loggedin_as_admin": { "en": "You are logged in as administrator" }, + "logout": { + "en": "Logout" + }, "auth": { "en": "Authentication" }, diff --git a/modules/core/dictionaries/frontpage.translation.json b/modules/core/dictionaries/frontpage.translation.json index 13337fd263ec07c09c334032650f68ef4bc73a41..0cb5eed172acb3f95e6c212331a4e31ddc3025c4 100644 --- a/modules/core/dictionaries/frontpage.translation.json +++ b/modules/core/dictionaries/frontpage.translation.json @@ -174,76 +174,6 @@ "ro": "Verificarea instal\u0103rii PHP", "el": "\u0388\u03bb\u03b5\u03b3\u03c7\u03bf\u03c2 \u03b5\u03b3\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7\u03c2 PHP" }, - "about_header": { - "no": "Om SimpleSAMLphp", - "nn": "Om SimpleSAMLphp", - "sv": "Om SimpleSAMLphp", - "es": "Sobre SimpleSAMLphp", - "fr": "\u00c0 propos de SimpleSAMLphp", - "de": "\u00dcber SimpleSAMLphp", - "nl": "Over SimpleSAMLphp", - "lb": "Iwwert SimpleSAMLphp", - "sl": "O SimpleSAMLphp", - "da": "Om SimpleSAMLphp", - "hr": "O programskom alatu SimpleSAMLphp", - "hu": "A SimpleSAMLphp-r\u00f3l b\u0151vebben", - "fi": "SimpleSAMLphp:st\u00e4", - "pt-br": "Sobre o SimpleSAMLphp", - "pt": "Sobre o SimpleSAMLphp", - "pl": "O SimpleSAMLphp", - "cs": "O aplikaci SimpleSAMLphp", - "eu": "SimpleSAMLphp-ari buruz", - "tr": "SimpleSAMLphp hakk\u0131nda", - "it": "A proposito di SimpleSAMLphp", - "lt": "Apie SimpleSAMLphp", - "ja": "SimpleSAMLphp \u306b\u3064\u3044\u3066", - "zh-tw": "\u6709\u95dc SimpleSAMLphp", - "ru": "\u041e SimpleSAMLphp", - "et": "Teave SimpleSAMLphp kohta", - "he": "\u05d0\u05d5\u05d3\u05d5\u05ea SimpleSAMLphp", - "zh": "\u5173\u4e8eSimpleSAMLphp", - "ar": "\u0639\u0646 SimpleSAMLphp", - "id": "Tentang SimpleSAMLphp", - "lv": "Par SimpleSAMLphp", - "sr": "O SimpleSAMLphp-u", - "ro": "Despre SimpleSAMLphp", - "el": "\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5 \u03c4\u03bf SimpleSAMLphp" - }, - "about_text": { - "no": "Yey! SimpleSAMLphp virker jammen kult, hvor kan jeg finne ut mer om det? Du kan lese mer om SimpleSAMLphp p\u00e5 <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp sin hjemmeside<\/a>.", - "nn": "Yey! SimpleSAMLphp er jammen kult, kvar finn eg ut meir? Du kan lesa meir om SimpleSAMLphp p\u00e5 <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">heimesida til SimpleSAMLphp<\/a>.", - "sv": "SimpleSAMLphp \u00e4r cool, var kan jag l\u00e4sa mer om det? Du kan hitta mer information om <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp p\u00e5 Feide RnD blogg<\/a> hos <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "es": "¡Eh! Esto de SimpleSAMLphp es interesante, ¿dónde puedo averiguar más? Puedes encontrar más información en la <a href=\"https:\/\/simplesamlphp.org\/\">página web de SimpleSAMLphp<\/a>, en <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "fr": "Ce logiciel SimpleSAMLphp est plut\u00f4t sympa, o\u00f9 puis-je en lire plus \u00e0 son sujet? Vous trouverez plus d'informations sur <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp sur le blog de la R&D de Feide<\/a> sur <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "de": "Hey, dieses SimpleSAMLphp ist eine ziemlich coole Sache, wo kann ich mehr dar\u00fcber lesen? Sie finden mehr Informationen \u00fcber <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp auf dem Feide RnD blog<\/a> auf <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "nl": "H\u00e9, dat SimpleSAMLphp dingetje is vet cool, waar kan ik er meer over vinden? Je kan meer informatie over <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp<\/a> vinden op de Feide RnD blog van <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "lb": "Desen SimpleSAMLphp system as nach ew\u00ebll d\u00ebcken Gas, wou kann ech m\u00e9i doriwwer gewuer gin? Mei Informatiounen iwer <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp at the Feide RnD blog<\/a> op <a href=\"http:\/\/uninett.no\">UNINETT<\/a>", - "sl": "Da! SimpleSAMLphp je zares kul! Kje si lahko preberem kaj ve\u010d o tem? Dodatne informacije se nahajajo na <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp Feide RnD blogu<\/a>.", - "da": "Yes, det er cool! Hvor kan jeg l\u00e6se mere om det? G\u00e5 til <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp's hjemmeside<\/a>", - "hr": "Vi\u0161e informacija o programskom alatu SimpleSAMLphp mo\u017eete prona\u0107i na <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp stranici Feide RnD bloga<\/a>.", - "hu": "Ez a SimpleSAMLphp-dolog nagyon hasznos, hol olvashatn\u00e9k t\u00f6bbet r\u00f3la? Tov\u00e1bbi inform\u00e1ci\u00f3kat a <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\"> Feide RnD SimpleSAMLphp-r\u00f3l sz\u00f3l\u00f3 blogj\u00e1ban <\/a> tal\u00e1lhat a <a href=\"http:\/\/uninett.no\">UNINETT-en<\/a>.", - "fi": "T\u00e4\u00e4 simpleSAMPphp on aiga magee, mutta mist\u00e4 voin lukea enemm\u00e4n asiasta? L\u00f6yd\u00e4t enemm\u00e4n tietoa <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp blogista Feide RnD:ll\u00e4<\/a> <a href=\"http:\/\/uninett.no\">UNINETT<\/a>issa.", - "pt-br": "Este SimpleSAMLphp \u00e9 uma coisa muito legal, onde posso ler mais sobre isso? Voc\u00ea pode encontrar mais informa\u00e7\u00f5es sobre o <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp no blog de Feide RnD<\/a> durante a <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "pt": "Pode encontrar mais informa\u00e7\u00e3o sobre o <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp no blog da Feide RnD<\/a> em <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "pl": "Ten SimpleSAMLphp jest niez\u0142y, gdzie mog\u0119 poczyta\u0107 o tym? Mo\u017cesz znale\u017a\u0107 wi\u0119cej informacji o <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp na blogu Feide RnD<\/a> oraz na stronie <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "cs": "Tato vlastnost SimpleSAMLphp je velmi p\u011bkn\u00e1, kde se o n\u00ed mohu do\u010d\u00edst v\u00edce? Dal\u0161\u00ed informace o SimpleSAMLphp z\u00edsk\u00e1te <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">na blogu Feide RnD<\/a> na <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "tr": "Bu SimpleSAMLphp olduk\u00e7a iyiymi\u015f, daha fazla bilgiyi nereden okuyabilirim? <a href=\"http:\/\/uninett.no\">UNINETT<\/a> \u00fczerinde <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">Feide RnD blog'unda SimpleSAMLphp <\/a> hakk\u0131nda daha fazlas\u0131n\u0131 bulabilirsiniz.", - "it": "Questo SimpleSAMLphp è davvero un bel prodotto, dove trovo ulteriori informazioni a riguardo? Puoi trovare maggiori informazioni su <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp nel Blog di Feide RnD<\/a> oltre che <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "lt": "\u0160is SimpleSAMLphp dalykas yra gana puikus, kur gal\u0117\u010diau daugiau apie j\u012f paskaityti? Daugiau informacijos apie <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp galite rasti Feide RnD blog'e<\/a> bei <a href=\"http:\/\/uninett.no\">UNINETT<\/a> svetain\u0117je.", - "ja": "\u3053\u306e SimpleSAMLphp \u306f\u7d20\u6674\u3089\u3057\u3044\u3082\u306e\u3067\u3059\u3002\u3053\u308c\u4ee5\u4e0a\u306e\u8aac\u660e\u304c\u5728\u308a\u307e\u3059\u304b\uff1f\u3053\u3061\u3089\u306e\u30ea\u30f3\u30af\u3067\u66f4\u306a\u308b\u60c5\u5831\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059 <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp at the Feide RnD blog<\/a>", - "zh-tw": "\u89ba\u5f97 SimpleSAMLphp \u9084\u883b\u9177\u7684\u561b\uff0c\u5728\u54ea\u53ef\u4ee5\u627e\u5230\u66f4\u591a\u76f8\u95dc\u8cc7\u8a0a\u5462\uff1f\u4f60\u53ef\u4ee5\u5728\u4e0b\u5217\u7db2\u5740\u627e\u5230\u66f4\u591a\u76f8\u95dc\u8cc7\u8a0a\uff0c\u65bc <a href=\"http:\/\/uninett.no\">UNINETT<\/a> \u7684 <a href=\"https:\/\/simplesamlphp.org\/\">SimpleSAMLphp<\/a>", - "ru": "SimpleSAMLphp - \u0432\u0435\u0449\u044c \u043a\u043b\u0430\u0441\u0441\u043d\u0430\u044f, \u0433\u0434\u0435 \u044f \u043c\u043e\u0433\u0443 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c? \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp \u0432 \u0431\u043b\u043e\u0433\u0435 Feide RnD<\/a> \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430 <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "et": "See SimpleSAMLphp on p\u00e4ris \u00e4ge! Kust ma saaks selle kohta t\u00e4psemalt lugeda? Rohkem infot leiad <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp blogist<\/a>, mis asub <a href=\"http:\/\/uninett.no\">UNINETT<\/a>-is.", - "he": "\u05d4-SimpleSAMLphp \u05d4\u05d6\u05d4 \u05d4\u05d5\u05d0 \u05de\u05d4 \u05d6\u05d4 \u05de\u05d2\u05e0\u05d9\u05d1, \u05d0\u05d9\u05dd\u05d4 \u05d0\u05e0\u05d9 \u05d9\u05db\u05d5\u05dc \u05dc\u05e7\u05e8\u05d5\u05d0 \u05d9\u05d5\u05ea\u05e8 \u05e2\u05dc\u05d9\u05d5?\u05d0\u05ea\u05d4 \u05d9\u05db\u05d5\u05dc \u05dc\u05de\u05e6\u05d5\u05d0 \u05de\u05d9\u05d3\u05e2 \u05e0\u05d5\u05e1\u05e3 \u05d1- <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\"> SimpleSAMLphp \u05d1 Feide \u05d1\u05d1\u05dc\u05d5\u05d2 \u05d4\u05e4\u05d9\u05ea\u05d5\u05d7 \u05e9\u05dc \u05e9\u05e0\u05de\u05e6\u05d0 \u05d1- <a href=\"http:\/\/uninett.no\">UNINETT<\/a>. ", - "zh": "\u662f\u4e0d\u662f\u89c9\u5f97SimpleSAMLphp\u5f88\u9177\uff1f\u6211\u5728\u54ea\u91cc\u80fd\u627e\u5230\u66f4\u591a\u8d44\u6599\u5462\uff1f\u4f60\u53ef\u4ee5\u5728\u4e0b\u5217\u7f51\u5740\u627e\u5230\u66f4\u591a\u4fe1\u606f\uff1a <a href=\"http:\/\/uninett.no\">UNINETT<\/a> \u7684 <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp at the Feide RnD \u5f00\u53d1\u8005\u535a\u5ba2<\/a>", - "ar": "\u0644\u0644\u0645\u0632\u064a\u062f \u0639\u0646 SimpleSAMLphp \u0627\u0630\u0647\u0628 \u0627\u0644\u064a<a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp \u0628\u0645\u062f\u0648\u0646\u0629 Feide RnD <\/a> over at <a href=\"http:\/\/uninett.no\">UNINETT<\/a>", - "lv": "SimpleSAMLphp ir baigi for\u0161s, kur par to var palas\u012bt vair\u0101k? Vair\u0101k inform\u0101cijas ir <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp Feide RnD blog\u0101<\/a> pie <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "id": "SimpleSAMLphp sangat menarik, dimana Saya bisa membaca lebih jauh tentang hal ini ? Anda dapat mencari informasi lebih jauh tentang <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp pada blog Feide RnD<\/a> ke arah <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "sr": "SimpleSAMLphp je veoma kul, gde mogu da pro\u010ditam vi\u0161e o njemu? Vi\u0161e informacija o SimpleSAMLphp-u mo\u017eete prona\u0107i na <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp stranici Feide RnD bloga<\/a>.", - "ro": "Acest SimpleSAMLphp este interesant, unde pot g\u0103si mai multe informa\u021bii ? Pute\u021bi g\u0103si mai multe informa\u021bii despre <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\"> la blog-ul Feide despre SimpleSAMLphp<\/a> de la <a href=\"http:\/\/uninett.no\">UNINETT<\/a>.", - "eu": "SimpleSAMLphp-en kontu hau interesgarria da benetan, non bila nezake informazio gehiago honen inguruan? <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">SimpleSAMLphp Feideren I+G blogeko <a href=\"http:\/\/uninett.no\">UNINETT<\/a>n.", - "el": "\u03a4\u03bf SimpleSAMLphp \u03b5\u03af\u03bd\u03b1\u03b9 \u03c0\u03bf\u03bb\u03cd \u03b5\u03bd\u03b4\u03b9\u03b1\u03c6\u03ad\u03c1\u03bf\u03bd, \u03c0\u03bf\u03cd \u03bc\u03c0\u03bf\u03c1\u03ce \u03bd\u03b1 \u03bc\u03ac\u03b8\u03c9 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b1 \u03b3\u03b9\u0027 \u03b1\u03c5\u03c4\u03cc\u003b \u039c\u03c0\u03bf\u03c1\u03b5\u03af\u03c4\u03b5 \u03bd\u03b1 \u03b2\u03c1\u03b5\u03af\u03c4\u03b5 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 \u03c3\u03c4\u03bf\u03bd <a href=\"http:\/\/rnd.feide.no\/simplesamlphp\">\u03b9\u03c3\u03c4\u03cc\u03c4\u03bf\u03c0\u03bf \u03c4\u03bf\u03c5 SimpleSAMLphp<\/a> \u03c0\u03bf\u03c5 \u03c6\u03b9\u03bb\u03bf\u03be\u03b5\u03bd\u03b5\u03af\u03c4\u03b1\u03b9 \u03b1\u03c0\u03cc \u03c4\u03bf <a href=\"http:\/\/uninett.no\">UNINETT<\/a>." - }, "required": { "no": "P\u00e5krevd", "nn": "Naudsynt", @@ -455,39 +385,39 @@ "el": "\u03a0\u03c1\u03bf\u03b5\u03b9\u03b4\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03b9\u03c2" }, "warnings_https": { - "no": "<strong>Du bruker ikke HTTPS<\/strong> - kryptert kommunikasjon med brukeren. HTTP fungerer utmerket til testform\u00e5l, men i et produksjonsmilj\u00f8 anbefales sterkt \u00e5 skru p\u00e5 sikker kommunikasjon med HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Les mer i dokumentet: SimpleSAMLphp maintenance<\/a> ]", - "nn": "<strong>Du bruker ikkje HTTPS<\/strong> - kryptert kommunikasjon med brukaren. Du kan bruka SimpleSAMLphp uten HTTPS til testform\u00e5l, men dersom du skal bruka SimpleSAMLphp i eit produksjonsmilj\u00f8, vil vi sterkt tilr\u00e5 \u00e5 skru p\u00e5 sikker kommunikasjon med HTTPS. [ Les meir i dokumentet: <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">SimpleSAMLphp maintenance<\/a> ]", - "sv": "<strong>Du anv\u00e4nder inte HTTPS<\/strong> - krypterad kommunikation med anv\u00e4ndaren. HTTP fungerar bra under test men i produktion ska du anv\u00e4nda HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">L\u00e4s mer i dokumentet SimpleSAMLphp maintenance<\/a> ]", + "no": "<strong>Du bruker ikke HTTPS<\/strong> - kryptert kommunikasjon med brukeren. HTTP fungerer utmerket til testform\u00e5l, men i et produksjonsmilj\u00f8 anbefales sterkt \u00e5 skru p\u00e5 sikker kommunikasjon med HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Les mer i dokumentet: SimpleSAMLphp maintenance<\/a> ]", + "nn": "<strong>Du bruker ikkje HTTPS<\/strong> - kryptert kommunikasjon med brukaren. Du kan bruka SimpleSAMLphp uten HTTPS til testform\u00e5l, men dersom du skal bruka SimpleSAMLphp i eit produksjonsmilj\u00f8, vil vi sterkt tilr\u00e5 \u00e5 skru p\u00e5 sikker kommunikasjon med HTTPS. [ Les meir i dokumentet: <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">SimpleSAMLphp maintenance<\/a> ]", + "sv": "<strong>Du anv\u00e4nder inte HTTPS<\/strong> - krypterad kommunikation med anv\u00e4ndaren. HTTP fungerar bra under test men i produktion ska du anv\u00e4nda HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">L\u00e4s mer i dokumentet SimpleSAMLphp maintenance<\/a> ]", "es": "<strong>No est\u00e1 usando HTTPS<\/strong> - comunicaciones cifradas con el usuario. HTTP funciona bien en entornos de evaluaci\u00f3n, pero si va a emplearlo en producci\u00f3n, deber\u00eda emplear HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Lea m\u00e1s acerca del mantenimiento de SimpleSAMLphp <\/a> ]", - "fr": "<strong>Vous n'utilisez pas HTTPS<\/strong> - communications chiffr\u00e9es avec l'utilisateur. Utiliser SimpleSAMLphp marchera parfaitement avec HTTP pour des tests, mais si vous voulez l'utiliser dans un environnement de production, vous devriez utiliser HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">En lire plus sur la maintenance de SimpleSAMLphp<\/a> ]", - "de": "<strong>Sie benutzen keine HTTPS<\/strong> - verschl\u00fcsselte Kommunikation mit dem Nutzer. SimpleSAMLphp funktioniert zum Testen auch mit HTTP problemlos, aber in einer Produktionsumgebung sollten Sie HTTPS benutzen. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Lesen sie mehr \u00fcber die Verwaltung von SimpleSAMLphp<\/a> ]", - "nl": "<strong>Je gebruikt geen HTTPS<\/strong> - versleutelde communicatie met de gebruiker. SimpleSAMLphp werkt prima op HTTP voor testdoeleinden, maar als je SimpleSAMLphp in een productieomgeving gaat gebruiken, zou je dat moeten doen over HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">lees meer over SimpleSAMLphp-onderhoud<\/a> ]", - "lb": "<strong>Der benotzt ken HTTPS<\/strong> - verschl\u00ebsselt Kommunikatioun mat dem Benotzer. SimpleSAMLphp funktion\u00e9iert einwandfr\u00e4i mat HTTP fir Testzw\u00e9ecker mais an engem produktiven Emfeld sollt et besser mat HTTPS lafen. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Liest m\u00e9i iwert Maintenance vun SimpleSAMLphp<\/a> ]", - "sl": "<strong>Ne uporabljate HTTPS<\/strong>-\u0161ifrirane komunikacije. SimpleSAMLphp deluje brez te\u017eav na HTTP, vendar le za testne namene, za uporabo SimpleSAMLphp v produkcijskem okolju uporabite HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Preberite ve\u010d o SimpleSAMLphp vzdr\u017eevanju<\/a> ]", - "da": "<strong>Du benytter ikke HTTPS<\/strong>-krypteret kommunikation med brugeren. SimpleSAMLphp vil fungere uden problemer med HTTP alene, men hvis du anvender systemet i produktionssystemer, anbefales det st\u00e6rkt at benytte sikker kommunikation i form af HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">l\u00e6s mere i dokumentet: SimpleSAMLphp maintenance<\/a> ] ", - "hr": "<strong>Ne koristite HTTPS<\/strong> - kriptiranu komunikaciju s korisnikom. HTTP se mo\u017ee koristiti za potrebe testiranja, ali u produkcijskom okru\u017eenju trebali biste koristiti HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Pro\u010ditajte vi\u0161e o SimpleSAMLphp postavkama<\/a> ]", - "hu": "<strong>Nem HTTPS protokollt haszn\u00e1l<\/strong> - nem titkos\u00edtott a kommunik\u00e1ci\u00f3! HTTP j\u00f3 megold\u00e1s lehet teszt rendszerek eset\u00e9ben, de az \u00e9les rendszerben lehet\u0151s\u00e9g szerint haszn\u00e1ljon HTTPS-t! [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">T\u00f6bbet olvashat a SimpleSAMLphp be\u00e1ll\u00edt\u00e1s\u00e1r\u00f3l<\/a> ]", - "fi": "<strong>Et k\u00e4yt\u00e4 HTTPS<\/strong> - vahvaa yhteyst\u00e4 k\u00e4ytt\u00e4j\u00e4\u00e4n. HTTP-protokolla on sopiva testeihin, mutta tuotantoj\u00e4rjestelm\u00e4ss\u00e4 sinun tulee k\u00e4ytt\u00e4\u00e4 HTTPS:\u00e4\u00e4. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Lue SimpleSAMLphp yll\u00e4pidosta (eng)<\/a> ]", - "pt-br": "<strong>Voc\u00ea n\u00e3o est\u00e1 utilizando HTTPS<\/strong> - comunica\u00e7\u00e3o encriptada com o usu\u00e1rio. HTTP funciona bem para testes, mas voc\u00ea deve utilizar HTTPS para produ\u00e7\u00e3o. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Leia mais sobre manuten\u00e7\u00e3o do SimpleSAMLphp<\/a> ]", - "pt": "<strong>N\u00e3o est\u00e1 a ser usado HTTPS<\/strong> - comunica\u00e7\u00e3o cifrada com o utilizador. Para ambientes de teste, liga\u00e7\u00f5es HTTP s\u00e3o suficientes, mas num ambiente de produ\u00e7\u00e3o deve ser usado HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Ler mais sobre manuten\u00e7\u00e3o do SimpleSAMLphp<\/a> ]", - "pl": "<strong>Nie u\u017cywasz HTTPS<\/strong> - szyfrowana komunikacja z u\u017cytkownikiem. HTTP jest OK dla test\u00f3w, ale na produkcji powiniene\u015b u\u017cywa\u0107 tylko HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Przeczytaj wi\u0119cej o zarz\u0105dzaniu SimpleSAMLphp<\/a> ]", - "cs": "<strong>Nepou\u017e\u00edv\u00e1te HTTPS<\/strong> - \u0161ivrovanou komunikaci s u\u017eivatelem. HTTP je vhodn\u00e9 jen k testovac\u00edm \u00fa\u010del\u016fm, pro produk\u010dn\u00ed \u00fa\u010dely pou\u017eijte HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">\u010ctete v\u00edce o \u00fadr\u017eb\u011b SimpleSAMLphp<\/a> ]", - "tr": "Kullan\u0131c\u0131yla \u015fifreli ileti\u015fim -<strong>HTTPS kullanm\u0131yorsunuz<\/strong>. HTTP test ama\u00e7l\u0131 olarak kullan\u0131labilir, ancak \u00fcretim ortam\u0131nda, HTTPS kullanmal\u0131s\u0131n\u0131z. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">SimpleSAMLphp bak\u0131m\u0131 hakk\u0131nda daha fazlas\u0131n\u0131 okuyun<\/a> ]", - "it": "<strong>Non stai usando HTTPS<\/strong> - comunicazione cifrata con l'utente. HTTP può funzionare per i test, ma in un ambiente di produzione si dovrebbe usare HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Maggiori informazioni sulla manutenzione di SimpleSAMLphp<\/a> ]", - "lt": "<strong>J\u016bs nenaudojate HTTPS<\/strong> - \u0161ifruotos komunikacijos su vartotoju. HTTP puikiai tinka testavimo reikm\u0117ms, ta\u010diau realioje aplinkoje tur\u0117tum\u0117te naudoti HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Skaityti daugiau apie SimpleSAMLphp prie\u017ei\u016br\u0105<\/a> ]", - "ja": "<strong>\u3042\u306a\u305f\u306fHTTPS(\u6697\u53f7\u5316\u901a\u4fe1)\u3092\u884c\u3063\u3066\u3044\u307e\u305b\u3093\u3002<\/strong>HTTP\u306f\u30c6\u30b9\u30c8\u74b0\u5883\u3067\u3042\u308c\u3070\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3001\u3057\u304b\u3057\u88fd\u54c1\u74b0\u5883\u3067\u306fHTTPS\u3092\u4f7f\u7528\u3059\u308b\u3079\u304d\u3067\u3059\u3002[ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">\u8a73\u3057\u304f\u306f SimpleSAMLphp \u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u60c5\u5831\u3092\u8aad\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/a> ]", + "fr": "<strong>Vous n'utilisez pas HTTPS<\/strong> - communications chiffr\u00e9es avec l'utilisateur. Utiliser SimpleSAMLphp marchera parfaitement avec HTTP pour des tests, mais si vous voulez l'utiliser dans un environnement de production, vous devriez utiliser HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">En lire plus sur la maintenance de SimpleSAMLphp<\/a> ]", + "de": "<strong>Sie benutzen keine HTTPS<\/strong> - verschl\u00fcsselte Kommunikation mit dem Nutzer. SimpleSAMLphp funktioniert zum Testen auch mit HTTP problemlos, aber in einer Produktionsumgebung sollten Sie HTTPS benutzen. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Lesen sie mehr \u00fcber die Verwaltung von SimpleSAMLphp<\/a> ]", + "nl": "<strong>Je gebruikt geen HTTPS<\/strong> - versleutelde communicatie met de gebruiker. SimpleSAMLphp werkt prima op HTTP voor testdoeleinden, maar als je SimpleSAMLphp in een productieomgeving gaat gebruiken, zou je dat moeten doen over HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">lees meer over SimpleSAMLphp-onderhoud<\/a> ]", + "lb": "<strong>Der benotzt ken HTTPS<\/strong> - verschl\u00ebsselt Kommunikatioun mat dem Benotzer. SimpleSAMLphp funktion\u00e9iert einwandfr\u00e4i mat HTTP fir Testzw\u00e9ecker mais an engem produktiven Emfeld sollt et besser mat HTTPS lafen. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Liest m\u00e9i iwert Maintenance vun SimpleSAMLphp<\/a> ]", + "sl": "<strong>Ne uporabljate HTTPS<\/strong>-\u0161ifrirane komunikacije. SimpleSAMLphp deluje brez te\u017eav na HTTP, vendar le za testne namene, za uporabo SimpleSAMLphp v produkcijskem okolju uporabite HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Preberite ve\u010d o SimpleSAMLphp vzdr\u017eevanju<\/a> ]", + "da": "<strong>Du benytter ikke HTTPS<\/strong>-krypteret kommunikation med brugeren. SimpleSAMLphp vil fungere uden problemer med HTTP alene, men hvis du anvender systemet i produktionssystemer, anbefales det st\u00e6rkt at benytte sikker kommunikation i form af HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">l\u00e6s mere i dokumentet: SimpleSAMLphp maintenance<\/a> ] ", + "hr": "<strong>Ne koristite HTTPS<\/strong> - kriptiranu komunikaciju s korisnikom. HTTP se mo\u017ee koristiti za potrebe testiranja, ali u produkcijskom okru\u017eenju trebali biste koristiti HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Pro\u010ditajte vi\u0161e o SimpleSAMLphp postavkama<\/a> ]", + "hu": "<strong>Nem HTTPS protokollt haszn\u00e1l<\/strong> - nem titkos\u00edtott a kommunik\u00e1ci\u00f3! HTTP j\u00f3 megold\u00e1s lehet teszt rendszerek eset\u00e9ben, de az \u00e9les rendszerben lehet\u0151s\u00e9g szerint haszn\u00e1ljon HTTPS-t! [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">T\u00f6bbet olvashat a SimpleSAMLphp be\u00e1ll\u00edt\u00e1s\u00e1r\u00f3l<\/a> ]", + "fi": "<strong>Et k\u00e4yt\u00e4 HTTPS<\/strong> - vahvaa yhteyst\u00e4 k\u00e4ytt\u00e4j\u00e4\u00e4n. HTTP-protokolla on sopiva testeihin, mutta tuotantoj\u00e4rjestelm\u00e4ss\u00e4 sinun tulee k\u00e4ytt\u00e4\u00e4 HTTPS:\u00e4\u00e4. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Lue SimpleSAMLphp yll\u00e4pidosta (eng)<\/a> ]", + "pt-br": "<strong>Voc\u00ea n\u00e3o est\u00e1 utilizando HTTPS<\/strong> - comunica\u00e7\u00e3o encriptada com o usu\u00e1rio. HTTP funciona bem para testes, mas voc\u00ea deve utilizar HTTPS para produ\u00e7\u00e3o. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Leia mais sobre manuten\u00e7\u00e3o do SimpleSAMLphp<\/a> ]", + "pt": "<strong>N\u00e3o est\u00e1 a ser usado HTTPS<\/strong> - comunica\u00e7\u00e3o cifrada com o utilizador. Para ambientes de teste, liga\u00e7\u00f5es HTTP s\u00e3o suficientes, mas num ambiente de produ\u00e7\u00e3o deve ser usado HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Ler mais sobre manuten\u00e7\u00e3o do SimpleSAMLphp<\/a> ]", + "pl": "<strong>Nie u\u017cywasz HTTPS<\/strong> - szyfrowana komunikacja z u\u017cytkownikiem. HTTP jest OK dla test\u00f3w, ale na produkcji powiniene\u015b u\u017cywa\u0107 tylko HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Przeczytaj wi\u0119cej o zarz\u0105dzaniu SimpleSAMLphp<\/a> ]", + "cs": "<strong>Nepou\u017e\u00edv\u00e1te HTTPS<\/strong> - \u0161ivrovanou komunikaci s u\u017eivatelem. HTTP je vhodn\u00e9 jen k testovac\u00edm \u00fa\u010del\u016fm, pro produk\u010dn\u00ed \u00fa\u010dely pou\u017eijte HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">\u010ctete v\u00edce o \u00fadr\u017eb\u011b SimpleSAMLphp<\/a> ]", + "tr": "Kullan\u0131c\u0131yla \u015fifreli ileti\u015fim -<strong>HTTPS kullanm\u0131yorsunuz<\/strong>. HTTP test ama\u00e7l\u0131 olarak kullan\u0131labilir, ancak \u00fcretim ortam\u0131nda, HTTPS kullanmal\u0131s\u0131n\u0131z. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">SimpleSAMLphp bak\u0131m\u0131 hakk\u0131nda daha fazlas\u0131n\u0131 okuyun<\/a> ]", + "it": "<strong>Non stai usando HTTPS<\/strong> - comunicazione cifrata con l'utente. HTTP può funzionare per i test, ma in un ambiente di produzione si dovrebbe usare HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Maggiori informazioni sulla manutenzione di SimpleSAMLphp<\/a> ]", + "lt": "<strong>J\u016bs nenaudojate HTTPS<\/strong> - \u0161ifruotos komunikacijos su vartotoju. HTTP puikiai tinka testavimo reikm\u0117ms, ta\u010diau realioje aplinkoje tur\u0117tum\u0117te naudoti HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Skaityti daugiau apie SimpleSAMLphp prie\u017ei\u016br\u0105<\/a> ]", + "ja": "<strong>\u3042\u306a\u305f\u306fHTTPS(\u6697\u53f7\u5316\u901a\u4fe1)\u3092\u884c\u3063\u3066\u3044\u307e\u305b\u3093\u3002<\/strong>HTTP\u306f\u30c6\u30b9\u30c8\u74b0\u5883\u3067\u3042\u308c\u3070\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3001\u3057\u304b\u3057\u88fd\u54c1\u74b0\u5883\u3067\u306fHTTPS\u3092\u4f7f\u7528\u3059\u308b\u3079\u304d\u3067\u3059\u3002[ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">\u8a73\u3057\u304f\u306f SimpleSAMLphp \u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u60c5\u5831\u3092\u8aad\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/a> ]", "zh-tw": "<strong>\u60a8\u672a\u4f7f\u7528 HTTPS <\/strong> \u5c0d\u50b3\u8f38\u904e\u7a0b\u9032\u884c\u52a0\u5bc6\u901a\u8a0a\u3002HTTP \u53ef\u4ee5\u6b63\u5e38\u7684\u904b\u4f5c\u65bc\u6e2c\u8a66\u74b0\u5883\u3002\u4f46\u5728\u6b63\u5f0f\u74b0\u5883\u88e1\uff0c\u60a8\u61c9\u8a72\u8981\u4f7f\u7528 HTTPS\u3002[ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">\u95b1\u8b80\u66f4\u591a\u6709\u95dc\u65bc SimpleSAMLphp \u7684\u7dad\u8b77\u65b9\u5f0f<\/a> ]", - "ru": "<strong>\u0412\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 HTTPS<\/strong> - \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. HTTP \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0446\u0435\u043b\u0435\u0439, \u043d\u043e \u0432 \u044d\u043a\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">\u0423\u0437\u043d\u0430\u0439\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0438 SimpleSAMLphp<\/a> ]", - "et": "<strong>Sa ei kasuta andmete vahetamiseks HTTPS kr\u00fcpteeritud sidet<\/strong>. HTTP sobib testimiseks h\u00e4sti, kuid toodangus peaksid kindlasti HTTPS-i kasutama. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Loe t\u00e4psemalt SimpleSAMLphp hooldamisest<\/a> ]", - "he": "<strong>\u05d0\u05ea\u05d4 \u05dc\u05d0 \u05de\u05e9\u05ea\u05de\u05e9 \u05d1- HTTPS <\/strong> - \u05d4\u05ea\u05e7\u05e9\u05e8\u05d5\u05ea \u05de\u05d5\u05e6\u05e4\u05e0\u05ea \u05e2\u05dd \u05d4\u05de\u05e9\u05ea\u05de\u05e9. HTTP \u05e2\u05d5\u05d1\u05d3 \u05d1\u05e1\u05d3\u05e8 \u05dc\u05de\u05d8\u05e8\u05d5\u05ea \u05d1\u05d3\u05d9\u05e7\u05d4, \u05d0\u05d5\u05dc\u05dd \u05dc\u05de\u05e2\u05e8\u05db\u05d5\u05ea \u05d0\u05de\u05d9\u05ea\u05d9\u05d5\u05ea, \u05db\u05d3\u05d9 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d4 HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\"> \u05e7\u05e8\u05d0 \u05e2\u05d5\u05d3 \u05e2\u05dc \u05ea\u05d7\u05d6\u05d5\u05e7 SimpleSAMLphp <\/a> ]", - "zh": "<strong>\u4f60\u6ca1\u6709\u4f7f\u7528HTTPS<\/strong> - \u548c\u7528\u6237\u52a0\u5bc6\u7684\u901a\u4fe1\u3002HTTP\u5728\u6d4b\u8bd5\u76ee\u7684\u4e0b\u5f88\u597d,\u4f46\u751f\u4ea7\u73af\u5883\u8bf7\u4f7f\u7528HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">\u83b7\u53d6\u66f4\u591aSimpleSAMLphp\u7ef4\u62a4\u7684\u4fe1\u606f<\/a> ]", - "ar": "<strong>\u0627\u0646\u062a \u0644\u0627 \u062a\u0633\u062a\u062e\u062f\u0645 HTTPS<\/strong> - \u0645\u062d\u0627\u062f\u062b\u0629 \u0645\u0634\u0641\u0631\u0629 \u0645\u0639 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645. HTTP \u062c\u064a\u062f \u0644\u0644\u0627\u062e\u062a\u0628\u0627\u0631\u0627\u062a \u0644\u0643\u0646 \u0641\u064a \u0628\u064a\u0626\u0629 \u0627\u0644\u0646\u0638\u0627\u0645 \u0627\u0644\u0645\u0628\u062f\u0626\u064a \u064a\u0646\u0628\u063a\u064a \u0627\u0633\u062a\u062e\u062f\u0627\u0645 HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/contents\/simplesamlphp-maintenance-and-configuration\">read more about SimpleSAMLphp maintenance<\/a>]", - "lv": "<strong>J\u016bs neizmantojat HTTPS<\/strong> - \u0161ifr\u0113tu komunik\u0101ciju ar lietot\u0101ju. HTTP ir labs testa nol\u016bkiem, bet ra\u017eo\u0161an\u0101 j\u0101izmanto HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Lasiet vair\u0101k par SimpleSAMLphp uztur\u0113\u0161anu<\/a> ]", - "id": "<strong>Anda tidak menggunakan HTTPS<\/strong> - komunikasi yang dienkripsi dengan user. HTTP bekerja baik-baik saja untuk tujuan pengetesan , tapi dalam lingkungan produksi, Anda sebaiknya menggunakan HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Baca lebih lanjut tentang proses pemeliraan SimpleSAMLphp.<\/a> ]", - "sr": "<strong>Ne koristite HTTPS<\/strong> - kriptovanu komunikaciju s korisnikom. HTTP se mo\u017ee koristiti za potrebe testiranja, ali u produkcionom okru\u017eenju trebali biste koristiti HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Pro\u010ditajte vi\u0161e o SimpleSAMLphp pode\u0161avanjima<\/a> ]", - "ro": "<strong>Aten\u021bie, nu utiliza\u021bi HTTPS<\/strong> - comunicare criptat\u0103 cu utilizatorul. HTTP func\u021bioneaza bine pentru teste, dar \u00een produc\u021bie trebuie folosit HTTPS. [<a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Citi\u021bi mai multe despre \u00eentre\u021binerea SimpleSAMLphp<\/a> ]", - "eu": "<strong>Ez zara erabiltzen ari HTTPSak<\/strong> - erabiltzailearekin zifratutako komunikazioak. HTTP zuzen ibiltzen da ebaluaketa ingurunetan, baina ustiapenean erabili behar baduzu, HTTPS erabili beharko zenuke. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Irakur ezazu gehiago SimpleSAMLphp-ren mantentze-lanei buruz <\/a> ]", - "el": "\u0394\u03b5\u03bd \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af\u03c4\u03b5 <strong>HTTPS<\/strong> \u03b3\u03b9\u03b1 \u03ba\u03c1\u03c5\u03c0\u03c4\u03bf\u03b3\u03c1\u03b1\u03c6\u03b7\u03bc\u03ad\u03bd\u03b7 \u03b5\u03c0\u03b9\u03ba\u03bf\u03b9\u03bd\u03c9\u03bd\u03af\u03b1 \u03bc\u03b5 \u03c4\u03bf\u03bd \u03c7\u03c1\u03ae\u03c3\u03c4\u03b7. \u03a4\u03bf HTTP \u03b5\u03c0\u03b1\u03c1\u03ba\u03b5\u03af \u03b3\u03b9\u03b1 \u03b4\u03bf\u03ba\u03b9\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03bf\u03cd\u03c2 \u03c3\u03ba\u03bf\u03c0\u03bf\u03cd\u03c2, \u03c9\u03c3\u03c4\u03cc\u03c3\u03bf \u03c3\u03b5 \u03c0\u03b5\u03c1\u03b9\u03b2\u03ac\u03bb\u03bb\u03bf\u03bd \u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03ae\u03c2 \u03b8\u03b1 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03c4\u03b5 \u0048\u0054\u0054\u0050\u0053. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">\u0394\u03b9\u03b1\u03b2\u03ac\u03c3\u03c4\u03b5 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b1...<\/a> ]" + "ru": "<strong>\u0412\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 HTTPS<\/strong> - \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. HTTP \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0446\u0435\u043b\u0435\u0439, \u043d\u043e \u0432 \u044d\u043a\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">\u0423\u0437\u043d\u0430\u0439\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0438 SimpleSAMLphp<\/a> ]", + "et": "<strong>Sa ei kasuta andmete vahetamiseks HTTPS kr\u00fcpteeritud sidet<\/strong>. HTTP sobib testimiseks h\u00e4sti, kuid toodangus peaksid kindlasti HTTPS-i kasutama. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Loe t\u00e4psemalt SimpleSAMLphp hooldamisest<\/a> ]", + "he": "<strong>\u05d0\u05ea\u05d4 \u05dc\u05d0 \u05de\u05e9\u05ea\u05de\u05e9 \u05d1- HTTPS <\/strong> - \u05d4\u05ea\u05e7\u05e9\u05e8\u05d5\u05ea \u05de\u05d5\u05e6\u05e4\u05e0\u05ea \u05e2\u05dd \u05d4\u05de\u05e9\u05ea\u05de\u05e9. HTTP \u05e2\u05d5\u05d1\u05d3 \u05d1\u05e1\u05d3\u05e8 \u05dc\u05de\u05d8\u05e8\u05d5\u05ea \u05d1\u05d3\u05d9\u05e7\u05d4, \u05d0\u05d5\u05dc\u05dd \u05dc\u05de\u05e2\u05e8\u05db\u05d5\u05ea \u05d0\u05de\u05d9\u05ea\u05d9\u05d5\u05ea, \u05db\u05d3\u05d9 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d4 HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\"> \u05e7\u05e8\u05d0 \u05e2\u05d5\u05d3 \u05e2\u05dc \u05ea\u05d7\u05d6\u05d5\u05e7 SimpleSAMLphp <\/a> ]", + "zh": "<strong>\u4f60\u6ca1\u6709\u4f7f\u7528HTTPS<\/strong> - \u548c\u7528\u6237\u52a0\u5bc6\u7684\u901a\u4fe1\u3002HTTP\u5728\u6d4b\u8bd5\u76ee\u7684\u4e0b\u5f88\u597d,\u4f46\u751f\u4ea7\u73af\u5883\u8bf7\u4f7f\u7528HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">\u83b7\u53d6\u66f4\u591aSimpleSAMLphp\u7ef4\u62a4\u7684\u4fe1\u606f<\/a> ]", + "ar": "<strong>\u0627\u0646\u062a \u0644\u0627 \u062a\u0633\u062a\u062e\u062f\u0645 HTTPS<\/strong> - \u0645\u062d\u0627\u062f\u062b\u0629 \u0645\u0634\u0641\u0631\u0629 \u0645\u0639 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645. HTTP \u062c\u064a\u062f \u0644\u0644\u0627\u062e\u062a\u0628\u0627\u0631\u0627\u062a \u0644\u0643\u0646 \u0641\u064a \u0628\u064a\u0626\u0629 \u0627\u0644\u0646\u0638\u0627\u0645 \u0627\u0644\u0645\u0628\u062f\u0626\u064a \u064a\u0646\u0628\u063a\u064a \u0627\u0633\u062a\u062e\u062f\u0627\u0645 HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">read more about SimpleSAMLphp maintenance<\/a>]", + "lv": "<strong>J\u016bs neizmantojat HTTPS<\/strong> - \u0161ifr\u0113tu komunik\u0101ciju ar lietot\u0101ju. HTTP ir labs testa nol\u016bkiem, bet ra\u017eo\u0161an\u0101 j\u0101izmanto HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Lasiet vair\u0101k par SimpleSAMLphp uztur\u0113\u0161anu<\/a> ]", + "id": "<strong>Anda tidak menggunakan HTTPS<\/strong> - komunikasi yang dienkripsi dengan user. HTTP bekerja baik-baik saja untuk tujuan pengetesan , tapi dalam lingkungan produksi, Anda sebaiknya menggunakan HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Baca lebih lanjut tentang proses pemeliraan SimpleSAMLphp.<\/a> ]", + "sr": "<strong>Ne koristite HTTPS<\/strong> - kriptovanu komunikaciju s korisnikom. HTTP se mo\u017ee koristiti za potrebe testiranja, ali u produkcionom okru\u017eenju trebali biste koristiti HTTPS. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Pro\u010ditajte vi\u0161e o SimpleSAMLphp pode\u0161avanjima<\/a> ]", + "ro": "<strong>Aten\u021bie, nu utiliza\u021bi HTTPS<\/strong> - comunicare criptat\u0103 cu utilizatorul. HTTP func\u021bioneaza bine pentru teste, dar \u00een produc\u021bie trebuie folosit HTTPS. [<a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Citi\u021bi mai multe despre \u00eentre\u021binerea SimpleSAMLphp<\/a> ]", + "eu": "<strong>Ez zara erabiltzen ari HTTPSak<\/strong> - erabiltzailearekin zifratutako komunikazioak. HTTP zuzen ibiltzen da ebaluaketa ingurunetan, baina ustiapenean erabili behar baduzu, HTTPS erabili beharko zenuke. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">Irakur ezazu gehiago SimpleSAMLphp-ren mantentze-lanei buruz <\/a> ]", + "el": "\u0394\u03b5\u03bd \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af\u03c4\u03b5 <strong>HTTPS<\/strong> \u03b3\u03b9\u03b1 \u03ba\u03c1\u03c5\u03c0\u03c4\u03bf\u03b3\u03c1\u03b1\u03c6\u03b7\u03bc\u03ad\u03bd\u03b7 \u03b5\u03c0\u03b9\u03ba\u03bf\u03b9\u03bd\u03c9\u03bd\u03af\u03b1 \u03bc\u03b5 \u03c4\u03bf\u03bd \u03c7\u03c1\u03ae\u03c3\u03c4\u03b7. \u03a4\u03bf HTTP \u03b5\u03c0\u03b1\u03c1\u03ba\u03b5\u03af \u03b3\u03b9\u03b1 \u03b4\u03bf\u03ba\u03b9\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03bf\u03cd\u03c2 \u03c3\u03ba\u03bf\u03c0\u03bf\u03cd\u03c2, \u03c9\u03c3\u03c4\u03cc\u03c3\u03bf \u03c3\u03b5 \u03c0\u03b5\u03c1\u03b9\u03b2\u03ac\u03bb\u03bb\u03bf\u03bd \u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03ae\u03c2 \u03b8\u03b1 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03c4\u03b5 \u0048\u0054\u0054\u0050\u0053. [ <a href=\"https:\/\/simplesamlphp.org\/docs\/stable\/simplesamlphp-maintenance\">\u0394\u03b9\u03b1\u03b2\u03ac\u03c3\u03c4\u03b5 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b1...<\/a> ]" }, "link_saml2example": { "no": "SAML 2.0 SP eksempel - test innlogging med SAML 2.0 via din IdP", @@ -1425,6 +1355,10 @@ "ro": "V-a\u021bi autentificat ca administrator", "el": "\u03a3\u03c5\u03bd\u03b4\u03b5\u03b4\u03b5\u03bc\u03ad\u03bd\u03bf\u03c2 \u03c9\u03c2 \u03b4\u03b9\u03b1\u03c7\u03b5\u03b9\u03c1\u03b9\u03c3\u03c4\u03ae\u03c2" }, + "logout": { + "en": "Logout", + "nl": "Uitloggen" + }, "auth": { "no": "Autentisering", "sv": "Autentisering", diff --git a/modules/core/hooks/hook_sanitycheck.php b/modules/core/hooks/hook_sanitycheck.php index 2f40c8cfe3a3b43e31feec5c5a6ef2bdc8f14bf6..1dd97a96cdcc7289eb224c0b30f19d21c4a9cd7e 100644 --- a/modules/core/hooks/hook_sanitycheck.php +++ b/modules/core/hooks/hook_sanitycheck.php @@ -28,7 +28,8 @@ function core_hook_sanitycheck(&$hookinfo) if (version_compare(phpversion(), '5.4', '>=')) { $hookinfo['info'][] = '[core] You are running a PHP version suitable for SimpleSAMLphp.'; } else { - $hookinfo['errors'][] = '[core] You are running an old PHP installation. Please check the requirements for your SimpleSAMLphp version and upgrade.'; + $hookinfo['errors'][] = '[core] You are running an old PHP installation. '. + 'Please check the requirements for your SimpleSAMLphp version and upgrade.'; } $info = array(); diff --git a/modules/core/lib/ACL.php b/modules/core/lib/ACL.php index aa67c31c5bdf4880e098a5f5f2274455ff09477e..558bf94795a622bd87a702f41c6d5b3feea3eab1 100644 --- a/modules/core/lib/ACL.php +++ b/modules/core/lib/ACL.php @@ -40,7 +40,9 @@ class ACL $action = array_shift($rule); if ($action !== 'allow' && $action !== 'deny') { - throw new \SimpleSAML\Error\Exception('Invalid action in rule in access control list: '.var_export($action, true)); + throw new \SimpleSAML\Error\Exception( + 'Invalid action in rule in access control list: '.var_export($action, true) + ); } } $this->acl = $acl; diff --git a/modules/core/lib/Auth/Process/AttributeAlter.php b/modules/core/lib/Auth/Process/AttributeAlter.php index 5672947c694497e26701c61b88df3489380e9ad1..d17c74d295466971f803037257a977b49630ddc6 100644 --- a/modules/core/lib/Auth/Process/AttributeAlter.php +++ b/modules/core/lib/Auth/Process/AttributeAlter.php @@ -168,7 +168,8 @@ class AttributeAlter extends \SimpleSAML\Auth\ProcessingFilter // replace only the part that matches if ($this->subject === $this->target) { $attributes[$this->target] = preg_replace( - $this->pattern, $this->replacement, + $this->pattern, + $this->replacement, $attributes[$this->subject] ); } else { diff --git a/modules/core/lib/Auth/Process/AttributeCopy.php b/modules/core/lib/Auth/Process/AttributeCopy.php index 44d3b71f00548e75fa1e460eab75985b3f274a55..127eafec6ad2d8d0ad22983ed24edded4325b958 100644 --- a/modules/core/lib/Auth/Process/AttributeCopy.php +++ b/modules/core/lib/Auth/Process/AttributeCopy.php @@ -38,7 +38,6 @@ class AttributeCopy extends \SimpleSAML\Auth\ProcessingFilter assert(is_array($config)); foreach ($config as $source => $destination) { - if (!is_string($source)) { throw new \Exception('Invalid source attribute name: '.var_export($source, true)); } diff --git a/modules/core/lib/Auth/Process/Cardinality.php b/modules/core/lib/Auth/Process/Cardinality.php index 6f85b8b393d4adc02c4278fc8f804c2f834695a3..772c3a4694f91f795ec63b0fb9dbd6707c560804 100644 --- a/modules/core/lib/Auth/Process/Cardinality.php +++ b/modules/core/lib/Auth/Process/Cardinality.php @@ -2,7 +2,7 @@ namespace SimpleSAML\Module\core\Auth\Process; -use SimpleSAML\Utils\HTTPAdapter; +use SimpleSAML\Utils\HttpAdapter; /** * Filter to ensure correct cardinality of attributes @@ -30,12 +30,12 @@ class Cardinality extends \SimpleSAML\Auth\ProcessingFilter * @param HTTPAdapter $http HTTP utility service (handles redirects). * @throws \SimpleSAML\Error\Exception */ - public function __construct($config, $reserved, HTTPAdapter $http = null) + public function __construct($config, $reserved, HttpAdapter $http = null) { parent::__construct($config, $reserved); assert(is_array($config)); - $this->http = $http ? : new HTTPAdapter(); + $this->http = $http ? : new HttpAdapter(); foreach ($config as $attribute => $rules) { if ($attribute === '%ignoreEntities') { @@ -114,7 +114,6 @@ class Cardinality extends \SimpleSAML\Auth\ProcessingFilter } foreach ($request['Attributes'] as $k => $v) { - if (!array_key_exists($k, $this->cardinality)) { continue; } @@ -125,12 +124,20 @@ class Cardinality extends \SimpleSAML\Auth\ProcessingFilter /* minimum cardinality */ if (count($v) < $this->cardinality[$k]['min']) { if ($this->cardinality[$k]['warn']) { - \SimpleSAML\Logger::warning(sprintf( - 'Cardinality: attribute %s from %s does not meet minimum cardinality of %d (%d)', - $k, $entityid, $this->cardinality[$k]['min'], count($v) - )); + \SimpleSAML\Logger::warning( + sprintf( + 'Cardinality: attribute %s from %s does not meet minimum cardinality of %d (%d)', + $k, + $entityid, + $this->cardinality[$k]['min'], + count($v) + ) + ); } else { - $request['core:cardinality:errorAttributes'][$k] = array(count($v), $this->cardinality[$k]['_expr']); + $request['core:cardinality:errorAttributes'][$k] = array( + count($v), + $this->cardinality[$k]['_expr'] + ); } continue; } @@ -138,12 +145,20 @@ class Cardinality extends \SimpleSAML\Auth\ProcessingFilter /* maximum cardinality */ if (array_key_exists('max', $this->cardinality[$k]) && count($v) > $this->cardinality[$k]['max']) { if ($this->cardinality[$k]['warn']) { - \SimpleSAML\Logger::warning(sprintf( - 'Cardinality: attribute %s from %s does not meet maximum cardinality of %d (%d)', - $k, $entityid, $this->cardinality[$k]['max'], count($v) - )); + \SimpleSAML\Logger::warning( + sprintf( + 'Cardinality: attribute %s from %s does not meet maximum cardinality of %d (%d)', + $k, + $entityid, + $this->cardinality[$k]['max'], + count($v) + ) + ); } else { - $request['core:cardinality:errorAttributes'][$k] = array(count($v), $this->cardinality[$k]['_expr']); + $request['core:cardinality:errorAttributes'][$k] = array( + count($v), + $this->cardinality[$k]['_expr'] + ); } continue; } @@ -157,10 +172,14 @@ class Cardinality extends \SimpleSAML\Auth\ProcessingFilter if ($this->cardinality[$k]['warn']) { \SimpleSAML\Logger::warning(sprintf( 'Cardinality: attribute %s from %s is missing', - $k, $entityid + $k, + $entityid )); } else { - $request['core:cardinality:errorAttributes'][$k] = array(0, $this->cardinality[$k]['_expr']); + $request['core:cardinality:errorAttributes'][$k] = array( + 0, + $this->cardinality[$k]['_expr'] + ); } } diff --git a/modules/core/lib/Auth/Process/CardinalitySingle.php b/modules/core/lib/Auth/Process/CardinalitySingle.php index be7707e597f9898e2e72523ede3b795c95eb8095..da120934d3dc014a569d0d69234a43ef9f0bb6e0 100644 --- a/modules/core/lib/Auth/Process/CardinalitySingle.php +++ b/modules/core/lib/Auth/Process/CardinalitySingle.php @@ -41,12 +41,12 @@ class CardinalitySingle extends \SimpleSAML\Auth\ProcessingFilter * @param mixed $reserved For future use. * @param HTTPAdapter $http HTTP utility service (handles redirects). */ - public function __construct($config, $reserved, HTTPAdapter $http = null) + public function __construct($config, $reserved, HttpAdapter $http = null) { parent::__construct($config, $reserved); assert(is_array($config)); - $this->http = $http ? : new HTTPAdapter(); + $this->http = $http ? : new HttpAdapter(); if (array_key_exists('singleValued', $config)) { $this->singleValued = $config['singleValued']; @@ -55,7 +55,11 @@ class CardinalitySingle extends \SimpleSAML\Auth\ProcessingFilter $this->firstValue = $config['firstValue']; } if (array_key_exists('flattenWith', $config)) { - $this->flattenWith = is_array($config['flattenWith']) ? array_shift($config['flattenWith']) : $config['flattenWith']; + if (is_array($config['flattenWith'])) { + $this->flattenWith = array_shift($config['flattenWith']); + } else { + $this->flattenWith = $config['flattenWith']; + } } if (array_key_exists('flatten', $config)) { $this->flatten = $config['flatten']; diff --git a/modules/core/lib/Auth/Process/ExtendIdPSession.php b/modules/core/lib/Auth/Process/ExtendIdPSession.php index 4d28c5cf7f2ed7efddf68d05effa137f90bc9c23..92102262b572ee8d0b0bfb07e35ef011c106c9a8 100644 --- a/modules/core/lib/Auth/Process/ExtendIdPSession.php +++ b/modules/core/lib/Auth/Process/ExtendIdPSession.php @@ -35,7 +35,9 @@ class ExtendIdPSession extends \SimpleSAML\Auth\ProcessingFilter // If remember me is active $rememberMeExpire = $session->getRememberMeExpire(); - if (!empty($state['RememberMe']) && $rememberMeExpire !== null && $globalConfig->getBoolean('session.rememberme.enable', false)) { + if (!empty($state['RememberMe']) && $rememberMeExpire !== null && + $globalConfig->getBoolean('session.rememberme.enable', false) + ) { $session->setRememberMeExpire(); return; } diff --git a/modules/core/lib/Auth/Process/GenerateGroups.php b/modules/core/lib/Auth/Process/GenerateGroups.php index 12af86f803370ea8af16ff46b09269b5cf62f89c..c8069eb311df77dccc1ec8d8ea1a1dd7db7a7d58 100644 --- a/modules/core/lib/Auth/Process/GenerateGroups.php +++ b/modules/core/lib/Auth/Process/GenerateGroups.php @@ -135,7 +135,7 @@ class GenerateGroups extends \SimpleSAML\Auth\ProcessingFilter return preg_replace_callback( '/([^a-zA-Z0-9_@=.])/', - function($m) { + function ($m) { return sprintf("%%%02x", ord($m[1])); }, $string diff --git a/modules/core/lib/Auth/Process/PHP.php b/modules/core/lib/Auth/Process/PHP.php index 5c2bce08b2cff76d79c119d248951bf2a6f99abf..f3c9a293eefecbdca16227ea71724cbfcf827f92 100644 --- a/modules/core/lib/Auth/Process/PHP.php +++ b/modules/core/lib/Auth/Process/PHP.php @@ -49,7 +49,9 @@ class PHP extends \SimpleSAML\Auth\ProcessingFilter assert(is_array($request)); assert(array_key_exists('Attributes', $request)); - $function = function(/** @scrutinizer ignore-unused */ &$attributes, &$state) { eval($this->code); }; - $function($request['Attributes'], $request); + $function = function (/** @scrutinizer ignore-unused */ &$attributes) { + eval($this->code); + }; + $function($request['Attributes']); } } diff --git a/modules/core/lib/Stats/Output/File.php b/modules/core/lib/Stats/Output/File.php index 1e6941c214f05b6809b74fe65a8f0c59bf6a7c18..cac817c83b784f5e7fca13d3a6dca81d0497ab18 100644 --- a/modules/core/lib/Stats/Output/File.php +++ b/modules/core/lib/Stats/Output/File.php @@ -18,7 +18,7 @@ class File extends \SimpleSAML\Stats\Output /** * The file handle for the current file. - * @var resource + * @var resource|null|false */ private $file = null; diff --git a/modules/core/lib/Storage/SQLPermanentStorage.php b/modules/core/lib/Storage/SQLPermanentStorage.php index 8b73c77a8e1e2d1c5ab95d2e4a9feac0a1279d2a..46da8682827afe5b5b8235f5ef85c93722ebb59a 100644 --- a/modules/core/lib/Storage/SQLPermanentStorage.php +++ b/modules/core/lib/Storage/SQLPermanentStorage.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Module\core\Storage; /** * SQLPermanentStorage - * + * * Generic SQL Store to store key value pairs. To be used in several other modules that needs * to store data permanently. * @@ -26,7 +26,7 @@ class SQLPermanentStorage if (!is_dir($datadir)) { throw new \Exception('Data directory ['.$datadir.'] does not exist'); - } else if (!is_writable($datadir)) { + } elseif (!is_writable($datadir)) { throw new \Exception('Data directory ['.$datadir.'] is not writable'); } @@ -51,7 +51,7 @@ class SQLPermanentStorage PRIMARY KEY (key1,key2,type) ); '); - } + } } else { throw new \Exception('Error creating SQL lite database ['.$dbfile.'].'); } @@ -86,7 +86,8 @@ class SQLPermanentStorage { $expire = is_null($duration) ? null : (time() + $duration); - $query = "UPDATE data SET updated = :updated, value = :value, expire = :expire WHERE key1 = :key1 AND key2 = :key2 AND type = :type"; + $query = "UPDATE data SET updated = :updated, value = :value, ". + "expire = :expire WHERE key1 = :key1 AND key2 = :key2 AND type = :type"; $prepared = $this->db->prepare($query); $data = array(':key1' => $key1, ':key2' => $key2, ':type' => $type, ':updated' => time(), @@ -216,4 +217,3 @@ class SQLPermanentStorage return join(' AND ', $conditions); } } - diff --git a/modules/core/locales/ar/LC_MESSAGES/core.po b/modules/core/locales/ar/LC_MESSAGES/core.po index 35c36fccd75b73807530865718ffc9db311c47ce..84c0fc10ca1ca5631ce6175e2751a6bf68f3f968 100644 --- a/modules/core/locales/ar/LC_MESSAGES/core.po +++ b/modules/core/locales/ar/LC_MESSAGES/core.po @@ -179,8 +179,8 @@ msgid "{core:frontpage:warnings_https}" msgstr "" "<strong>انت لا تستخدم HTTPS</strong> - Ù…Øادثة مشÙرة مع المستخدم. HTTP جيد" " للاختبارات لكن ÙÙŠ بيئة النظام المبدئي ينبغي استخدام HTTPS. [ <a " -"href=\"http://rnd.feide.no/contents/simplesamlphp-maintenance-and-" -"configuration\">read more about SimpleSAMLphp maintenance</a>]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">read more about SimpleSAMLphp maintenance</a>]" msgid "{core:frontpage:federation}" msgstr "الدخول الموØد" @@ -376,8 +376,8 @@ msgid "" msgstr "" "<strong>انت لا تستخدم HTTPS</strong> - Ù…Øادثة مشÙرة مع المستخدم. HTTP جيد" " للاختبارات لكن ÙÙŠ بيئة النظام المبدئي ينبغي استخدام HTTPS. [ <a " -"href=\"http://rnd.feide.no/contents/simplesamlphp-maintenance-and-" -"configuration\">read more about SimpleSAMLphp maintenance</a>]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">read more about SimpleSAMLphp maintenance</a>]" msgid "Metadata" msgstr "البيانات الوصÙية/الميتاداتا " diff --git a/modules/core/locales/cs/LC_MESSAGES/core.po b/modules/core/locales/cs/LC_MESSAGES/core.po index 5293daa9a89a9e34e3006e15654f769a89f56b1a..0c5a0b5c613eeca008b188e005dd65acbe14d84d 100644 --- a/modules/core/locales/cs/LC_MESSAGES/core.po +++ b/modules/core/locales/cs/LC_MESSAGES/core.po @@ -184,8 +184,8 @@ msgid "{core:frontpage:warnings_https}" msgstr "" "<strong>NepoužÃváte HTTPS</strong> - Å¡ivrovanou komunikaci s uživatelem. " "HTTP je vhodné jen k testovacÃm úÄelům, pro produkÄnà úÄely použijte " -"HTTPS. [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-" -"and-configuration\">ÄŒtete vÃce o údržbÄ› SimpleSAMLphp</a> ]" +"HTTPS. [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">ÄŒtete vÃce o údržbÄ› SimpleSAMLphp</a> ]" msgid "{core:frontpage:federation}" msgstr "Federace" @@ -386,8 +386,8 @@ msgid "" msgstr "" "<strong>NepoužÃváte HTTPS</strong> - Å¡ivrovanou komunikaci s uživatelem. " "HTTP je vhodné jen k testovacÃm úÄelům, pro produkÄnà úÄely použijte " -"HTTPS. [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-" -"and-configuration\">ÄŒtete vÃce o údržbÄ› SimpleSAMLphp</a> ]" +"HTTPS. [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">ÄŒtete vÃce o údržbÄ› SimpleSAMLphp</a> ]" msgid "Metadata" msgstr "Metadata" diff --git a/modules/core/locales/da/LC_MESSAGES/core.po b/modules/core/locales/da/LC_MESSAGES/core.po index 6ae96bedf513a9cab2613878602f2367971ed107..ed0dbe54c6bce2d86f1b9ce9b4b3234e70875041 100644 --- a/modules/core/locales/da/LC_MESSAGES/core.po +++ b/modules/core/locales/da/LC_MESSAGES/core.po @@ -188,8 +188,8 @@ msgstr "" "brugeren. SimpleSAMLphp vil fungere uden problemer med HTTP alene, men " "hvis du anvender systemet i produktionssystemer, anbefales det stærkt at " "benytte sikker kommunikation i form af HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">læs mere i dokumentet: SimpleSAMLphp maintenance</a> ] " +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">læs mere i dokumentet: SimpleSAMLphp maintenance</a> ] " msgid "{core:frontpage:federation}" msgstr "Føderation" @@ -388,8 +388,8 @@ msgstr "" "brugeren. SimpleSAMLphp vil fungere uden problemer med HTTP alene, men " "hvis du anvender systemet i produktionssystemer, anbefales det stærkt at " "benytte sikker kommunikation i form af HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">læs mere i dokumentet: SimpleSAMLphp maintenance</a> ] " +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">læs mere i dokumentet: SimpleSAMLphp maintenance</a> ] " msgid "Metadata" msgstr "Metadata" diff --git a/modules/core/locales/de/LC_MESSAGES/core.po b/modules/core/locales/de/LC_MESSAGES/core.po index 5aff6c3654100ae20734a5e0706d5b94c4bafffc..c6648ced42ba13a2c629d44045331a7dcd68f94d 100644 --- a/modules/core/locales/de/LC_MESSAGES/core.po +++ b/modules/core/locales/de/LC_MESSAGES/core.po @@ -184,8 +184,8 @@ msgstr "" "<strong>Sie benutzen keine HTTPS</strong> - verschlüsselte Kommunikation " "mit dem Nutzer. SimpleSAMLphp funktioniert zum Testen auch mit HTTP " "problemlos, aber in einer Produktionsumgebung sollten Sie HTTPS benutzen." -" [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Lesen sie mehr über die Verwaltung von SimpleSAMLphp</a> " +" [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Lesen sie mehr über die Verwaltung von SimpleSAMLphp</a> " "]" msgid "{core:frontpage:federation}" @@ -393,8 +393,8 @@ msgstr "" "<strong>Sie benutzen keine HTTPS</strong> - verschlüsselte Kommunikation " "mit dem Nutzer. SimpleSAMLphp funktioniert zum Testen auch mit HTTP " "problemlos, aber in einer Produktionsumgebung sollten Sie HTTPS benutzen." -" [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Lesen sie mehr über die Verwaltung von SimpleSAMLphp</a> " +" [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Lesen sie mehr über die Verwaltung von SimpleSAMLphp</a> " "]" msgid "Metadata" diff --git a/modules/core/locales/el/LC_MESSAGES/core.po b/modules/core/locales/el/LC_MESSAGES/core.po index f99d522c286dd0a4745cfdf745c020ff909c72c4..a2f7c1563303b807287a7828262619075a2bc061 100644 --- a/modules/core/locales/el/LC_MESSAGES/core.po +++ b/modules/core/locales/el/LC_MESSAGES/core.po @@ -206,8 +206,8 @@ msgstr "" "Δεν χÏησιμοποιείτε <strong>HTTPS</strong> για κÏυπτογÏαφημÎνη επικοινωνία" " με τον χÏήστη. Το HTTP επαÏκεί για δοκιμαστικοÏÏ‚ σκοποÏÏ‚, ωστόσο σε " "πεÏιβάλλον παÏαγωγής θα Ï€ÏÎπει να χÏησιμοποιήσετε HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Διαβάστε πεÏισσότεÏα...</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Διαβάστε πεÏισσότεÏα...</a> ]" msgid "{core:frontpage:federation}" msgstr "Ομοσπονδία" @@ -427,8 +427,8 @@ msgstr "" "Δεν χÏησιμοποιείτε <strong>HTTPS</strong> για κÏυπτογÏαφημÎνη επικοινωνία" " με τον χÏήστη. Το HTTP επαÏκεί για δοκιμαστικοÏÏ‚ σκοποÏÏ‚, ωστόσο σε " "πεÏιβάλλον παÏαγωγής θα Ï€ÏÎπει να χÏησιμοποιήσετε HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Διαβάστε πεÏισσότεÏα...</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Διαβάστε πεÏισσότεÏα...</a> ]" msgid "Metadata" msgstr "ΜεταδεδομÎνα" diff --git a/modules/core/locales/en/LC_MESSAGES/core.po b/modules/core/locales/en/LC_MESSAGES/core.po index 38593a5ecbbab02d56d6d70cac9726181e034681..470d08a3df25530f15743a4499ff3e4a06679917 100644 --- a/modules/core/locales/en/LC_MESSAGES/core.po +++ b/modules/core/locales/en/LC_MESSAGES/core.po @@ -166,6 +166,9 @@ msgstr "You are logged in as administrator" msgid "{core:frontpage:auth}" msgstr "Authentication" +msgid "{core:frontpage:logout}" +msgstr "Logout" + msgid "{core:no_metadata:suggestion_user_link}" msgstr "" "If you are an user who received this error after following a link on a " diff --git a/modules/core/locales/eu/LC_MESSAGES/core.po b/modules/core/locales/eu/LC_MESSAGES/core.po index 18d8bd793d6788186ca459916a727509e49ea24d..d979950a1de6dcc8101453a0318bd930b3df4647 100644 --- a/modules/core/locales/eu/LC_MESSAGES/core.po +++ b/modules/core/locales/eu/LC_MESSAGES/core.po @@ -185,8 +185,8 @@ msgstr "" "<strong>Ez zara erabiltzen ari HTTPSak</strong> - erabiltzailearekin " "zifratutako komunikazioak. HTTP zuzen ibiltzen da ebaluaketa ingurunetan," " baina ustiapenean erabili behar baduzu, HTTPS erabili beharko zenuke. [ " -"<a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Irakur ezazu gehiago SimpleSAMLphp-ren mantentze-lanei " +"<a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Irakur ezazu gehiago SimpleSAMLphp-ren mantentze-lanei " "buruz </a> ]" msgid "{core:frontpage:federation}" @@ -392,8 +392,8 @@ msgstr "" "<strong>Ez zara erabiltzen ari HTTPSak</strong> - erabiltzailearekin " "zifratutako komunikazioak. HTTP zuzen ibiltzen da ebaluaketa ingurunetan," " baina ustiapenean erabili behar baduzu, HTTPS erabili beharko zenuke. [ " -"<a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Irakur ezazu gehiago SimpleSAMLphp-ren mantentze-lanei " +"<a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Irakur ezazu gehiago SimpleSAMLphp-ren mantentze-lanei " "buruz </a> ]" msgid "Metadata" diff --git a/modules/core/locales/fr/LC_MESSAGES/core.po b/modules/core/locales/fr/LC_MESSAGES/core.po index c00c93ab2e3c0c3cee7c85dd89a166c8f4e9b15c..188d437f3ea0d032f0504322c347cc1951bd8aad 100644 --- a/modules/core/locales/fr/LC_MESSAGES/core.po +++ b/modules/core/locales/fr/LC_MESSAGES/core.po @@ -187,8 +187,8 @@ msgstr "" "avec l'utilisateur. Utiliser SimpleSAMLphp marchera parfaitement avec " "HTTP pour des tests, mais si vous voulez l'utiliser dans un environnement" " de production, vous devriez utiliser HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">En lire plus sur la maintenance de SimpleSAMLphp</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">En lire plus sur la maintenance de SimpleSAMLphp</a> ]" msgid "{core:frontpage:federation}" msgstr "Fédération" @@ -399,8 +399,8 @@ msgstr "" "avec l'utilisateur. Utiliser SimpleSAMLphp marchera parfaitement avec " "HTTP pour des tests, mais si vous voulez l'utiliser dans un environnement" " de production, vous devriez utiliser HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">En lire plus sur la maintenance de SimpleSAMLphp</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">En lire plus sur la maintenance de SimpleSAMLphp</a> ]" msgid "Metadata" msgstr "Métadonnées" diff --git a/modules/core/locales/he/LC_MESSAGES/core.po b/modules/core/locales/he/LC_MESSAGES/core.po index 167d0457e4476bcf91c599bec6d81ef2d58d0726..ea53dbbe1b247484ad4de84cfca8124722cb834d 100644 --- a/modules/core/locales/he/LC_MESSAGES/core.po +++ b/modules/core/locales/he/LC_MESSAGES/core.po @@ -174,8 +174,8 @@ msgid "{core:frontpage:warnings_https}" msgstr "" "<strong>×תה ×œ× ×ž×©×ª×ž×© ב- HTTPS </strong> - התקשרות ×ž×•×¦×¤× ×ª ×¢× ×”×ž×©×ª×ž×©. HTTP " "עובד בסדר למטרות בדיקה, ××•×œ× ×œ×ž×¢×¨×›×•×ª ×מיתיות, כדי להשתמש ×” HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\"> ×§×¨× ×¢×•×“ על תחזוק SimpleSAMLphp </a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\"> ×§×¨× ×¢×•×“ על תחזוק SimpleSAMLphp </a> ]" msgid "{core:frontpage:federation}" msgstr "×יחוד" @@ -369,8 +369,8 @@ msgid "" msgstr "" "<strong>×תה ×œ× ×ž×©×ª×ž×© ב- HTTPS </strong> - התקשרות ×ž×•×¦×¤× ×ª ×¢× ×”×ž×©×ª×ž×©. HTTP " "עובד בסדר למטרות בדיקה, ××•×œ× ×œ×ž×¢×¨×›×•×ª ×מיתיות, כדי להשתמש ×” HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\"> ×§×¨× ×¢×•×“ על תחזוק SimpleSAMLphp </a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\"> ×§×¨× ×¢×•×“ על תחזוק SimpleSAMLphp </a> ]" msgid "Metadata" msgstr "מט×-× ×ª×•× ×™×" diff --git a/modules/core/locales/hr/LC_MESSAGES/core.po b/modules/core/locales/hr/LC_MESSAGES/core.po index 41bf6b81c1c1c194a7074592f9beb917c9d0696c..4e0311f3db3fe617ff3177d05b342761e15a33ea 100644 --- a/modules/core/locales/hr/LC_MESSAGES/core.po +++ b/modules/core/locales/hr/LC_MESSAGES/core.po @@ -192,8 +192,8 @@ msgstr "" "<strong>Ne koristite HTTPS</strong> - kriptiranu komunikaciju s " "korisnikom. HTTP se može koristiti za potrebe testiranja, ali u " "produkcijskom okruženju trebali biste koristiti HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">ProÄitajte viÅ¡e o SimpleSAMLphp postavkama</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">ProÄitajte viÅ¡e o SimpleSAMLphp postavkama</a> ]" msgid "{core:frontpage:federation}" msgstr "Federacija" @@ -411,8 +411,8 @@ msgstr "" "<strong>Ne koristite HTTPS</strong> - kriptiranu komunikaciju s " "korisnikom. HTTP se može koristiti za potrebe testiranja, ali u " "produkcijskom okruženju trebali biste koristiti HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">ProÄitajte viÅ¡e o SimpleSAMLphp postavkama</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">ProÄitajte viÅ¡e o SimpleSAMLphp postavkama</a> ]" msgid "Metadata" msgstr "Metapodaci" diff --git a/modules/core/locales/hu/LC_MESSAGES/core.po b/modules/core/locales/hu/LC_MESSAGES/core.po index 078427f461a1ed49bae5df3a54f2f3d95e842726..2304e086d459c8a2ede5de935fb6b58b6d7d5348 100644 --- a/modules/core/locales/hu/LC_MESSAGES/core.po +++ b/modules/core/locales/hu/LC_MESSAGES/core.po @@ -189,8 +189,8 @@ msgstr "" "<strong>Nem HTTPS protokollt használ</strong> - nem titkosÃtott a " "kommunikáció! HTTP jó megoldás lehet teszt rendszerek esetében, de az " "éles rendszerben lehetÅ‘ség szerint használjon HTTPS-t! [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Többet olvashat a SimpleSAMLphp beállÃtásáról</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Többet olvashat a SimpleSAMLphp beállÃtásáról</a> ]" msgid "{core:frontpage:federation}" msgstr "Föderáció" @@ -393,8 +393,8 @@ msgstr "" "<strong>Nem HTTPS protokollt használ</strong> - nem titkosÃtott a " "kommunikáció! HTTP jó megoldás lehet teszt rendszerek esetében, de az " "éles rendszerben lehetÅ‘ség szerint használjon HTTPS-t! [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Többet olvashat a SimpleSAMLphp beállÃtásáról</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Többet olvashat a SimpleSAMLphp beállÃtásáról</a> ]" msgid "Metadata" msgstr "Metaadat" diff --git a/modules/core/locales/id/LC_MESSAGES/core.po b/modules/core/locales/id/LC_MESSAGES/core.po index 757ecc8d8fc7aabc036ba0d0ea369a97a7829371..75646d0a570c75863ca422da57c77de83b69ca91 100644 --- a/modules/core/locales/id/LC_MESSAGES/core.po +++ b/modules/core/locales/id/LC_MESSAGES/core.po @@ -185,8 +185,8 @@ msgstr "" "<strong>Anda tidak menggunakan HTTPS</strong> - komunikasi yang " "dienkripsi dengan user. HTTP bekerja baik-baik saja untuk tujuan " "pengetesan , tapi dalam lingkungan produksi, Anda sebaiknya menggunakan " -"HTTPS. [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-" -"and-configuration\">Baca lebih lanjut tentang proses pemeliraan " +"HTTPS. [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Baca lebih lanjut tentang proses pemeliraan " "SimpleSAMLphp.</a> ]" msgid "{core:frontpage:federation}" @@ -395,8 +395,8 @@ msgstr "" "<strong>Anda tidak menggunakan HTTPS</strong> - komunikasi yang " "dienkripsi dengan user. HTTP bekerja baik-baik saja untuk tujuan " "pengetesan , tapi dalam lingkungan produksi, Anda sebaiknya menggunakan " -"HTTPS. [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-" -"and-configuration\">Baca lebih lanjut tentang proses pemeliraan " +"HTTPS. [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Baca lebih lanjut tentang proses pemeliraan " "SimpleSAMLphp.</a> ]" msgid "Metadata" diff --git a/modules/core/locales/it/LC_MESSAGES/core.po b/modules/core/locales/it/LC_MESSAGES/core.po index 1333903f9a79ced5f29fb668897cbf47e4e4c72d..555f86a8e2b379ffd15042f3ec814dbf4470b3c4 100644 --- a/modules/core/locales/it/LC_MESSAGES/core.po +++ b/modules/core/locales/it/LC_MESSAGES/core.po @@ -190,8 +190,8 @@ msgstr "" "<strong>Non stai usando HTTPS</strong> - comunicazione cifrata con " "l'utente. HTTP può funzionare per i test, ma in un ambiente di " "produzione si dovrebbe usare HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Maggiori informazioni sulla manutenzione di " +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Maggiori informazioni sulla manutenzione di " "SimpleSAMLphp</a> ]" msgid "{core:frontpage:federation}" @@ -404,8 +404,8 @@ msgstr "" "<strong>Non stai usando HTTPS</strong> - comunicazione cifrata con " "l'utente. HTTP può funzionare per i test, ma in un ambiente di " "produzione si dovrebbe usare HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Maggiori informazioni sulla manutenzione di " +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Maggiori informazioni sulla manutenzione di " "SimpleSAMLphp</a> ]" msgid "Metadata" diff --git a/modules/core/locales/ja/LC_MESSAGES/core.po b/modules/core/locales/ja/LC_MESSAGES/core.po index 2e296fb0d9dfde9dc10cd88b4a5a3218b9a437fc..457a8cc931d9e778b50ecd4253383d8e288bcc32 100644 --- a/modules/core/locales/ja/LC_MESSAGES/core.po +++ b/modules/core/locales/ja/LC_MESSAGES/core.po @@ -166,8 +166,8 @@ msgstr "" msgid "{core:frontpage:warnings_https}" msgstr "" "<strong>ã‚ãªãŸã¯HTTPS(æš—å·åŒ–通信)ã‚’è¡Œã£ã¦ã„ã¾ã›ã‚“。</strong>HTTPã¯ãƒ†ã‚¹ãƒˆç’°å¢ƒã§ã‚ã‚Œã°æ£å¸¸ã«å‹•ä½œã—ã¾ã™ã€ã—ã‹ã—製å“環境ã§ã¯HTTPSを使用ã™ã‚‹ã¹ãã§ã™ã€‚[" -" <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">詳ã—ã㯠SimpleSAMLphp ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹æƒ…å ±ã‚’èªã‚“ã§ãã ã•ã„。</a> ]" +" <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">詳ã—ã㯠SimpleSAMLphp ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹æƒ…å ±ã‚’èªã‚“ã§ãã ã•ã„。</a> ]" msgid "{core:frontpage:federation}" msgstr "連æº" @@ -352,8 +352,8 @@ msgid "" "maintenance\">Read more about SimpleSAMLphp maintenance</a> ]" msgstr "" "<strong>ã‚ãªãŸã¯HTTPS(æš—å·åŒ–通信)ã‚’è¡Œã£ã¦ã„ã¾ã›ã‚“。</strong>HTTPã¯ãƒ†ã‚¹ãƒˆç’°å¢ƒã§ã‚ã‚Œã°æ£å¸¸ã«å‹•ä½œã—ã¾ã™ã€ã—ã‹ã—製å“環境ã§ã¯HTTPSを使用ã™ã‚‹ã¹ãã§ã™ã€‚[" -" <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">詳ã—ã㯠SimpleSAMLphp ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹æƒ…å ±ã‚’èªã‚“ã§ãã ã•ã„。</a> ]" +" <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">詳ã—ã㯠SimpleSAMLphp ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹æƒ…å ±ã‚’èªã‚“ã§ãã ã•ã„。</a> ]" msgid "Metadata" msgstr "メタデータ" diff --git a/modules/core/locales/lb/LC_MESSAGES/core.po b/modules/core/locales/lb/LC_MESSAGES/core.po index 5c30d24a4523063590a1c7f6f4ded16b58aa18a8..da87760a77048056f117e49d6349b6ed09f1d2ab 100644 --- a/modules/core/locales/lb/LC_MESSAGES/core.po +++ b/modules/core/locales/lb/LC_MESSAGES/core.po @@ -94,8 +94,8 @@ msgstr "" "<strong>Der benotzt ken HTTPS</strong> - verschlësselt Kommunikatioun mat" " dem Benotzer. SimpleSAMLphp funktionéiert einwandfräi mat HTTP fir " "Testzwéecker mais an engem produktiven Emfeld sollt et besser mat HTTPS " -"lafen. [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-" -"and-configuration\">Liest méi iwert Maintenance vun SimpleSAMLphp</a> ]" +"lafen. [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Liest méi iwert Maintenance vun SimpleSAMLphp</a> ]" msgid "{core:frontpage:required_radius}" msgstr "Néideg fir RADIUS" @@ -187,8 +187,8 @@ msgstr "" "<strong>Der benotzt ken HTTPS</strong> - verschlësselt Kommunikatioun mat" " dem Benotzer. SimpleSAMLphp funktionéiert einwandfräi mat HTTP fir " "Testzwéecker mais an engem produktiven Emfeld sollt et besser mat HTTPS " -"lafen. [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-" -"and-configuration\">Liest méi iwert Maintenance vun SimpleSAMLphp</a> ]" +"lafen. [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Liest méi iwert Maintenance vun SimpleSAMLphp</a> ]" msgid "Metadata" msgstr "Meta Données" diff --git a/modules/core/locales/lt/LC_MESSAGES/core.po b/modules/core/locales/lt/LC_MESSAGES/core.po index f9d0421e331fecb61d6df0abf20932c1cb63b403..aa83f7aaa0d6907754c2a90702d01d0b31bdf6fd 100644 --- a/modules/core/locales/lt/LC_MESSAGES/core.po +++ b/modules/core/locales/lt/LC_MESSAGES/core.po @@ -187,8 +187,8 @@ msgstr "" "<strong>JÅ«s nenaudojate HTTPS</strong> - Å¡ifruotos komunikacijos su " "vartotoju. HTTP puikiai tinka testavimo reikmÄ—ms, taÄiau realioje " "aplinkoje turÄ—tumÄ—te naudoti HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Skaityti daugiau apie SimpleSAMLphp priežiÅ«rÄ…</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Skaityti daugiau apie SimpleSAMLphp priežiÅ«rÄ…</a> ]" msgid "{core:frontpage:federation}" msgstr "Federacija" @@ -397,8 +397,8 @@ msgstr "" "<strong>JÅ«s nenaudojate HTTPS</strong> - Å¡ifruotos komunikacijos su " "vartotoju. HTTP puikiai tinka testavimo reikmÄ—ms, taÄiau realioje " "aplinkoje turÄ—tumÄ—te naudoti HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Skaityti daugiau apie SimpleSAMLphp priežiÅ«rÄ…</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Skaityti daugiau apie SimpleSAMLphp priežiÅ«rÄ…</a> ]" msgid "Metadata" msgstr "Metaduomenys" diff --git a/modules/core/locales/lv/LC_MESSAGES/core.po b/modules/core/locales/lv/LC_MESSAGES/core.po index 9a6df6db5338237d926c15c82eb56283f0b76812..61743892b824f10f948cc63b0f852577b5ceec8d 100644 --- a/modules/core/locales/lv/LC_MESSAGES/core.po +++ b/modules/core/locales/lv/LC_MESSAGES/core.po @@ -177,8 +177,8 @@ msgid "{core:frontpage:warnings_https}" msgstr "" "<strong>JÅ«s neizmantojat HTTPS</strong> - Å¡ifrÄ“tu komunikÄciju ar " "lietotÄju. HTTP ir labs testa nolÅ«kiem, bet ražoÅ¡anÄ jÄizmanto HTTPS. [ " -"<a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Lasiet vairÄk par SimpleSAMLphp uzturÄ“Å¡anu</a> ]" +"<a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Lasiet vairÄk par SimpleSAMLphp uzturÄ“Å¡anu</a> ]" msgid "{core:frontpage:federation}" msgstr "FederÄcija" @@ -375,8 +375,8 @@ msgid "" msgstr "" "<strong>JÅ«s neizmantojat HTTPS</strong> - Å¡ifrÄ“tu komunikÄciju ar " "lietotÄju. HTTP ir labs testa nolÅ«kiem, bet ražoÅ¡anÄ jÄizmanto HTTPS. [ " -"<a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Lasiet vairÄk par SimpleSAMLphp uzturÄ“Å¡anu</a> ]" +"<a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Lasiet vairÄk par SimpleSAMLphp uzturÄ“Å¡anu</a> ]" msgid "Metadata" msgstr "Metadati" diff --git a/modules/core/locales/nb/LC_MESSAGES/core.po b/modules/core/locales/nb/LC_MESSAGES/core.po index 60b841b6f4e0233fc5d3dafc009d283dc28604e3..c10d9d2e5ca974ac419976cad669912ef0699d32 100644 --- a/modules/core/locales/nb/LC_MESSAGES/core.po +++ b/modules/core/locales/nb/LC_MESSAGES/core.po @@ -185,8 +185,8 @@ msgstr "" "<strong>Du bruker ikke HTTPS</strong> - kryptert kommunikasjon med " "brukeren. HTTP fungerer utmerket til testformÃ¥l, men i et " "produksjonsmiljø anbefales sterkt Ã¥ skru pÃ¥ sikker kommunikasjon med " -"HTTPS. [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-" -"and-configuration\">Les mer i dokumentet: SimpleSAMLphp maintenance</a> ]" +"HTTPS. [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Les mer i dokumentet: SimpleSAMLphp maintenance</a> ]" msgid "{core:frontpage:federation}" msgstr "Føderasjon" @@ -389,8 +389,8 @@ msgstr "" "<strong>Du bruker ikke HTTPS</strong> - kryptert kommunikasjon med " "brukeren. HTTP fungerer utmerket til testformÃ¥l, men i et " "produksjonsmiljø anbefales sterkt Ã¥ skru pÃ¥ sikker kommunikasjon med " -"HTTPS. [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-" -"and-configuration\">Les mer i dokumentet: SimpleSAMLphp maintenance</a> ]" +"HTTPS. [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Les mer i dokumentet: SimpleSAMLphp maintenance</a> ]" msgid "Metadata" msgstr "Metadata" diff --git a/modules/core/locales/nl/LC_MESSAGES/core.po b/modules/core/locales/nl/LC_MESSAGES/core.po index 95f5aa885451c3ce9f05e0588d63c74cc4e2860d..d6404e871148310612fc4a7185ecf0a4ccd2b3b2 100644 --- a/modules/core/locales/nl/LC_MESSAGES/core.po +++ b/modules/core/locales/nl/LC_MESSAGES/core.po @@ -36,6 +36,9 @@ msgstr "Suggesties om dit probleem op te lossen:" msgid "{core:frontpage:login_as_admin}" msgstr "Login als beheerder" +msgid "{core:frontpage:logout}" +msgstr "Uitloggen" + msgid "{core:short_sso_interval:warning}" msgstr "" "We hebben waargenomen dat u slechts een paar seconden geleden al " diff --git a/modules/core/locales/nn/LC_MESSAGES/core.po b/modules/core/locales/nn/LC_MESSAGES/core.po index cdbfc5684ac973fcd2fd98ea0fae48f73690841e..368dd7e76b37c2525b2126bf239176d2c92514eb 100644 --- a/modules/core/locales/nn/LC_MESSAGES/core.po +++ b/modules/core/locales/nn/LC_MESSAGES/core.po @@ -182,8 +182,8 @@ msgstr "" "brukaren. Du kan bruka SimpleSAMLphp uten HTTPS til testformÃ¥l, men " "dersom du skal bruka SimpleSAMLphp i eit produksjonsmiljø, vil vi sterkt " "tilrÃ¥ Ã¥ skru pÃ¥ sikker kommunikasjon med HTTPS. [ Les meir i dokumentet: " -"<a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">SimpleSAMLphp maintenance</a> ]" +"<a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">SimpleSAMLphp maintenance</a> ]" msgid "{core:frontpage:federation}" msgstr "Føderasjon" @@ -386,8 +386,8 @@ msgstr "" "brukaren. Du kan bruka SimpleSAMLphp uten HTTPS til testformÃ¥l, men " "dersom du skal bruka SimpleSAMLphp i eit produksjonsmiljø, vil vi sterkt " "tilrÃ¥ Ã¥ skru pÃ¥ sikker kommunikasjon med HTTPS. [ Les meir i dokumentet: " -"<a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">SimpleSAMLphp maintenance</a> ]" +"<a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">SimpleSAMLphp maintenance</a> ]" msgid "Metadata" msgstr "Metadata" diff --git a/modules/core/locales/pt/LC_MESSAGES/core.po b/modules/core/locales/pt/LC_MESSAGES/core.po index c9aec1c5f23718477a8cc1864494b09c83242645..599cf95aac19d32fc5870fa66d3729c700f5b716 100644 --- a/modules/core/locales/pt/LC_MESSAGES/core.po +++ b/modules/core/locales/pt/LC_MESSAGES/core.po @@ -138,8 +138,8 @@ msgstr "" "<strong>Não está a ser usado HTTPS</strong> - comunicação cifrada com o " "utilizador. Para ambientes de teste, ligações HTTP são suficientes, mas " "num ambiente de produção deve ser usado HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Ler mais sobre manutenção do SimpleSAMLphp</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Ler mais sobre manutenção do SimpleSAMLphp</a> ]" msgid "{core:frontpage:federation}" msgstr "Federação" @@ -296,8 +296,8 @@ msgstr "" "<strong>Não está a ser usado HTTPS</strong> - comunicação cifrada com o " "utilizador. Para ambientes de teste, ligações HTTP são suficientes, mas " "num ambiente de produção deve ser usado HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Ler mais sobre manutenção do SimpleSAMLphp</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Ler mais sobre manutenção do SimpleSAMLphp</a> ]" msgid "Metadata" msgstr "Metadados" diff --git a/modules/core/locales/sl/LC_MESSAGES/core.po b/modules/core/locales/sl/LC_MESSAGES/core.po index eaf0bcf67c795d4f22cee633404c83bffa3774a5..802a6f38c92d9cbce6effef674e8c7e3ce553e7d 100644 --- a/modules/core/locales/sl/LC_MESSAGES/core.po +++ b/modules/core/locales/sl/LC_MESSAGES/core.po @@ -177,8 +177,8 @@ msgstr "" "<strong>Ne uporabljate HTTPS</strong>-Å¡ifrirane komunikacije. " "SimpleSAMLphp deluje brez težav na HTTP, vendar le za testne namene, za " "uporabo SimpleSAMLphp v produkcijskem okolju uporabite HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Preberite veÄ o SimpleSAMLphp vzdrževanju</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Preberite veÄ o SimpleSAMLphp vzdrževanju</a> ]" msgid "{core:frontpage:federation}" msgstr "Federacija" @@ -380,8 +380,8 @@ msgstr "" "<strong>Ne uporabljate HTTPS</strong>-Å¡ifrirane komunikacije. " "SimpleSAMLphp deluje brez težav na HTTP, vendar le za testne namene, za " "uporabo SimpleSAMLphp v produkcijskem okolju uporabite HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">Preberite veÄ o SimpleSAMLphp vzdrževanju</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Preberite veÄ o SimpleSAMLphp vzdrževanju</a> ]" msgid "Metadata" msgstr "Metapodatki" diff --git a/modules/core/locales/sr/LC_MESSAGES/core.po b/modules/core/locales/sr/LC_MESSAGES/core.po index f500a2c6f41960e2433f4893752837be934e7e21..9f7a9ea2083b377d1b3b038fa6fed1956cf1194f 100644 --- a/modules/core/locales/sr/LC_MESSAGES/core.po +++ b/modules/core/locales/sr/LC_MESSAGES/core.po @@ -194,8 +194,8 @@ msgstr "" "<strong>Ne koristite HTTPS</strong> - kriptovanu komunikaciju s " "korisnikom. HTTP se može koristiti za potrebe testiranja, ali u " "produkcionom okruženju trebali biste koristiti HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">ProÄitajte viÅ¡e o SimpleSAMLphp podeÅ¡avanjima</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">ProÄitajte viÅ¡e o SimpleSAMLphp podeÅ¡avanjima</a> ]" msgid "{core:frontpage:federation}" msgstr "Federacija" @@ -407,8 +407,8 @@ msgstr "" "<strong>Ne koristite HTTPS</strong> - kriptovanu komunikaciju s " "korisnikom. HTTP se može koristiti za potrebe testiranja, ali u " "produkcionom okruženju trebali biste koristiti HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">ProÄitajte viÅ¡e o SimpleSAMLphp podeÅ¡avanjima</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">ProÄitajte viÅ¡e o SimpleSAMLphp podeÅ¡avanjima</a> ]" msgid "Metadata" msgstr "Medapodaci" diff --git a/modules/core/locales/sv/LC_MESSAGES/core.po b/modules/core/locales/sv/LC_MESSAGES/core.po index f3d8a2c06fd45875d07da6193c0107fd98721f13..6adaceec51b3eb397f156ce0456c5a8eec24f448 100644 --- a/modules/core/locales/sv/LC_MESSAGES/core.po +++ b/modules/core/locales/sv/LC_MESSAGES/core.po @@ -181,8 +181,8 @@ msgid "{core:frontpage:warnings_https}" msgstr "" "<strong>Du använder inte HTTPS</strong> - krypterad kommunikation med " "användaren. HTTP fungerar bra under test men i produktion ska du använda " -"HTTPS. [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-" -"and-configuration\">Läs mer i dokumentet SimpleSAMLphp maintenance</a> ]" +"HTTPS. [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Läs mer i dokumentet SimpleSAMLphp maintenance</a> ]" msgid "{core:frontpage:federation}" msgstr "Federation" @@ -384,8 +384,8 @@ msgid "" msgstr "" "<strong>Du använder inte HTTPS</strong> - krypterad kommunikation med " "användaren. HTTP fungerar bra under test men i produktion ska du använda " -"HTTPS. [ <a href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-" -"and-configuration\">Läs mer i dokumentet SimpleSAMLphp maintenance</a> ]" +"HTTPS. [ <a href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">Läs mer i dokumentet SimpleSAMLphp maintenance</a> ]" msgid "Metadata" msgstr "Metadata" diff --git a/modules/core/locales/zh/LC_MESSAGES/core.po b/modules/core/locales/zh/LC_MESSAGES/core.po index 4cd6c87ff307346ad212fb179ed62e349302993b..f883464c23da8b5a70db3b4816a382738e025155 100644 --- a/modules/core/locales/zh/LC_MESSAGES/core.po +++ b/modules/core/locales/zh/LC_MESSAGES/core.po @@ -162,8 +162,8 @@ msgstr "请求å‚数的长度被PHP Suhosin扩展é™åˆ¶äº†ï¼Œè¯·å¢žå¤§suhosin.ge msgid "{core:frontpage:warnings_https}" msgstr "" "<strong>ä½ æ²¡æœ‰ä½¿ç”¨HTTPS</strong> - å’Œç”¨æˆ·åŠ å¯†çš„é€šä¿¡ã€‚HTTP在测试目的下很好,但生产环境请使用HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">获å–更多SimpleSAMLphp维护的信æ¯</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">获å–更多SimpleSAMLphp维护的信æ¯</a> ]" msgid "{core:frontpage:federation}" msgstr "è”盟" @@ -347,8 +347,8 @@ msgid "" "maintenance\">Read more about SimpleSAMLphp maintenance</a> ]" msgstr "" "<strong>ä½ æ²¡æœ‰ä½¿ç”¨HTTPS</strong> - å’Œç”¨æˆ·åŠ å¯†çš„é€šä¿¡ã€‚HTTP在测试目的下很好,但生产环境请使用HTTPS. [ <a " -"href=\"http://rnd.feide.no/content/simplesamlphp-maintenance-and-" -"configuration\">获å–更多SimpleSAMLphp维护的信æ¯</a> ]" +"href=\"https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance" +"\">获å–更多SimpleSAMLphp维护的信æ¯</a> ]" msgid "Metadata" msgstr "元信æ¯" diff --git a/modules/core/templates/_frontpage_menu.twig b/modules/core/templates/_frontpage_menu.twig index 7b363ffaf4a9178c234fb6e87bff8476e8a101d2..3af633752872c47b9dfb17295676caccffe633dc 100644 --- a/modules/core/templates/_frontpage_menu.twig +++ b/modules/core/templates/_frontpage_menu.twig @@ -1,25 +1,31 @@ <div class="pure-g frontpage-menu"> - <div class="pure-u-2-3"> - <div class="pure-menu pure-menu-horizontal"> - <ul class="pure-menu-list"> - <li class="pure-menu-item {% if frontpage_section == "welcome" %} pure-menu-selected{% endif %}"> - <a href="frontpage_welcome.php" class="pure-menu-link">Welcome</a></li> - <li class="pure-menu-item {% if frontpage_section == "config" %} pure-menu-selected{% endif %}"> - <a href="frontpage_config.php" class="pure-menu-link">Configuration</a></li> - <li class="pure-menu-item {% if frontpage_section == "auth" %} pure-menu-selected{% endif %}"> - <a href="frontpage_auth.php" class="pure-menu-link">Authentication</a></li> - <li class="pure-menu-item {% if frontpage_section == "federation" %} pure-menu-selected{% endif %}"> - <a href="frontpage_federation.php" class="pure-menu-link">Federation</a></li> - </ul> + <div class="pure-u-2-3"> + <div class="pure-menu pure-menu-horizontal"> + <ul class="pure-menu-list"> + <li class="pure-menu-item{% if frontpage_section == "welcome" %} pure-menu-selected{% endif %}"> + <a href="frontpage_welcome.php" class="pure-menu-link">Welcome</a> + </li> + <li class="pure-menu-item{% if frontpage_section == "config" %} pure-menu-selected{% endif %}"> + <a href="frontpage_config.php" class="pure-menu-link">Configuration</a> + </li> + <li class="pure-menu-item{% if frontpage_section == "auth" %} pure-menu-selected{% endif %}"> + <a href="frontpage_auth.php" class="pure-menu-link">Authentication</a> + </li> + <li class="pure-menu-item{% if frontpage_section == "federation" %} pure-menu-selected{% endif %}"> + <a href="frontpage_federation.php" class="pure-menu-link">Federation</a> + </li> + </ul> + </div> </div> - </div> - <div class="pure-u-1-3"> + <div class="pure-u-1-3"> {% if isadmin %} - <p class="float-r youareadmin">{{ '{core:frontpage:loggedin_as_admin}'|trans }}</p> + <p class="float-r youareadmin">{{ '{core:frontpage:loggedin_as_admin}'|trans }} + <a href="{{ logouturl }}"><i class="fa fa-sign-out" title="{{ '{core:frontpage:logout}'|trans }}"></i></a> + </p> {% else %} - <p class="float-r youareadmin"> - <a href="{{ loginurl }}">{{ '{core:frontpage:login_as_admin}'|trans }}</a> - </p> + <p class="float-r youareadmin"> + <a href="{{ loginurl }}">{{ '{core:frontpage:login_as_admin}'|trans }}</a> + </p> {% endif %} - </div> + </div> </div> diff --git a/modules/core/templates/authsource_list.tpl.php b/modules/core/templates/authsource_list.tpl.php index db0a7cede05e88b30b82fdfbae85b4f616adfe82..20522518defa804e70e6e850a8f4ef9447c4b9d2 100644 --- a/modules/core/templates/authsource_list.tpl.php +++ b/modules/core/templates/authsource_list.tpl.php @@ -4,14 +4,13 @@ * */ $this->data['header'] = 'Test authentication sources'; - $this->includeAtTemplateBase('includes/header.php'); ?> <h1><?php echo $this->data['header']; ?></h1> <ul> <?php foreach ($this->data['sources'] as $id) { - echo '<li><a href="?as=' . htmlspecialchars(urlencode($id)) . '">' . htmlspecialchars($id) . '</a></li>'; + echo '<li><a href="?as='.htmlspecialchars(urlencode($id)).'">'.htmlspecialchars($id).'</a></li>'; } ?> </ul> diff --git a/modules/core/templates/authsource_list.twig b/modules/core/templates/authsource_list.twig index acf0d57fa51de28382b6bd9c6760723772cf1121..c966180b7fb54b8ef8b304f65034ba1f7dfd1457 100644 --- a/modules/core/templates/authsource_list.twig +++ b/modules/core/templates/authsource_list.twig @@ -5,7 +5,7 @@ <h1>{{ header }}</h1> <ul> {% for key, name in sources %} - <li><a href="?as={{ name|escape('url') }}">{{ name|escape('html') }}</a></li> + <li><a href="?as={{ name|escape('url') }}">{{ name|escape('html') }}</a></li> {% endfor %} </ul> {% endblock %} diff --git a/modules/core/templates/base.twig b/modules/core/templates/base.twig index 47a732abda4e6ae049b5111bf0bd442861dc78f3..96fcc07baeb873b82c4f94a4e6a17a002a40b500 100644 --- a/modules/core/templates/base.twig +++ b/modules/core/templates/base.twig @@ -2,23 +2,24 @@ {% block contentwrapper %} {% if tabname %} <div id="portalmenu" class="ui-tabs ui-widget ui-widget-content ui-corner-all"> -<ul class="tabset_tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> -{% for name, link in links %} -{% if name == pageid %} -<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"> -<a href="#">{{ link.text|trans }}</a> -</li> -{% else %} -<li class="ui-state-default ui-corner-top"> -<a href="{{ link.href }}">{{ link.text|trans }}</a> -</li> -{% endif %} -{% endfor %} -</ul> -<div id="portalcontent" class="ui-tabs-panel ui-widget-content ui-corner-bottom"> + <ul class="tabset_tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> + {% for name, link in links %} + {% if name == pageid %} + <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"> + <a href="#">{{ link.text|trans }}</a> + </li> + {% else %} + <li class="ui-state-default ui-corner-top"> + <a href="{{ link.href }}">{{ link.text|trans }}</a> + </li> + {% endif %} + {% endfor %} + </ul> + <div id="portalcontent" class="ui-tabs-panel ui-widget-content ui-corner-bottom"> {% endif %} {{ block('content') }} {% if tabname %} -</div></div> + </div> +</div> {% endif %} {% endblock %} diff --git a/modules/core/templates/cardinality_error.tpl.php b/modules/core/templates/cardinality_error.tpl.php index dc75c540afc9b7f71a167a5d397188eca3cb3e47..036f06a675a570b72a2633381955d4b71ba53bc0 100644 --- a/modules/core/templates/cardinality_error.tpl.php +++ b/modules/core/templates/cardinality_error.tpl.php @@ -20,18 +20,17 @@ $this->includeAtTemplateBase('includes/header.php'); <p><?php echo $this->data['cardinality_text']; ?></p> <h3><?php echo $this->data['problematic_attributes']; ?></h3> <dl class="cardinalityErrorAttributes"> -<?php foreach ($this->data['cardinalityErrorAttributes'] as $attr => $v) { ?> - <dt><?php echo $attr ?></td> - <dd><?php echo $this->t('{core:cardinality:got_want}', array('%GOT%' => $v[0], '%WANT%' => htmlspecialchars($v[1]))) ?></dd> - </tr> -<?php } ?> -</dl> <?php +foreach ($this->data['cardinalityErrorAttributes'] as $attr => $v) { + echo '<dt>'.$attr.'</td><dd>'; + echo $this->t( + '{core:cardinality:got_want}', + array('%GOT%' => $v[0], '%WANT%' => htmlspecialchars($v[1])) + ); + echo '</dd></tr>'; +} +echo '</dl>'; if (isset($this->data['LogoutURL'])) { -?> -<p><a href="<?php echo htmlspecialchars($this->data['LogoutURL']); ?>"><?php echo $this->t('{status:logout}'); ?></a></p> -<?php + echo '<p><a href="'.htmlspecialchars($this->data['LogoutURL']).'>">'.$this->t('{status:logout}').'</a></p>'; } -?> -<?php $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/core/templates/frontpage_auth.tpl.php b/modules/core/templates/frontpage_auth.tpl.php index f0594948f1e2f19d7f067de38c526c2908108e0a..afb55b30d72452381c8e02b3f17f346d5ac046dc 100644 --- a/modules/core/templates/frontpage_auth.tpl.php +++ b/modules/core/templates/frontpage_auth.tpl.php @@ -1,34 +1,30 @@ -<?php +<?php $this->data['header'] = $this->t('{core:frontpage:page_title}'); -$this->includeAtTemplateBase('includes/header.php'); +$this->includeAtTemplateBase('includes/header.php'); ?> <?php if ($this->data['isadmin']) { - echo '<p class="float-r youareadmin">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; + echo '<p class="float-r youareadmin">'.$this->t('{core:frontpage:loggedin_as_admin}').'</p>'; } else { - echo '<p class="float-r youareadmin"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; + echo '<p class="float-r youareadmin"><a href="'.$this->data['loginurl'].'">'. + $this->t('{core:frontpage:login_as_admin}').'</a></p>'; } ?> - - -<!-- <h2><?php echo $this->t('{core:frontpage:useful_links_header}'); ?></h2> --> +<!-- <h2><?php echo $this->t('{core:frontpage:useful_links_header}'); ?></h2> --> <ul> <?php - foreach ($this->data['links_auth'] AS $link) { - echo '<li><a href="' . htmlspecialchars($link['href']) . '">' . $this->t($link['text']) . '</a>'; - if (isset($link['deprecated']) && $link['deprecated']) { - echo ' <b>' . $this->t('{core:frontpage:deprecated}') . '</b>'; - } - echo '</li>'; - } +foreach ($this->data['links_auth'] as $link) { + echo '<li><a href="'.htmlspecialchars($link['href']).'">'.$this->t($link['text']).'</a>'; + if (isset($link['deprecated']) && $link['deprecated']) { + echo ' <b>'.$this->t('{core:frontpage:deprecated}').'</b>'; + } + echo '</li>'; +} ?> </ul> - - - <?php $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/core/templates/frontpage_config.tpl.php b/modules/core/templates/frontpage_config.tpl.php index 3e4b52701732b1cc731bd0a0556a3ce1e49b9f45..10f7463cf305b6ceff462533f85f4c5140db68db 100644 --- a/modules/core/templates/frontpage_config.tpl.php +++ b/modules/core/templates/frontpage_config.tpl.php @@ -5,93 +5,74 @@ $this->includeAtTemplateBase('includes/header.php'); ?> - <!-- <div id="tabdiv"> <ul> - <li><a href="#welcome"><?php echo $this->t('{core:frontpage:welcome}'); ?></a></li> - <li><a href="#configuration"><?php echo $this->t('{core:frontpage:configuration}'); ?></a></li> - <li><a href="#metadata"><?php echo $this->t('{core:frontpage:metadata}'); ?></a></li> + <li><a href="#welcome"><?php echo $this->t('{core:frontpage:welcome}'); ?></a></li> + <li><a href="#configuration"><?php echo $this->t('{core:frontpage:configuration}'); ?></a></li> + <li><a href="#metadata"><?php echo $this->t('{core:frontpage:metadata}'); ?></a></li> </ul> --> <?php if ($this->data['isadmin']) { - echo '<p class="float-r youareadmin">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; + echo '<p class="float-r youareadmin">'.$this->t('{core:frontpage:loggedin_as_admin}').'</p>'; } else { - echo '<p class="float-r youareadmin"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; + echo '<p class="float-r youareadmin"><a href="'.$this->data['loginurl'].'">'. + $this->t('{core:frontpage:login_as_admin}').'</a></p>'; } ?> - - - <div style="margin-top: 1em;"> - <code style="background: white; background: #f5f5f5; border: 1px dotted #bbb; padding: 1em; color: #555" ><?php - echo $this->data['directory'] . ' (' . $this->data['version'] . ')'; - ?></code> + <code style="background: white; background: #f5f5f5; border: 1px dotted #bbb; padding: 1em; color: #555" ><?php + echo $this->data['directory'].' ('.$this->data['version'].')'; + ?></code> </div> - - <div style="clear: both" class="enablebox mini"> - <table> - - <?php - $icon_enabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/accept.png" alt="enabled" />'; - $icon_disabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/delete.png" alt="disabled" />'; - ?> - - <tr class="<?php echo $this->data['enablematrix']['saml20idp'] ? 'enabled' : 'disabled'; ?>"><td>SAML 2.0 IdP</td> - <td><?php echo $this->data['enablematrix']['saml20idp'] ? $icon_enabled : $icon_disabled; ?></td></tr> - - <tr class="<?php echo $this->data['enablematrix']['shib13idp'] ? 'enabled' : 'disabled'; ?>"><td>Shib 1.3 IdP</td> - <td><?php echo $this->data['enablematrix']['shib13idp'] ? $icon_enabled : $icon_disabled; ?></td></tr> - - </table> -</div> + <table> + <?php + $icon_enabled = '<img src="/'.$this->data['baseurlpath'].'resources/icons/silk/accept.png" alt="enabled" />'; + $icon_disabled = '<img src="/'.$this->data['baseurlpath'].'resources/icons/silk/delete.png" alt="disabled" />'; + echo '<tr class="'.($this->data['enablematrix']['saml20idp'] ? 'enabled' : 'disabled').'"><td>SAML 2.0 IdP</td>'; + echo '<td>'.($this->data['enablematrix']['saml20idp'] ? $icon_enabled : $icon_disabled).'</td></tr>'; + echo '<tr class="'.($this->data['enablematrix']['shib13idp'] ? 'enabled' : 'disabled').'"><td>Shib 1.3 IdP</td>'; + echo '<td>'.($this->data['enablematrix']['shib13idp'] ? $icon_enabled : $icon_disabled).'</td></tr>'; + ?> + + </table> +</div> <h2><?php echo $this->t('{core:frontpage:configuration}'); ?></h2> <ul> <?php - foreach ($this->data['links_config'] AS $link) { - echo '<li><a href="' . htmlspecialchars($link['href']) . '">' . $this->t($link['text']) . '</a></li>'; - } +foreach ($this->data['links_config'] as $link) { + echo '<li><a href="'.htmlspecialchars($link['href']).'">'.$this->t($link['text']).'</a></li>'; +} ?> </ul> - <?php - if (array_key_exists('warnings', $this->data) && is_array($this->data['warnings']) && !empty($this->data['warnings'])) { - - echo '<h2>' . $this->t('{core:frontpage:warnings}') . '</h2>'; +if (array_key_exists('warnings', $this->data) && is_array($this->data['warnings']) && !empty($this->data['warnings'])) { + echo '<h2>'.$this->t('{core:frontpage:warnings}').'</h2>'; + foreach ($this->data['warnings'] as $warning) { + echo '<div class="caution">'.$warning.'</div>'; + } +} - foreach($this->data['warnings'] AS $warning) { - echo '<div class="caution">'.$warning.'</div>'; - } - } -?> -<?php if ($this->data['isadmin']) { - - echo '<h2>'. $this->t('{core:frontpage:checkphp}') . '</h2>'; - echo '<div class="enablebox"><table>'; - - - $icon_enabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/accept.png" alt="enabled" />'; - $icon_disabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/delete.png" alt="disabled" />'; - - - foreach ($this->data['funcmatrix'] AS $func) { - echo '<tr class="' . ($func['enabled'] ? 'enabled' : 'disabled') . '"><td>' . ($func['enabled'] ? $icon_enabled : $icon_disabled) . '</td>'; - echo '<td>' . $this->t($this->data['requiredmap'][$func['required']]) . '</td><td>' . $func['descr'] . '</td></tr>'; - } - echo('</table></div>'); + echo '<h2>'.$this->t('{core:frontpage:checkphp}').'</h2>'; + echo '<div class="enablebox"><table>'; + + $icon_enabled = '<img src="/'.$this->data['baseurlpath'].'resources/icons/silk/accept.png" alt="enabled" />'; + $icon_disabled = '<img src="/'.$this->data['baseurlpath'].'resources/icons/silk/delete.png" alt="disabled" />'; + + foreach ($this->data['funcmatrix'] as $func) { + echo '<tr class="'.($func['enabled'] ? 'enabled' : 'disabled').'"><td>'. + ($func['enabled'] ? $icon_enabled : $icon_disabled).'</td>'; + echo '<td>'.$this->t($this->data['requiredmap'][$func['required']]).'</td><td>'.$func['descr'].'</td></tr>'; + } + echo '</table></div>'; } -?> - - - - -<?php $this->includeAtTemplateBase('includes/footer.php'); +$this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/core/templates/frontpage_config.twig b/modules/core/templates/frontpage_config.twig index 20802aebb37ec7188b70184c00edad050a0b5a0c..c0fb87b95d4002e18b6337e46aafaddd1ccc7126 100644 --- a/modules/core/templates/frontpage_config.twig +++ b/modules/core/templates/frontpage_config.twig @@ -9,8 +9,8 @@ <code class="simplesaml_version">{{ directory }} ({{ version }})</code> </div> - {% set icon_enabled = '<img src="/' ~ baseurlpath ~ 'resources/icons/silk/accept.png" alt="enabled" />' %} - {% set icon_disabled = '<img src="/' ~ baseurlpath ~ 'resources/icons/silk/delete.png" alt="disabled" />' %} + {% set icon_enabled = '<i class="fa fa-check"></i>' %} + {% set icon_disabled = '<i class="fa fa-ban"></i>' %} <div class="enablebox mini"> <table> diff --git a/modules/core/templates/frontpage_federation.tpl.php b/modules/core/templates/frontpage_federation.tpl.php index f6e1596c560a6e76e12f3e109bedcdaf0e51265d..2516c065a520eb446bcca15940dab780a52763d1 100644 --- a/modules/core/templates/frontpage_federation.tpl.php +++ b/modules/core/templates/frontpage_federation.tpl.php @@ -43,7 +43,6 @@ if (is_array($this->data['metaentries']['hosted']) && count($this->data['metaent if (is_array($this->data['metaentries']['remote']) && count($this->data['metaentries']['remote']) > 0) { $now = time(); foreach ($this->data['metaentries']['remote'] as $setkey => $set) { - echo '<fieldset class="fancyfieldset"><legend>'.$this->t($this->data['mtype'][$setkey]).' (Trusted)</legend>'; echo '<ul>'; foreach ($set as $entry) { @@ -81,26 +80,26 @@ if (is_array($this->data['metaentries']['remote']) && count($this->data['metaent echo '</fieldset>'; } } + +echo '<h2>'.$this->t('{core:frontpage:tools}').'</h2>'; +echo '<ul>'; +foreach ($this->data['links_federation'] as $link) { + echo '<li><a href="'.htmlspecialchars($link['href']).'">'.$this->t($link['text']).'</a></li>'; +} +echo '</ul>'; +if ($this->data['isadmin']) { ?> - <h2><?php echo $this->t('{core:frontpage:tools}'); ?></h2> - <ul><?php - foreach ($this->data['links_federation'] as $link) { - echo '<li><a href="'.htmlspecialchars($link['href']).'">'.$this->t($link['text']).'</a></li>'; - } -?> - </ul> -<?php - if ($this->data['isadmin']) { ?> <fieldset class="fancyfieldset"> <legend>Lookup metadata</legend> <form action="<?php echo SimpleSAML\Module::getModuleURL('core/show_metadata.php'); ?>" method="get"> <p style="margin: 1em 2em ">Look up metadata for entity: - <select name="set"><?php - if (is_array($this->data['metaentries']['remote']) && count($this->data['metaentries']['remote']) > 0) { - foreach ($this->data['metaentries']['remote'] as $setkey => $set) { - echo '<option value="'.htmlspecialchars($setkey).'">'.$this->t($this->data['mtype'][$setkey]).'</option>'; - } - } + <select name="set"> +<?php + if (is_array($this->data['metaentries']['remote']) && count($this->data['metaentries']['remote']) > 0) { + foreach ($this->data['metaentries']['remote'] as $setkey => $set) { + echo '<option value="'.htmlspecialchars($setkey).'">'.$this->t($this->data['mtype'][$setkey]).'</option>'; + } + } ?> </select> <input type="text" name="entityid" /> @@ -109,5 +108,5 @@ if (is_array($this->data['metaentries']['remote']) && count($this->data['metaent </form> </fieldset> <?php - } +} $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/core/templates/frontpage_welcome.tpl.php b/modules/core/templates/frontpage_welcome.tpl.php index 33d5ff25113874dd9ded7b920b7d94a7d5c8209d..da5c2e5297df57f79fd9fac751a7f0832cb3cebc 100644 --- a/modules/core/templates/frontpage_welcome.tpl.php +++ b/modules/core/templates/frontpage_welcome.tpl.php @@ -1,36 +1,23 @@ -<?php - +<?php $this->data['header'] = $this->t('{core:frontpage:page_title}'); -$this->includeAtTemplateBase('includes/header.php'); - -?> - +$this->includeAtTemplateBase('includes/header.php'); -<?php if ($this->data['isadmin']) { - echo '<p class="float-r youareadmin">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; + echo '<p class="float-r youareadmin">'.$this->t('{core:frontpage:loggedin_as_admin}').'</p>'; } else { - echo '<p class="float-r youareadmin"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; + echo '<p class="float-r youareadmin"><a href="'.$this->data['loginurl'].'">'. + $this->t('{core:frontpage:login_as_admin}').'</a></p>'; } ?> <p><?php echo $this->t('{core:frontpage:intro}'); ?></p> - <ul> <?php - foreach ($this->data['links_welcome'] AS $link) { - echo '<li><a href="' . htmlspecialchars($link['href']) . '">' . $this->t($link['text']) . '</a></li>'; - } +foreach ($this->data['links_welcome'] as $link) { + echo '<li><a href="'. htmlspecialchars($link['href']).'">'.$this->t($link['text']).'</a></li>'; +} ?> </ul> - - - - <h2><?php echo $this->t('{core:frontpage:about_header}'); ?></h2> - <p><?php echo $this->t('{core:frontpage:about_text}'); ?></p> - - - <?php $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/core/templates/frontpage_welcome.twig b/modules/core/templates/frontpage_welcome.twig index de2f3757ca2897b077d688bdceb14e86ab0cd5ed..653c549352d21e8cdcd9ad4cc05bca15cfc34c2a 100644 --- a/modules/core/templates/frontpage_welcome.twig +++ b/modules/core/templates/frontpage_welcome.twig @@ -12,6 +12,4 @@ {% endfor %} </ul> - <h2>{{ '{core:frontpage:about_header}'|trans }}</h2> - <p>{{ '{core:frontpage:about_text}'|trans|raw }}</p> {% endblock %} diff --git a/modules/core/templates/login.twig b/modules/core/templates/login.twig index adf3f8426029a838847c170c28d8c70946067a9d..e1b342cc0a9ba9e71324930c7ff732f2e69f860e 100644 --- a/modules/core/templates/login.twig +++ b/modules/core/templates/login.twig @@ -2,7 +2,7 @@ {% extends "@core/base.twig" %} {% block content %} -<h1>{{ pagetitle|trans }}</h1> + <h1>{{ pagetitle|trans }}</h1> <p>Please choose one of the following authentication methods: </p> {% if sources is empty -%} @@ -17,4 +17,4 @@ </ul> </div> {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/modules/core/templates/loginuserpass.php b/modules/core/templates/loginuserpass.php index 61b16608836684e80f3589483fbefe20d30ea8f5..9e0fc646a1829f9fc93ac02f9cb43ea78200f744 100644 --- a/modules/core/templates/loginuserpass.php +++ b/modules/core/templates/loginuserpass.php @@ -8,26 +8,37 @@ if (strlen($this->data['username']) > 0) { } $this->includeAtTemplateBase('includes/header.php'); -?> - -<?php if ($this->data['errorcode'] !== null) { - ?> +?> <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5"> <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l erroricon" style="margin: 15px" alt=""/> <h2><?php echo $this->t('{login:error_header}'); ?></h2> - <p><strong><?php - echo htmlspecialchars($this->t($this->data['errorcodes']['title'][$this->data['errorcode']], $this->data['errorparams'])); ?></strong></p> - - <p><?php - echo htmlspecialchars($this->t($this->data['errorcodes']['descr'][$this->data['errorcode']], $this->data['errorparams'])); ?></p> + <p><strong> + <?php + echo htmlspecialchars( + $this->t( + $this->data['errorcodes']['title'][$this->data['errorcode']], + $this->data['errorparams'] + ) + ); + ?> + </strong></p> + <p> + <?php + echo htmlspecialchars( + $this->t( + $this->data['errorcodes']['descr'][$this->data['errorcode']], + $this->data['errorparams'] + ) + ); + ?> + </p> </div> <?php } - ?> <h2 style="break: both"><?php echo $this->t('{login:user_pass_header}'); ?></h2> @@ -38,15 +49,14 @@ if ($this->data['errorcode'] !== null) { <tr> <td rowspan="2" class="loginicon"> <img alt="" - src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" /> + src="/<?php echo $this->data['baseurlpath']; ?> + resources/icons/experience/gtk-dialog-authentication.48x48.png" /> </td> <td><label for="username"><?php echo $this->t('{login:username}'); ?></label></td> <td> <input id="username" <?php echo ($this->data['forceUsername']) ? 'disabled="disabled"' : ''; ?> - type="text" name="username" -<?php if (!$this->data['forceUsername']) { - echo 'tabindex="1"'; -} ?> value="<?php echo htmlspecialchars($this->data['username']); ?>"/> + type="text" name="username"<?php echo $this->data['forceUsername'] ? '' : 'tabindex="1"'; ?> + value="<?php echo htmlspecialchars($this->data['username']); ?>" /> </td> <?php if ($this->data['rememberUsernameEnabled'] && !$this->data['forceUsername']) { @@ -55,7 +65,7 @@ if ($this->data['errorcode'] !== null) { <td id="regular_remember_username"> <input type="checkbox" id="remember_username" tabindex="4" <?php echo ($this->data['rememberUsernameChecked']) ? 'checked="checked"' : ''; ?> - name="remember_username" value="Yes"/> + name="remember_username" value="Yes" /> <small><?php echo $this->t('{login:remember_username}'); ?></small> </td> <?php @@ -65,24 +75,22 @@ if ($this->data['errorcode'] !== null) { <?php if ($this->data['rememberUsernameEnabled'] && !$this->data['forceUsername']) { // display the "remember my username" checkbox - ?> + ?> <tr id="mobile_remember_username"> <td> </td> <td> <input type="checkbox" id="remember_username" tabindex="4" <?php echo ($this->data['rememberUsernameChecked']) ? 'checked="checked"' : ''; ?> - name="remember_username" value="Yes"/> + name="remember_username" value="Yes" /> <small><?php echo $this->t('{login:remember_username}'); ?></small> </td> </tr> - <?php + <?php } ?> <tr> <td><label for="password"><?php echo $this->t('{login:password}'); ?></label></td> - <td> - <input id="password" type="password" tabindex="2" name="password"/> - </td> + <td><input id="password" type="password" tabindex="2" name="password" /></td> <?php if ($this->data['rememberMeEnabled']) { // display the remember me checkbox (keep me logged in) @@ -90,7 +98,7 @@ if ($this->data['errorcode'] !== null) { <td id="regular_remember_me"> <input type="checkbox" id="remember_me" tabindex="5" <?php echo ($this->data['rememberMeChecked']) ? 'checked="checked"' : ''; ?> - name="remember_me" value="Yes"/> + name="remember_me" value="Yes" /> <small><?php echo $this->t('{login:remember_me}'); ?></small> </td> <?php @@ -106,7 +114,7 @@ if ($this->data['errorcode'] !== null) { <td id="mobile_remember_me"> <input type="checkbox" id="remember_me" tabindex="5" <?php echo ($this->data['rememberMeChecked']) ? 'checked="checked"' : ''; ?> - name="remember_me" value="Yes"/> + name="remember_me" value="Yes" /> <small><?php echo $this->t('{login:remember_me}'); ?></small> </td> </tr> @@ -115,61 +123,62 @@ if ($this->data['errorcode'] !== null) { ?> <?php if (array_key_exists('organizations', $this->data)) { - ?> + ?> <tr> <td></td> <td><label for="organization"><?php echo $this->t('{login:organization}'); ?></label></td> <td><select name="organization" tabindex="3"> - <?php - if (array_key_exists('selectedOrg', $this->data)) { - $selectedOrg = $this->data['selectedOrg']; - } else { - $selectedOrg = null; - } - - foreach ($this->data['organizations'] as $orgId => $orgDesc) { - if (is_array($orgDesc)) { - $orgDesc = $this->t($orgDesc); - } + <?php + if (array_key_exists('selectedOrg', $this->data)) { + $selectedOrg = $this->data['selectedOrg']; + } else { + $selectedOrg = null; + } - if ($orgId === $selectedOrg) { - $selected = 'selected="selected" '; - } else { - $selected = ''; - } + foreach ($this->data['organizations'] as $orgId => $orgDesc) { + if (is_array($orgDesc)) { + $orgDesc = $this->t($orgDesc); + } - echo '<option '.$selected.'value="'.htmlspecialchars($orgId).'">'.htmlspecialchars($orgDesc).'</option>'; + if ($orgId === $selectedOrg) { + $selected = 'selected="selected" '; + } else { + $selected = ''; } - ?> + + echo '<option '.$selected.'value="'.htmlspecialchars($orgId).'">'. + htmlspecialchars($orgDesc).'</option>'; + } + ?> </select></td> <td style="padding: .4em;"> <?php if ($this->data['rememberOrganizationEnabled']) { echo str_repeat("\t", 4); - echo '<input type="checkbox" id="remember_organization" tabindex="5" name="remember_organization" value="Yes" '; - echo ($this->data['rememberOrganizationChecked'] ? 'checked="Yes" /> ' : '/> '); - echo $this->t('{login:remember_organization}'); + echo '<input type="checkbox" id="remember_organization" tabindex="5"'. + ' name="remember_organization" value="Yes" '. + ($this->data['rememberOrganizationChecked'] ? 'checked="Yes" /> ' : '/> '). + $this->t('{login:remember_organization}'); } ?> </td> </tr> - <?php + <?php } ?> <tr id="submit"> <td class="loginicon"></td><td></td> <td> - <button class="btn" - onclick="this.value='<?php echo $this->t('{login:processing}'); ?>'; - this.disabled=true; this.form.submit(); return true;" tabindex="6"> + <button id="submit_button" class="btn" tabindex="6"> <?php echo $this->t('{login:login_button}'); ?> </button> </td> </tr> </table> + <input type="hidden" id="processing_trans" value="<?php echo $this->t('{login:processing}'); ?>" /> <?php foreach ($this->data['stateparams'] as $name => $value) { - echo('<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'); + echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'; } ?> </form> @@ -181,7 +190,7 @@ if (!empty($this->data['links'])) { } echo '</ul>'; } -echo('<h2 class="logintext">'.$this->t('{login:help_header}').'</h2>'); -echo('<p class="logintext">'.$this->t('{login:help_text}').'</p>'); +echo '<h2 class="logintext">'.$this->t('{login:help_header}').'</h2>'; +echo '<p class="logintext">'.$this->t('{login:help_text}').'</p>'; $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/core/templates/loginuserpass.twig b/modules/core/templates/loginuserpass.twig index 7f27bc186072f50cb616145daf0d596c4b12d79d..f474a339cfe0b82ec00bdbf8eeafbd7a18de1e0b 100644 --- a/modules/core/templates/loginuserpass.twig +++ b/modules/core/templates/loginuserpass.twig @@ -2,6 +2,10 @@ {% extends "@core/base.twig" %} +{% block postload %} + <script src="/{{baseurlpath}}module.php/core/assets/js/loginuserpass.js"></script> +{% endblock %} + {% block content %} {% if errorcode -%} <div class="pure-g"> @@ -99,10 +103,10 @@ </div> <!-- form-align--> <br><br> - <button class="pure-button pure-button-red pure-input-1-2 pure-input-sm-1-1 right" type="submit" onclick="this.value='{{ 'Processing...'|trans }}';" tabindex="6"> + <button class="pure-button pure-button-red pure-input-1-2 pure-input-sm-1-1 right" id="submit_button" type="submit" tabindex="6"> {{ 'Login'|trans }} </button> - + <input type='hidden' id="processing_trans" value="{{ 'Processing...'|trans }}" /> {% for name, value in stateparams -%} <input type="hidden" name="{{ name }}" value="{{ value }}" /> {%- endfor %} diff --git a/modules/core/templates/logout-iframe.php b/modules/core/templates/logout-iframe.php index 634ed122da80247efe7fd85625758848c3338e7c..59e6ae770cbd24e7e1b366dee5deff94e9a6478e 100644 --- a/modules/core/templates/logout-iframe.php +++ b/modules/core/templates/logout-iframe.php @@ -71,8 +71,8 @@ if ($type === 'embed') { $this->includeAtTemplateBase('includes/header.php'); } ?> - <div id="wrap"> - <div id="content"> +<div id="wrap"> + <div id="content"> <?php if ($from !== null) { echo '<div><img style="float: left; margin-right: 12px" src="/'.$this->data['baseurlpath']. @@ -90,9 +90,9 @@ if ($type === 'init') { } else { echo $this->t('{logout:logging_out_from}'); } -echo('</p>'); ?> - <table id="slostatustable"> + </p> + <table id="slostatustable"> <?php foreach ($SPs as $assocId => $sp) { if (isset($sp['core:Logout-IFrame:Name'])) { @@ -123,24 +123,26 @@ if (isset($from)) { } ?> - </table> - </div> + </table> +</div> <?php if ($type === 'init') { ?> - <div id="confirmation" style="margin-top: 1em"> - <p><?php echo $this->t('{logout:logout_all_question}'); ?> <br/></p> - <form id="startform" method="get" style="display:inline;" action="logout-iframe.php"> - <input type="hidden" name="id" value="<?php echo $id; ?>"/> - <input type="hidden" id="logout-type-selector" name="type" value="nojs"/> - <button type="submit" id="logout-all" name="ok" class="btn"><?php echo $this->t('{logout:logout_all}'); ?></button> - </form> - <form method="get" style="display:inline;" action="logout-iframe-done.php"> - <input type="hidden" name="id" value="<?php echo $id; ?>"/> - <button type="submit" name="cancel" class="btn"><?php echo $logoutCancelText; ?></button> - </form> - </div> +<div id="confirmation" style="margin-top: 1em"> + <p><?php echo $this->t('{logout:logout_all_question}'); ?> <br/></p> + <form id="startform" method="get" style="display:inline;" action="logout-iframe.php"> + <input type="hidden" name="id" value="<?php echo $id; ?>"/> + <input type="hidden" id="logout-type-selector" name="type" value="nojs"/> + <button type="submit" id="logout-all" name="ok" class="btn"> + <?php echo $this->t('{logout:logout_all}'); ?> + </button> + </form> + <form method="get" style="display:inline;" action="logout-iframe-done.php"> + <input type="hidden" name="id" value="<?php echo $id; ?>"/> + <button type="submit" name="cancel" class="btn"><?php echo $logoutCancelText; ?></button> + </form> +</div> <?php } else { if ($nFailed > 0) { @@ -150,7 +152,8 @@ if ($type === 'init') { } echo '<div id="logout-failed-message" style="margin-top: 1em; border: 1px solid #ccc; padding: 1em; '. 'background: #eaeaea;'.$displayStyle.'">'; - echo '<img src="/'.$this->data['baseurlpath'].'resources/icons/experience/gtk-dialog-warning.48x48.png" alt="" '. + echo '<img src="/'.$this->data['baseurlpath']. + 'resources/icons/experience/gtk-dialog-warning.48x48.png" alt="" '. 'style="float: left; margin-right: 5px;" />'; echo '<p>'.$this->t('{logout:failedsps}').'</p>'; echo '<form method="post" action="logout-iframe-done.php" id="failed-form" target="_top">'; @@ -166,11 +169,11 @@ if ($type === 'init') { } echo '<p>'.$this->t('{logout:success}').'</p>'; ?> - <form method="post" action="logout-iframe-done.php" id="done-form" target="_top"> - <input type="hidden" name="id" value="<?php echo $id; ?>"/> - <button type="submit" name="continue" class="btn"><?php echo $this->t('{logout:return}'); ?></button> - </form> - </div> + <form method="post" action="logout-iframe-done.php" id="done-form" target="_top"> + <input type="hidden" name="id" value="<?php echo $id; ?>"/> + <button type="submit" name="continue" class="btn"><?php echo $this->t('{logout:return}'); ?></button> + </form> +</div> <?php if ($type === 'js') { foreach ($SPs as $assocId => $sp) { @@ -185,8 +188,8 @@ if ($type === 'init') { } } ?> - </div><!-- #content --> - </div><!-- #wrap --> + </div><!-- #content --> + </div><!-- #wrap --> <?php if ($type === 'embed') { $this->includeAtTemplateBase('includes/footer-embed.php'); diff --git a/modules/core/templates/no_metadata.tpl.php b/modules/core/templates/no_metadata.tpl.php index d3b638b22542158ff7c6042c6433947291cb612c..a00f3ce911bd2bf97f7ab11dc6200e4a109dd015 100644 --- a/modules/core/templates/no_metadata.tpl.php +++ b/modules/core/templates/no_metadata.tpl.php @@ -1,9 +1,8 @@ <?php -echo('<p>' . $this->t('{core:no_metadata:config_problem}') . '</p>'); - -echo('<ul>'); -echo('<li>' . $this->t('{core:no_metadata:suggestion_user_link}') . '</li>'); -echo('<li>' . $this->t('{core:no_metadata:suggestion_developer}') . '</li>'); -echo('</ul>'); +echo '<p>'.$this->t('{core:no_metadata:config_problem}').'</p>'; +echo '<ul>'; +echo '<li>'.$this->t('{core:no_metadata:suggestion_user_link}').'</li>'; +echo '<li>'.$this->t('{core:no_metadata:suggestion_developer}').'</li>'; +echo '</ul>'; diff --git a/modules/core/templates/no_metadata.twig b/modules/core/templates/no_metadata.twig index 818c08a8ca46d0a222f8f64c87b00f588ecbc23e..0f534fcdab94a9dbb9982ac1bfae1304c1c8e05c 100644 --- a/modules/core/templates/no_metadata.twig +++ b/modules/core/templates/no_metadata.twig @@ -1,7 +1,7 @@ -<p>{{ '{core:no_metadata:config_problem}' | trans }}</p> +<p>{{ '{core:no_metadata:config_problem}'|trans }}</p> <ul> - <li>{{ '{core:no_metadata:suggestion_user_link}' | trans }}</li> - <li>{{ '{core:no_metadata:suggestion_developer}' | trans }}</li> + <li>{{ '{core:no_metadata:suggestion_user_link}'|trans }}</li> + <li>{{ '{core:no_metadata:suggestion_developer}'|trans }}</li> </ul> diff --git a/modules/core/templates/no_state.tpl.php b/modules/core/templates/no_state.tpl.php index f86e346e0e8fdebe1360e384c0f941a7dee8a639..01ea6db789e94678cd97d8c384909037c5afdf71 100644 --- a/modules/core/templates/no_state.tpl.php +++ b/modules/core/templates/no_state.tpl.php @@ -1,15 +1,14 @@ <?php -echo('<h3>' . $this->t('{core:no_state:suggestions}') . '</h3>'); -echo('<ul>'); -echo('<li>' . $this->t('{core:no_state:suggestion_goback}') . '</li>'); -echo('<li>' . $this->t('{core:no_state:suggestion_closebrowser}') . '</li>'); -echo('</ul>'); - -echo('<h3>' . $this->t('{core:no_state:causes}') . '</h3>'); -echo('<ul>'); -echo('<li>' . $this->t('{core:no_state:cause_backforward}') . '</li>'); -echo('<li>' . $this->t('{core:no_state:cause_openbrowser}') . '</li>'); -echo('<li>' . $this->t('{core:no_state:cause_nocookie}') . '</li>'); -echo('</ul>'); +echo '<h3>'.$this->t('{core:no_state:suggestions}').'</h3>'; +echo '<ul>'; +echo '<li>'.$this->t('{core:no_state:suggestion_goback}').'</li>'; +echo '<li>'.$this->t('{core:no_state:suggestion_closebrowser}').'</li>'; +echo '</ul>'; +echo '<h3>'.$this->t('{core:no_state:causes}').'</h3>'; +echo '<ul>'; +echo '<li>'.$this->t('{core:no_state:cause_backforward}').'</li>'; +echo '<li>'.$this->t('{core:no_state:cause_openbrowser}').'</li>'; +echo '<li>'.$this->t('{core:no_state:cause_nocookie}').'</li>'; +echo '</ul>'; diff --git a/modules/core/templates/no_state.twig b/modules/core/templates/no_state.twig index 9ae61fb5dcbc9316dfab58a2286b69698e6ec2d4..b811c102506c386e15a3606a3e796dc56bea93f9 100644 --- a/modules/core/templates/no_state.twig +++ b/modules/core/templates/no_state.twig @@ -1,12 +1,12 @@ -<h3>{{ '{core:no_state:suggestions}' | trans }}</h3> +<h3>{{ '{core:no_state:suggestions}'|trans }}</h3> <ul> - <li>{{ '{core:no_state:suggestion_goback}' | trans }}</li> - <li>{{ '{core:no_state:suggestion_closebrowser}' | trans }}</li> + <li>{{ '{core:no_state:suggestion_goback}'|trans }}</li> + <li>{{ '{core:no_state:suggestion_closebrowser}'|trans }}</li> </ul> -<h3>{{ '{core:no_state:causes}' | trans }}</h3> +<h3>{{ '{core:no_state:causes}'|trans }}</h3> <ul> - <li>{{ '{core:no_state:cause_backforward}' | trans }}</li> - <li>{{ '{core:no_state:cause_openbrowser}' | trans }}</li> - <li>{{ '{core:no_state:cause_nocookie}' | trans }}</li> + <li>{{ '{core:no_state:cause_backforward}'|trans }}</li> + <li>{{ '{core:no_state:cause_openbrowser}'|trans }}</li> + <li>{{ '{core:no_state:cause_nocookie}'|trans }}</li> </ul> diff --git a/modules/core/templates/short_sso_interval.php b/modules/core/templates/short_sso_interval.php index ac334a6c0d8ca6f47f9f5b9c37a8bd28dd16840d..2e305c2b9ddf1ac3a6a190c36a7fc626e3665040 100644 --- a/modules/core/templates/short_sso_interval.php +++ b/modules/core/templates/short_sso_interval.php @@ -14,15 +14,17 @@ $this->data['header'] = $this->t('{core:short_sso_interval:warning_header}'); $this->data['autofocus'] = 'contbutton'; $this->includeAtTemplateBase('includes/header.php'); +$target = htmlspecialchars($this->data['target']); +$contButton = htmlspecialchars($this->t('{core:short_sso_interval:retry}')); ?> <h1><?php echo $this->data['header']; ?></h1> -<form style="display: inline; margin: 0px; padding: 0px" action="<?php echo htmlspecialchars($this->data['target']); ?>"> +<form style="display: inline; margin: 0px; padding: 0px" action="<?php echo $target; ?>"> <?php - // Embed hidden fields... - foreach ($this->data['params'] as $name => $value) { - echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'; - } +// Embed hidden fields... +foreach ($this->data['params'] as $name => $value) { + echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'; +} ?> <p><?php echo $this->t('{core:short_sso_interval:warning}'); ?></p> <div class="trackidtext"><p> @@ -31,7 +33,7 @@ $this->includeAtTemplateBase('includes/header.php'); </p> </div> - <input type="submit" name="continue" id="contbutton" value="<?php echo htmlspecialchars($this->t('{core:short_sso_interval:retry}')) ?>" /> + <input type="submit" name="continue" id="contbutton" value="<?php echo $contButton; ?>" /> </form> diff --git a/modules/core/templates/short_sso_interval.twig b/modules/core/templates/short_sso_interval.twig index 91288cd9f7d5cfe94ca5b20de621dcb4c51262ac..542e174c0a9315e54c873bafe4895e17dd5473f6 100644 --- a/modules/core/templates/short_sso_interval.twig +++ b/modules/core/templates/short_sso_interval.twig @@ -5,12 +5,12 @@ <h1>{{ header }}</h1> <form style="display: inline; margin: 0px; padding: 0px" action="{{ target|escape('html') }}"> {% for name, value in params %} - <input type="hidden" name="{{ name|escape('html') }}" value="{{ value|escape('html') }}" /> + <input type="hidden" name="{{ name|escape('html') }}" value="{{ value|escape('html') }}"> {% endfor %} <p>{{ '{core:short_sso_interval:warning}'|trans }}</p> <div class="trackidtext"> <p>{{ '{errors:report_trackid}'|trans }}<span class="trackid">{{ trackId }}</span></p> </div> - <input type="submit" name="continue" id="contbutton" value="'{core:short_sso_interval:retry}'|trans|escape('html') }}" /> + <input type="submit" name="continue" id="contbutton" value="'{core:short_sso_interval:retry}'|trans|escape('html') }}" autofocus> </form> {% endblock %} diff --git a/modules/core/www/assets/js/loginuserpass.js b/modules/core/www/assets/js/loginuserpass.js new file mode 100644 index 0000000000000000000000000000000000000000..e475e8ca6ec6a497dc7159695c82e2806d463906 --- /dev/null +++ b/modules/core/www/assets/js/loginuserpass.js @@ -0,0 +1,15 @@ +document.addEventListener( + 'DOMContentLoaded', + function () { + var button = document.getElementById("submit_button"); + button.addEventListener( + 'click', + function () { + var translation = document.getElementById("processing_trans"); + this.disabled = true; + this.innerHTML = translation.value; + return true; + } + ); + } +); diff --git a/modules/core/www/cardinality_error.php b/modules/core/www/cardinality_error.php index c73a4fee6da9746252c3a3b6b749c60ad6cef971..9c14a82157719bb60a15d71fa5583397ef76f798 100644 --- a/modules/core/www/cardinality_error.php +++ b/modules/core/www/cardinality_error.php @@ -20,7 +20,10 @@ $globalConfig = \SimpleSAML\Configuration::getInstance(); $t = new \SimpleSAML\XHTML\Template($globalConfig, 'core:cardinality_error.tpl.php'); $t->data['cardinalityErrorAttributes'] = $state['core:cardinality:errorAttributes']; if (isset($state['Source']['auth'])) { - $t->data['LogoutURL'] = \SimpleSAML\Module::getModuleURL('core/authenticate.php', array('as' => $state['Source']['auth']))."&logout"; + $t->data['LogoutURL'] = \SimpleSAML\Module::getModuleURL( + 'core/authenticate.php', + array('as' => $state['Source']['auth']) + )."&logout"; } header('HTTP/1.0 403 Forbidden'); $t->show(); diff --git a/modules/core/www/cleardiscochoices.php b/modules/core/www/cleardiscochoices.php index 8d134f7d758d1af750f14d844dbdf6f36b598cfb..afc794a0e3b366b3c83b3fdb1b9e2c8940fe1c34 100644 --- a/modules/core/www/cleardiscochoices.php +++ b/modules/core/www/cleardiscochoices.php @@ -33,4 +33,3 @@ if (array_key_exists('ReturnTo', $_REQUEST)) { // Redirect to destination. \SimpleSAML\Utils\HTTP::redirectTrustedURL($returnTo); - diff --git a/modules/core/www/frontpage_auth.php b/modules/core/www/frontpage_auth.php index 0c9fb078777bb0e2b2c8645147e3f3eb755cec3e..804f3cd6fb338fc1e17521670fb357045ff4e0a5 100644 --- a/modules/core/www/frontpage_auth.php +++ b/modules/core/www/frontpage_auth.php @@ -10,6 +10,7 @@ if ($config->getBoolean('admin.protectindexpage', false)) { } $loginurl = \SimpleSAML\Utils\Auth::getAdminLoginURL(); $isadmin = \SimpleSAML\Utils\Auth::isAdmin(); +$logouturl = \SimpleSAML\Utils\Auth::getAdminLogoutURL(); $links = array(); $links_welcome = array(); @@ -35,6 +36,7 @@ $t = new \SimpleSAML\XHTML\Template($config, 'core:frontpage_auth.tpl.php'); $t->data['pageid'] = 'frontpage_auth'; $t->data['isadmin'] = $isadmin; $t->data['loginurl'] = $loginurl; +$t->data['logouturl'] = $logouturl; $t->data['header'] = $t->getTranslator()->t('{core:frontpage:page_title}'); $t->data['links'] = $links; @@ -44,5 +46,3 @@ $t->data['links_auth'] = $links_auth; $t->data['links_federation'] = $links_federation; $t->show(); - - diff --git a/modules/core/www/frontpage_config.php b/modules/core/www/frontpage_config.php index dc595db4739fe9c6ef5c2d6747539fd85cf89eb5..ae7a7d6baf991bb03ae7d7e080c2a6bb1702e22d 100644 --- a/modules/core/www/frontpage_config.php +++ b/modules/core/www/frontpage_config.php @@ -10,7 +10,7 @@ if ($config->getBoolean('admin.protectindexpage', false)) { } $loginurl = \SimpleSAML\Utils\Auth::getAdminLoginURL(); $isadmin = \SimpleSAML\Utils\Auth::isAdmin(); - +$logouturl = \SimpleSAML\Utils\Auth::getAdminLogoutURL(); $warnings = array(); @@ -106,7 +106,7 @@ $functionchecks = array( 'json_decode' => array('required', 'JSON support'), 'class_implements' => array('required', 'Standard PHP Library (SPL)'), 'mb_strlen' => array('required', 'Multibyte String Extension'), - 'curl_init' => array('optional', 'cURL (required if automatic version checks are used, also by some modules.'), + 'curl_init' => array('optional', 'cURL (required if automatic version checks are used, also by some modules.'), 'session_start' => array('optional', 'Session Extension (required if PHP sessions are used)'), 'pdo_drivers' => array('optional', 'PDO Extension (required if a database backend is used)'), ); @@ -119,7 +119,7 @@ if (\SimpleSAML\Module::isModuleEnabled('radius')) { $funcmatrix = array(); $funcmatrix[] = array( - 'required' => 'required', + 'required' => 'required', 'descr' => 'PHP Version >= 5.4. You run: '.phpversion(), 'enabled' => version_compare(phpversion(), '5.4', '>=') ); @@ -139,7 +139,7 @@ $funcmatrix[] = array( 'enabled' => class_exists('Memcache') || class_exists('Memcached'), ); -/* Some basic configuration checks */ +// Some basic configuration checks if ($config->getString('technicalcontact_email', 'na@example.org') === 'na@example.org') { $mail_ok = false; @@ -168,6 +168,7 @@ $t->data['pageid'] = 'frontpage_config'; $t->data['header'] = $translator->t('{core:frontpage:page_title}'); $t->data['isadmin'] = $isadmin; $t->data['loginurl'] = $loginurl; +$t->data['logouturl'] = $logouturl; foreach ($warnings as &$warning) { if (is_array($warning)) { diff --git a/modules/core/www/frontpage_federation.php b/modules/core/www/frontpage_federation.php index ec0132ac8d00c3c6a9f3c8e0d95de609f4242c8a..74d5bbb5d554c03fd04d93c1d35802b8c97a126f 100644 --- a/modules/core/www/frontpage_federation.php +++ b/modules/core/www/frontpage_federation.php @@ -8,6 +8,7 @@ $session = \SimpleSAML\Session::getSessionFromRequest(); if ($config->getBoolean('admin.protectindexpage', false)) { \SimpleSAML\Utils\Auth::requireAdmin(); } +$logouturl = \SimpleSAML\Utils\Auth::getAdminLogoutURL(); $loginurl = \SimpleSAML\Utils\Auth::getAdminLoginURL(); $isadmin = \SimpleSAML\Utils\Auth::isAdmin(); @@ -103,7 +104,8 @@ $t = new \SimpleSAML\XHTML\Template($config, 'core:frontpage_federation.tpl.php' $translator = $t->getTranslator(); $language = $translator->getLanguage()->getLanguage(); -$defaultLanguage = $config->getString('language.default', 'en'); +$fallbackLanguage = 'en'; +$defaultLanguage = $config->getString('language.default', $fallbackLanguage); $translators = array( 'name' => 'name_translated', @@ -117,9 +119,9 @@ foreach ($metaentries['hosted'] as $index => $entity) { $metaentries['hosted'][$index][$new] = $entity[$old][$language]; } elseif (isset($entity[$old][$defaultLanguage])) { $metaentries['hosted'][$index][$new] = $entity[$old][$defaultLanguage]; - } elseif (isset($metaentries['hosted'][$index][$old])) { - $metaentries['hosted'][$index][$new] = $metaentries['hosted'][$index][$old]; - } + } elseif (isset($entity[$old][$fallbackLanguage])) { + $metaentries['hosted'][$index][$new] = $entity[$old][$fallbackLanguage]; + } } } foreach ($metaentries['remote'] as $key => $set) { @@ -129,6 +131,8 @@ foreach ($metaentries['remote'] as $key => $set) { $metaentries['remote'][$key][$entityid][$new] = $entity[$old][$language]; } elseif (isset($entity[$old][$defaultLanguage])) { $metaentries['remote'][$key][$entityid][$new] = $entity[$old][$defaultLanguage]; + } elseif (isset($entity[$old][$fallbackLanguage])) { + $metaentries['remote'][$key][$entityid][$new] = $entity[$old][$fallbackLanguage]; } elseif (isset($metaentries['remote'][$key][$entityid][$old])) { $metaentries['remote'][$key][$entityid][$new] = $metaentries['remote'][$key][$entityid][$old]; } @@ -155,7 +159,7 @@ $mtype = array( $t->data['pageid'] = 'frontpage_federation'; $t->data['isadmin'] = $isadmin; $t->data['loginurl'] = $loginurl; - +$t->data['logouturl'] = $logouturl; $t->data['links'] = $links; $t->data['links_welcome'] = $links_welcome; @@ -169,4 +173,3 @@ $t->data['metaentries'] = $metaentries; $t->data['mtype'] = $mtype; $t->show(); - diff --git a/modules/core/www/frontpage_welcome.php b/modules/core/www/frontpage_welcome.php index 46a3c0bc5c923336af3df32b4e84d185ec823984..9650fb372a3546a030bd4b515bca5d8af6059977 100644 --- a/modules/core/www/frontpage_welcome.php +++ b/modules/core/www/frontpage_welcome.php @@ -8,6 +8,7 @@ $session = \SimpleSAML\Session::getSessionFromRequest(); if ($config->getBoolean('admin.protectindexpage', false)) { SimpleSAML\Utils\Auth::requireAdmin(); } +$logouturl = \SimpleSAML\Utils\Auth::getAdminLogoutURL(); $loginurl = \SimpleSAML\Utils\Auth::getAdminLoginURL(); $isadmin = \SimpleSAML\Utils\Auth::isAdmin(); @@ -36,6 +37,7 @@ $t = new \SimpleSAML\XHTML\Template($config, 'core:frontpage_welcome.tpl.php'); $t->data['pageid'] = 'frontpage_welcome'; $t->data['isadmin'] = $isadmin; $t->data['loginurl'] = $loginurl; +$t->data['logouturl'] = $logouturl; $t->data['links'] = $links; $t->data['links_welcome'] = $links_welcome; diff --git a/modules/core/www/idp/logout-iframe.js b/modules/core/www/idp/logout-iframe.js index 6fc401070571c41ec845234551588333276da539..921c23cdfebd5acbd42369e5f571f509fcd0ab74 100644 --- a/modules/core/www/idp/logout-iframe.js +++ b/modules/core/www/idp/logout-iframe.js @@ -1,8 +1,8 @@ /** * This function updates the global logout status. */ -function updateStatus() { - +function updateStatus() +{ var nFailed = 0; var nProgress = 0; for (sp in window.spStatus) { @@ -33,7 +33,8 @@ function updateStatus() { * @param status The new status. * @param reason The reason for the status change. */ -function updateSPStatus(spId, status, reason) { +function updateSPStatus(spId, status, reason) +{ if (window.spStatus[spId] === status) { // unchanged return; @@ -63,7 +64,8 @@ function updateSPStatus(spId, status, reason) { * * @param spId The SP that completed logout successfully. */ -function logoutCompleted(spId) { +function logoutCompleted(spId) +{ updateSPStatus(spId, 'completed', ''); } @@ -75,7 +77,8 @@ function logoutCompleted(spId) { * @param spId The SP that failed to complete logout. * @param reason The reason why logout failed. */ -function logoutFailed(spId, reason) { +function logoutFailed(spId, reason) +{ updateSPStatus(spId, 'failed', reason); } @@ -84,7 +87,8 @@ function logoutFailed(spId, reason) { * * If an SP didn't reply by the timeout, we'll mark it as failed. */ -function timeoutSPs() { +function timeoutSPs() +{ var cTime = ((new Date()).getTime() - window.startTime) / 1000; for (var sp in window.spStatus) { if (window.spTimeout[sp] <= cTime && window.spStatus[sp] === 'inprogress') { diff --git a/modules/core/www/idp/logout-iframe.php b/modules/core/www/idp/logout-iframe.php index 4af3da1cdbd711fe79d12efeae787ae779903fb0..e844d558e3304c9d5158ea3a50f40e6395926322 100644 --- a/modules/core/www/idp/logout-iframe.php +++ b/modules/core/www/idp/logout-iframe.php @@ -113,22 +113,21 @@ foreach ($state['core:Logout-IFrame:Associations'] as $association) { } } -$id = \SimpleSAML\Auth\State::saveState($state, 'core:Logout-IFrame'); $globalConfig = \SimpleSAML\Configuration::getInstance(); - -$template_id = 'core:logout-iframe.php'; if ($type === 'nojs') { - $template_id = 'core:logout-iframe-wrapper.php'; + $t = new \SimpleSAML\XHTML\Template($globalConfig, 'core:logout-iframe-wrapper.php'); +} else { + $t = new \SimpleSAML\XHTML\Template($globalConfig, 'core:logout-iframe.php'); } -$t = new \SimpleSAML\XHTML\Template($globalConfig, $template_id); -$t->data['auth_state'] = $id; -$t->data['header'] = $t->getTranslator()->t('{logout:progress}'); - /** * @deprecated The "id" variable will be removed. Please use "auth_state" instead. */ +$id = \SimpleSAML\Auth\State::saveState($state, 'core:Logout-IFrame'); $t->data['id'] = $id; +$t->data['auth_state'] = $id; + +$t->data['header'] = $t->getTranslator()->t('{logout:progress}'); $t->data['type'] = $type; $t->data['terminated_service'] = $terminated; $t->data['remaining_services'] = $remaining; diff --git a/modules/core/www/login-admin.php b/modules/core/www/login-admin.php index 01ea86c93d41978b6503bafb5e8651602f9ebbe1..59246f6731c6db0c7cbc2bff6dba5f1e5a4e065e 100644 --- a/modules/core/www/login-admin.php +++ b/modules/core/www/login-admin.php @@ -10,4 +10,3 @@ if (!array_key_exists('ReturnTo', $_REQUEST)) { \SimpleSAML\Utils\Auth::requireAdmin(); \SimpleSAML\Utils\HTTP::redirectUntrustedURL($_REQUEST['ReturnTo']); - diff --git a/modules/core/www/loginuserpass.php b/modules/core/www/loginuserpass.php index f5211bb7fb808255bd6d66dd698af46efe65a62f..c9569dede90c7ee8d0ea7ade1de670edf8ef7798 100644 --- a/modules/core/www/loginuserpass.php +++ b/modules/core/www/loginuserpass.php @@ -18,7 +18,9 @@ $state = \SimpleSAML\Auth\State::loadState($authStateId, \SimpleSAML\Module\core $source = \SimpleSAML\Auth\Source::getById($state[\SimpleSAML\Module\core\Auth\UserPassBase::AUTHID]); if ($source === null) { - throw new \Exception('Could not find authentication source with id '.$state[\SimpleSAML\Module\core\Auth\UserPassBase::AUTHID]); + throw new \Exception( + 'Could not find authentication source with id '.$state[\SimpleSAML\Module\core\Auth\UserPassBase::AUTHID] + ); } @@ -58,15 +60,22 @@ if (!empty($_REQUEST['username']) || !empty($password)) { if ($source->getRememberUsernameEnabled()) { $sessionHandler = \SimpleSAML\SessionHandler::getSessionHandler(); $params = $sessionHandler->getCookieParams(); - $params['expire'] = time(); - $params['expire'] += (isset($_REQUEST['remember_username']) && $_REQUEST['remember_username'] == 'Yes' ? 31536000 : -300); + + if (isset($_REQUEST['remember_username']) && $_REQUEST['remember_username'] == 'Yes') { + $params['expire'] = time() + 31536000; + } else { + $params['expire'] = time() - 300; + } \SimpleSAML\Utils\HTTP::setCookie($source->getAuthId().'-username', $username, $params, false); } if ($source->isRememberMeEnabled()) { if (array_key_exists('remember_me', $_REQUEST) && $_REQUEST['remember_me'] === 'Yes') { $state['RememberMe'] = true; - $authStateId = \SimpleSAML\Auth\State::saveState($state, \SimpleSAML\Module\core\Auth\UserPassBase::STAGEID); + $authStateId = \SimpleSAML\Auth\State::saveState( + $state, + \SimpleSAML\Module\core\Auth\UserPassBase::STAGEID + ); } } diff --git a/modules/core/www/loginuserpassorg.php b/modules/core/www/loginuserpassorg.php index 4b293e2dc09fd40a82e6de39edcc113bc8109893..3b480699bfc8d79a57c94134f7c071b9973ff97a 100644 --- a/modules/core/www/loginuserpassorg.php +++ b/modules/core/www/loginuserpassorg.php @@ -18,7 +18,9 @@ $state = \SimpleSAML\Auth\State::loadState($authStateId, \SimpleSAML\Module\core $source = \SimpleSAML\Auth\Source::getById($state[\SimpleSAML\Module\core\Auth\UserPassOrgBase::AUTHID]); if ($source === null) { - throw new \Exception('Could not find authentication source with id '.$state[\SimpleSAML\Module\core\Auth\UserPassOrgBase::AUTHID]); + throw new \Exception( + 'Could not find authentication source with id '.$state[\SimpleSAML\Module\core\Auth\UserPassOrgBase::AUTHID] + ); } $organizations = \SimpleSAML\Module\core\Auth\UserPassOrgBase::listOrganizations($authStateId); @@ -41,7 +43,9 @@ if (array_key_exists('password', $_REQUEST)) { if (array_key_exists('organization', $_REQUEST)) { $organization = $_REQUEST['organization']; -} elseif ($source->getRememberOrganizationEnabled() && array_key_exists($source->getAuthId().'-organization', $_COOKIE)) { +} elseif ($source->getRememberOrganizationEnabled() && + array_key_exists($source->getAuthId().'-organization', $_COOKIE) + ) { $organization = $_COOKIE[$source->getAuthId().'-organization']; } elseif (isset($state['core:organization'])) { $organization = (string) $state['core:organization']; @@ -61,25 +65,44 @@ if (isset($state['error'])) { if ($organizations === null || !empty($organization)) { if (!empty($username) || !empty($password)) { - if ($source->getRememberUsernameEnabled()) { $sessionHandler = \SimpleSAML\SessionHandler::getSessionHandler(); $params = $sessionHandler->getCookieParams(); - $params['expire'] = time(); - $params['expire'] += (isset($_REQUEST['remember_username']) && $_REQUEST['remember_username'] == 'Yes' ? 31536000 : -300); + if (isset($_REQUEST['remember_username']) && $_REQUEST['remember_username'] == 'Yes') { + $params['expire'] = time() + 3153600; + } else { + $params['expire'] = time() - 300; + } + \SimpleSAML\Utils\HTTP::setCookie($source->getAuthId().'-username', $username, $params, false); } if ($source->getRememberOrganizationEnabled()) { $sessionHandler = \SimpleSAML\SessionHandler::getSessionHandler(); $params = $sessionHandler->getCookieParams(); - $params['expire'] = time(); - $params['expire'] += (isset($_REQUEST['remember_organization']) && $_REQUEST['remember_organization'] == 'Yes' ? 31536000 : -300); - setcookie($source->getAuthId().'-organization', $organization, $params['expire'], $params['path'], $params['domain'], $params['secure'], $params['httponly']); + if (isset($_REQUEST['remember_organization']) && $_REQUEST['remember_organization'] == 'Yes') { + $params['expire'] = time() + 3153600; + } else { + $params['expire'] = time() - 300; + } + setcookie( + $source->getAuthId().'-organization', + $organization, + $params['expire'], + $params['path'], + $params['domain'], + $params['secure'], + $params['httponly'] + ); } try { - \SimpleSAML\Module\core\Auth\UserPassOrgBase::handleLogin($authStateId, $username, $password, $organization); + \SimpleSAML\Module\core\Auth\UserPassOrgBase::handleLogin( + $authStateId, + $username, + $password, + $organization + ); } catch (\SimpleSAML\Error\Error $e) { // Login failed. Extract error code and parameters, to display the error $errorCode = $e->getErrorCode(); @@ -88,7 +111,10 @@ if ($organizations === null || !empty($organization)) { 'code' => $errorCode, 'params' => $errorParams ); - $authStateId = \SimpleSAML\Auth\State::saveState($state, \SimpleSAML\Module\core\Auth\UserPassOrgBase::STAGEID); + $authStateId = \SimpleSAML\Auth\State::saveState( + $state, + \SimpleSAML\Module\core\Auth\UserPassOrgBase::STAGEID + ); $queryParams = array('AuthState' => $authStateId); } if (isset($state['error'])) { @@ -135,4 +161,3 @@ if (isset($state['SPMetadata'])) { $t->show(); exit(); - diff --git a/modules/core/www/show_metadata.php b/modules/core/www/show_metadata.php index 389d12a3309d5818a154b8ced1a79b6ca357f5e2..2beb26c59489579529d9c7b564c60474c7a94079 100644 --- a/modules/core/www/show_metadata.php +++ b/modules/core/www/show_metadata.php @@ -22,7 +22,7 @@ if (!in_array( $metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler(); -$m = $metadata->getMetadata($_REQUEST['entityid'], $_REQUEST['set']); +$m = $metadata->getMetaData($_REQUEST['entityid'], $_REQUEST['set']); $t = new \SimpleSAML\XHTML\Template($config, 'core:show_metadata.tpl.php'); $t->data['clipboard.js'] = true; diff --git a/modules/cron/config-templates/module_cron.php b/modules/cron/config-templates/module_cron.php index abee18711383baa95d93f6c712f857b0d1ee8783..fe303c9b8d5518eefab4e55812eb808cc1726900 100644 --- a/modules/cron/config-templates/module_cron.php +++ b/modules/cron/config-templates/module_cron.php @@ -1,5 +1,5 @@ <?php -/* +/* * Configuration for the Cron module. */ diff --git a/modules/cron/templates/croninfo-result.php b/modules/cron/templates/croninfo-result.php index fecd11cdb19d6f183fd3236bee5e43cb73a8323a..e4f0dc1695a06d856d5eba5a01732e0810641ca2 100644 --- a/modules/cron/templates/croninfo-result.php +++ b/modules/cron/templates/croninfo-result.php @@ -8,12 +8,11 @@ $this->includeAtTemplateBase('includes/header.php'); <?php echo ' <h1>'.$this->t('cron_report_title').'</h1><p>'.$this->t('ran_text'). - ' '.$this->data['time'].'</p>'.'<p>URL: <tt>'.$this->data['url'].'</tt></p>'. + ' '.$this->data['time'].'</p>'.'<p>URL: <code>'.$this->data['url'].'</code></p>'. '<p>Tag: '.$this->data['tag']."</p>\n\n". '<ul><li>'.join('</li><li>', $this->data['summary']).'</li></ul>'; ?> - </code> - </pre> + </code></pre> </div> <?php diff --git a/modules/cron/templates/croninfo.tpl.php b/modules/cron/templates/croninfo.tpl.php index f6181f6cf3a4eb6dcaeec18e2ae4e928b4a3f16f..50efe15a1ec53e6ef527448cc4b3e72cb5aa13b8 100644 --- a/modules/cron/templates/croninfo.tpl.php +++ b/modules/cron/templates/croninfo.tpl.php @@ -11,7 +11,7 @@ $run_text = $this->t('run_text'); <p><?php echo $this->t('cron_suggestion') ?></p> <pre style="font-size: x-small; color: #444; padding: 1em; border: 1px solid #eee; margin: .4em "><code> <?php -foreach ($this->data['urls'] as $url ) { +foreach ($this->data['urls'] as $url) { echo "# ".$run_text. ' ['.$url['tag'].']'."\n"; echo $url['int']." curl --silent \"".$url['href']."\" > /dev/null 2>&1\n"; } @@ -22,7 +22,7 @@ foreach ($this->data['urls'] as $url ) { <p><?php echo $this->t('cron_execution') ?></p> <ul> <?php -foreach ($this->data['urls'] as $url ) { +foreach ($this->data['urls'] as $url) { echo ' <li><a href="'.$url['href'].'&output=xhtml">'.$run_text.' ['.$url['tag'].']'.'</a></li>'; } ?> diff --git a/modules/cron/templates/croninfo.twig b/modules/cron/templates/croninfo.twig index a4deaaa7716c8e0412f5a2c9142eddd18f344129..b00b8905b8ab2107cb0c9d1980dc0a7fea539ea4 100644 --- a/modules/cron/templates/croninfo.twig +++ b/modules/cron/templates/croninfo.twig @@ -1,16 +1,20 @@ {% set pagetitle = 'Cron result page'|trans %} {% extends "base.twig" %} +{% block preload %} +<link rel="stylesheet" type="text/css" href="{{ baseurlpath }}assets/css/cron.css"> +{% endblock %} + {% block content %} <h2>{{ 'Cron result page'|trans }}</h2> <p>{{ 'Cron is a way to run things regularly on unix systems.'|trans }}<br /><br /></p> <p>{{ 'Here is a suggestion for a crontab file:'|trans }}<br /><br /></p> <div class="code-box code-box-content"> - <code> + <code id="cronlist"> {% for url in urls %} - # {{ 'Run cron:'|trans }} [{{ url.tag }}]<br /> - {{ url.int }} curl --silent "{{ url.href }}" > /dev/null 2>&1<br /> + # {{ 'Run cron:'|trans }} [{{ url.tag }}]<br /> + {{ url.int }} curl --silent "{{ url.href }}" > /dev/null 2>&1<br /> {% endfor %} </code></div><br /> diff --git a/modules/cron/www/assets/css/cron.css b/modules/cron/www/assets/css/cron.css new file mode 100644 index 0000000000000000000000000000000000000000..459178ed6c2c31566f70bc580c763c100a3e3462 --- /dev/null +++ b/modules/cron/www/assets/css/cron.css @@ -0,0 +1,3 @@ +code#cronlist { + font-size: 0.8vw; +} diff --git a/modules/cron/www/cron.php b/modules/cron/www/cron.php index 4a2ec9ab9ad38faa42d01f986366b35ee1287960..fb930592812ce20bf6370618cdb708677d63cb81 100644 --- a/modules/cron/www/cron.php +++ b/modules/cron/www/cron.php @@ -24,7 +24,7 @@ $summary = $croninfo['summary']; if ($cronconfig->getValue('sendemail', true) && count($summary) > 0) { $message = '<h1>Cron report</h1><p>Cron ran at '.$time.'</p>'. - '<p>URL: <tt>'.$url.'</tt></p>'. + '<p>URL: <code>'.$url.'</code></p>'. '<p>Tag: '.$croninfo['tag']."</p>\n\n". '<ul><li>'.join('</li><li>', $summary).'</li></ul>'; diff --git a/modules/discopower/config-templates/module_discopower.php b/modules/discopower/config-templates/module_discopower.php index 4579f9d101fa2c2ceace1cd34582f7c98015c917..dfac2581765b9ee116b462ed6360e2aa8fe19e85 100644 --- a/modules/discopower/config-templates/module_discopower.php +++ b/modules/discopower/config-templates/module_discopower.php @@ -1,5 +1,5 @@ <?php -/* +/* * Configuration for the DiscoPower module. */ @@ -21,9 +21,9 @@ $config = array( /* * If you want to change the scoring algorithm to a more google suggest like one - * (filters by start of words) uncomment this ... + * (filters by start of words) uncomment this ... * - * 'score' => 'suggest', + * 'score' => 'suggest', */ /* diff --git a/modules/discopower/dictionaries/tabs.translation.json b/modules/discopower/dictionaries/tabs.translation.json index 558d2d572f6b39496373e63d7a2c82965bc581b1..709544a2733baad7e09239c6be3c16c868979c3b 100644 --- a/modules/discopower/dictionaries/tabs.translation.json +++ b/modules/discopower/dictionaries/tabs.translation.json @@ -70,7 +70,6 @@ }, "greece": { "es": "Grecia", - "ru": "\u0413\u0440\u0435\u0446\u0438\u044f", "nl": "Griekenland", "gl": "Grecia", "ru": "\u0413\u0440\u0435\u0446\u0438\u044f", diff --git a/modules/discopower/lib/PowerIdPDisco.php b/modules/discopower/lib/PowerIdPDisco.php index 52ded4331b991bff8d2f2260ede635f53f79c730..4e7a3914975784d37877f5151811d1d21b92e61e 100644 --- a/modules/discopower/lib/PowerIdPDisco.php +++ b/modules/discopower/lib/PowerIdPDisco.php @@ -219,7 +219,6 @@ class PowerIdPDisco extends \SimpleSAML\XHTML\IdPDisco if (array_key_exists('entities.include', $spmd['discopower.filter']) || array_key_exists('tags.include', $spmd['discopower.filter']) ) { - $defaultrule = false; } @@ -326,7 +325,7 @@ class PowerIdPDisco extends \SimpleSAML\XHTML\IdPDisco $translation = $t->getTranslator()->getPreferredTranslation($displayName); } } - + if (($translation === false) && array_key_exists('name', $entity)) { if (is_array($entity['name'])) { $translation = $t->getTranslator()->getPreferredTranslation($entity['name']); @@ -342,14 +341,17 @@ class PowerIdPDisco extends \SimpleSAML\XHTML\IdPDisco // HTML output if ($entity['entityid'] === $favourite) { - $html = '<a class="metaentry favourite" href="'.$basequerystring.urlencode($entity['entityid']).'">'; + $html = '<a class="metaentry favourite" href="'. + $basequerystring.urlencode($entity['entityid']).'">'; } else { - $html = '<a class="metaentry" href="'.$basequerystring.urlencode($entity['entityid']).'">'; + $html = '<a class="metaentry" href="'. + $basequerystring.urlencode($entity['entityid']).'">'; } $html .= $entity['translated']; if (array_key_exists('icon', $entity) && $entity['icon'] !== null) { $iconUrl = \SimpleSAML\Utils\HTTP::resolveURL($entity['icon']); - $html .= '<img alt="Icon for identity provider" class="entryicon" src="'.htmlspecialchars($iconUrl).'" />'; + $html .= '<img alt="Icon for identity provider" class="entryicon" src="'. + htmlspecialchars($iconUrl).'" />'; } $html .= '</a>'; $entity['html'] = $html; diff --git a/modules/discopower/templates/disco.tpl.php b/modules/discopower/templates/disco.tpl.php index 1ae62cabdf4ea088f853057a4ed52ce161cda85d..02ae742eb4e6c96bc8efb8ba5a683147dccaeb50 100644 --- a/modules/discopower/templates/disco.tpl.php +++ b/modules/discopower/templates/disco.tpl.php @@ -1,172 +1,141 @@ <?php $this->data['header'] = $this->t('selectidp'); -$this->data['jquery'] = array('core' => TRUE, 'ui' => TRUE, 'css' => TRUE); +$this->data['jquery'] = array('core' => true, 'ui' => true, 'css' => true); -$this->data['head'] = '<link rel="stylesheet" media="screen" type="text/css" href="' . SimpleSAML\Module::getModuleUrl('discopower/style.css') . '" />'; +$this->data['head'] = '<link rel="stylesheet" media="screen" type="text/css" href="'. + SimpleSAML\Module::getModuleURL('discopower/assets/css/style.css').'" />'; -$this->data['post'] = '<script type="text/javascript" src="' . SimpleSAML\Module::getModuleUrl('discopower/js/jquery.livesearch.js') . '"></script>'; -$this->data['post'] .= '<script type="text/javascript" src="' . SimpleSAML\Module::getModuleUrl('discopower/js/quicksilver.js') . '"></script>'; +$this->data['post'] = '<script type="text/javascript" src="'. + SimpleSAML\Module::getModuleURL('discopower/assets/js/jquery.livesearch.js').'"></script>'; +$this->data['post'] .= '<script type="text/javascript" src="'. + SimpleSAML\Module::getModuleURL('discopower/assets/js/quicksilver.js').'"></script>'; - - - -if (!empty($this->data['faventry'])) $this->data['autofocus'] = 'favouritesubmit'; - -$this->includeAtTemplateBase('includes/header.php'); - -function showEntry($t, $metadata, $favourite = FALSE) { - - $basequerystring = '?' . - 'entityID=' . urlencode($t->data['entityID']) . '&' . - 'return=' . urlencode($t->data['return']) . '&' . - 'returnIDParam=' . urlencode($t->data['returnIDParam']) . '&idpentityid='; - - $extra = ($favourite ? ' favourite' : ''); - $html = '<a class="metaentry' . $extra . '" href="' . $basequerystring . urlencode($metadata['entityid']) . '">'; - - $html .= '' . htmlspecialchars(getTranslatedName($t, $metadata)) . ''; - - if(array_key_exists('icon', $metadata) && $metadata['icon'] !== NULL) { - $iconUrl = \SimpleSAML\Utils\HTTP::resolveURL($metadata['icon']); - $html .= '<img alt="Icon for identity provider" class="entryicon" src="' . htmlspecialchars($iconUrl) . '" />'; - } - - $html .= '</a>'; - - return $html; +if (!empty($this->data['faventry'])) { + $this->data['autofocus'] = 'favouritesubmit'; } -?> +$this->includeAtTemplateBase('includes/header.php'); +function showEntry($t, $metadata, $favourite = false) +{ + $basequerystring = '?'. + 'entityID='.urlencode($t->data['entityID']).'&'. + 'return='.urlencode($t->data['return']).'&'. + 'returnIDParam='.urlencode($t->data['returnIDParam']).'&idpentityid='; + $extra = ($favourite ? ' favourite' : ''); + $html = '<a class="metaentry'.$extra.'" href="'.$basequerystring.urlencode($metadata['entityid']).'">'; + $html .= htmlspecialchars(getTranslatedName($t, $metadata)).''; -<?php + if (array_key_exists('icon', $metadata) && $metadata['icon'] !== null) { + $iconUrl = \SimpleSAML\Utils\HTTP::resolveURL($metadata['icon']); + $html .= '<img alt="Icon for identity provider" class="entryicon" src="'.htmlspecialchars($iconUrl).'" />'; + } -function getTranslatedName($t, $metadata) { - if (isset($metadata['UIInfo']['DisplayName'])) { - $displayName = $metadata['UIInfo']['DisplayName']; - assert(is_array($displayName)); // Should always be an array of language code -> translation - if (!empty($displayName)) { - return $t->getTranslator()->getPreferredTranslation($displayName); - } - } - - if (array_key_exists('name', $metadata)) { - if (is_array($metadata['name'])) { - return $t->getTranslator()->getPreferredTranslation($metadata['name']); - } else { - return $metadata['name']; - } - } - return $metadata['entityid']; + $html .= '</a>'; + return $html; } - - +function getTranslatedName($t, $metadata) +{ + if (isset($metadata['UIInfo']['DisplayName'])) { + $displayName = $metadata['UIInfo']['DisplayName']; + assert(is_array($displayName)); // Should always be an array of language code -> translation + if (!empty($displayName)) { + return $t->getTranslator()->getPreferredTranslation($displayName); + } + } + + if (array_key_exists('name', $metadata)) { + if (is_array($metadata['name'])) { + return $t->getTranslator()->getPreferredTranslation($metadata['name']); + } else { + return $metadata['name']; + } + } + return $metadata['entityid']; +} if (!empty($this->data['faventry'])) { - - - echo('<div class="favourite">'); - echo($this->t('previous_auth')); - echo(' <strong>' . htmlspecialchars(getTranslatedName($this, $this->data['faventry'])) . '</strong>'); - echo(' - <form id="idpselectform" method="get" action="' . $this->data['urlpattern'] . '"> - <input type="hidden" name="entityID" value="' . htmlspecialchars($this->data['entityID']) . '" /> - <input type="hidden" name="return" value="' . htmlspecialchars($this->data['return']) . '" /> - <input type="hidden" name="returnIDParam" value="' . htmlspecialchars($this->data['returnIDParam']) . '" /> - <input type="hidden" name="idpentityid" value="' . htmlspecialchars($this->data['faventry']['entityid']) . '" /> - - <input type="submit" name="formsubmit" id="favouritesubmit" value="' . $this->t('login_at') . ' ' . htmlspecialchars(getTranslatedName($this, $this->data['faventry'])) . '" /> - </form>'); - - echo('</div>'); + echo '<div class="favourite">' ; + echo $this->t('previous_auth'); + echo ' <strong>'.htmlspecialchars(getTranslatedName($this, $this->data['faventry'])).'</strong>'; + echo '<form id="idpselectform" method="get" action="'.$this->data['urlpattern']. + '"><input type="hidden" name="entityID" value="'.htmlspecialchars($this->data['entityID']). + '" /><input type="hidden" name="return" value="'.htmlspecialchars($this->data['return']). + '" /><input type="hidden" name="returnIDParam" value="'.htmlspecialchars($this->data['returnIDParam']). + '" /><input type="hidden" name="idpentityid" value="'.htmlspecialchars($this->data['faventry']['entityid']). + '" /><input type="submit" name="formsubmit" id="favouritesubmit" value="'.$this->t('login_at').' '. + htmlspecialchars(getTranslatedName($this, $this->data['faventry'])).'" /></form>'; + echo '</div>'; } - - ?> - - - - - <div id="tabdiv"> - <ul class="tabset_tabs"> - <?php - - $tabs = array_keys( $this->data['idplist']); - $i = 1; - foreach ($tabs AS $tab) { - if(!empty($this->data['idplist'][$tab])) { - if ($i === 1) { - echo '<li class="tab-link current" data-tab="'.$tab.'"><a href="#' . $tab . '"><span>' . $this->t($this->data['tabNames'][$tab]) . '</span></a></li>'; - } else { - echo '<li class="tab-link" data-tab="'.$tab.'"><a href="#' . $tab . '"><span>' . $this->t($this->data['tabNames'][$tab]) . '</span></a></li> '; - } - $i++; - } - } - - ?> + <?php + $tabs = array_keys($this->data['idplist']); + $i = 1; + foreach ($tabs as $tab) { + if (!empty($this->data['idplist'][$tab])) { + if ($i === 1) { + echo '<li class="tab-link current" data-tab="'.$tab.'"><a href="#'.$tab. + '"><span>'.$this->t($this->data['tabNames'][$tab]).'</span></a></li>'; + } else { + echo '<li class="tab-link" data-tab="'.$tab.'"><a href="#'.$tab. + '"><span>'.$this->t($this->data['tabNames'][$tab]).'</span></a></li> '; + } + $i++; + } + } + ?> </ul> - <?php - - - -foreach( $this->data['idplist'] AS $tab => $slist) { - $first = array_keys($this->data['idplist']); - if ($first[0] === $tab) { - echo '<div id="' . $tab . '" class="tabset_content current">'; - } else { - echo '<div id="' . $tab . '" class="tabset_content">'; - } - if (!empty($slist)) { - - echo(' <div class="inlinesearch">'); - echo(' <p>Incremental search...</p>'); - echo(' <form id="idpselectform" action="?" method="get"><input class="inlinesearch" type="text" value="" name="query_' . $tab . '" id="query_' . $tab . '" /></form>'); - echo(' </div>'); - - echo(' <div class="metalist" id="list_' . $tab . '">'); - if (!empty($this->data['preferredidp']) && array_key_exists($this->data['preferredidp'], $slist)) { - $idpentry = $slist[$this->data['preferredidp']]; - echo (showEntry($this, $idpentry, TRUE)); - } - - foreach ($slist AS $idpentry) { - if ($idpentry['entityid'] != $this->data['preferredidp']) { - echo (showEntry($this, $idpentry)); - } - } - echo(' </div>'); - } - echo '</div>'; - +foreach ($this->data['idplist'] as $tab => $slist) { + $first = array_keys($this->data['idplist']); + if ($first[0] === $tab) { + echo '<div id="'.$tab.'" class="tabset_content current">'; + } else { + echo '<div id="'.$tab.'" class="tabset_content">'; + } + if (!empty($slist)) { + echo '<div class="inlinesearch">'; + echo '<p>Incremental search...</p>'; + echo '<form id="idpselectform" action="?" method="get">'; + echo '<input class="inlinesearch" type="text" value="" name="query_'.$tab.'" id="query_'.$tab.'" /></form>'; + echo '</div>'; + + echo '<div class="metalist" id="list_'.$tab .'">'; + if (!empty($this->data['preferredidp']) && array_key_exists($this->data['preferredidp'], $slist)) { + $idpentry = $slist[$this->data['preferredidp']]; + echo showEntry($this, $idpentry, true); + } + + foreach ($slist as $idpentry) { + if ($idpentry['entityid'] != $this->data['preferredidp']) { + echo showEntry($this, $idpentry); + } + } + echo '</div>'; + } + echo '</div>'; } - -?> - +?> </div> <script type="text/javascript"> -$(document).ready(function() { +$(document).ready(function () { <?php $i = 0; -foreach ($this->data['idplist'] AS $tab => $slist) { - echo "\n" . '$("#query_' . $tab . '").liveUpdate("#list_' . $tab . '")' . - (($i++ == 0) && (empty($this->data['faventry'])) ? '.focus()' : '') . - ';'; - - +foreach ($this->data['idplist'] as $tab => $slist) { + echo "\n".'$("#query_'.$tab.'").liveUpdate("#list_'.$tab.'")'. + (($i++ == 0) && (empty($this->data['faventry'])) ? '.focus()' : '').';'; } ?> }); @@ -174,5 +143,6 @@ foreach ($this->data['idplist'] AS $tab => $slist) { </script> <?php -$this->data['post'] .= '<script type="text/javascript" src="' . SimpleSAML\Module::getModuleUrl('discopower/js/javascript.js') . '"></script>'; +$this->data['post'] .= '<script type="text/javascript" src="'. + SimpleSAML\Module::getModuleURL('discopower/js/javascript.js').'"></script>'; $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/discopower/templates/disco.twig b/modules/discopower/templates/disco.twig index 3645cdb169a6b53dc3b78446236430b7b425ec87..8e7082304c16f598e75ada0fc0fb0274ef95ee15 100644 --- a/modules/discopower/templates/disco.twig +++ b/modules/discopower/templates/disco.twig @@ -26,28 +26,16 @@ <div id="tabdiv"> <ul class="tabset_tabs"> - {% set i = 1 %} {% for tab, idps in idplist %} {% if idps is not empty %} - {% if i == 1 %} - <li class="tab-link current" data-tab="{{ tab }}"><a href="#{{ tab }}"><span>{{ tabNames[tab]|trans }}</span></a></li> - {% set i = 2 %} - {% else %} - <li class="tab-link" data-tab="{{ tab }}"><a href="#{{ tab }}"><span>{{ tabNames[tab]|trans }}</span></a></li> - {% endif %} + <li class="tab-link{% if loop.first %}current{% endif %}" data-tab="{{ tab }}"><a href="#{{ tab }}"><span>{{ tabNames[tab]|trans }}</span></a></li> {% endif %} {% endfor %} </ul> - {% set i = 1 %} {% for tab, idps in idplist %} {% if idps is not empty %} - {% if i == 1 %} - <div id="{{ tab }}" class="tabset_content current"> - {% set i = 2 %} - {% else %} - <div id="{{ tab }}" class="tabset_content"> - {% endif %} + <div id="{{ tab }}" class="tabset_content{% if loop.first %} current{% endif %}"> <div class="inlinesearch"> <p>Incremental search...</p> <form id="idpselectform" method="get"> diff --git a/modules/discopower/www/style.css b/modules/discopower/www/assets/css/disco.css similarity index 95% rename from modules/discopower/www/style.css rename to modules/discopower/www/assets/css/disco.css index dddb03c2221ba40ca07a1783f20b0f1b345ed233..c270798321da61b199164d62918d58d3e952f184 100644 --- a/modules/discopower/www/style.css +++ b/modules/discopower/www/assets/css/disco.css @@ -15,7 +15,7 @@ margin: 0px 2px 0px 0px; } .inlinesearch * { - margin: 0px; + margin: 0px; padding: 0px; } div.metalist { @@ -51,10 +51,10 @@ a.metaentry:hover img.entryicon { display: inline; top: 0px; bottom: 0px; - clear: both; - float: right; - margin: 1em; - padding: 3px; + clear: both; + float: right; + margin: 1em; + padding: 3px; border: 1px solid #999; } diff --git a/modules/discopower/www/assets/js/jquery.livesearch.js b/modules/discopower/www/assets/js/jquery.livesearch.js new file mode 100644 index 0000000000000000000000000000000000000000..2b125ff951350ae8c49fd0de49442da48a7bc3f2 --- /dev/null +++ b/modules/discopower/www/assets/js/jquery.livesearch.js @@ -0,0 +1,43 @@ +jQuery.fn.liveUpdate = function (list) { + list = jQuery(list); + + if (list.length) { + var rows = list.children('a'), + cache = rows.map(function () { + return jQuery(this).text().toLowerCase(); + }); + + this.keyup(filter).keyup().parents('form').submit(function () { + return false; + }); + } + + return this; + + function filter() + { + var term = jQuery.trim(jQuery(this).val().toLowerCase()), scores = []; + + if (!term) { + rows.show(); + } else { + rows.hide(); + + cache.each(function (i) { + var score = this.score(term); + if (score > 0) { + scores.push([score, i]); + } + }); + + jQuery.each( + scores.sort(function (a, b) { + return b[0] - a[0]; + }), + function () { + jQuery(rows[ this[1] ]).show(); + } + ); + } + } +}; diff --git a/modules/discopower/www/assets/js/quicksilver.js b/modules/discopower/www/assets/js/quicksilver.js new file mode 100644 index 0000000000000000000000000000000000000000..079ea87d5c2c03ec140396014394dbed08ad4dad --- /dev/null +++ b/modules/discopower/www/assets/js/quicksilver.js @@ -0,0 +1,102 @@ +// qs_score - Quicksilver Score +// +// A port of the Quicksilver string ranking algorithm +// +// "hello world".score("axl") //=> 0.0 +// "hello world".score("ow") //=> 0.6 +// "hello world".score("hello world") //=> 1.0 +// +// Tested in Firefox 2 and Safari 3 +// +// The Quicksilver code is available here +// http://code.google.com/p/blacktree-alchemy/ +// http://blacktree-alchemy.googlecode.com/svn/trunk/Crucible/Code/NSString+BLTRRanking.m +// +// The MIT License +// +// Copyright (c) 2008 Lachie Cox +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +String.prototype.score = function (abbreviation,offset) { + offset = offset || 0 // TODO: I think this is unused... remove + + if (abbreviation.length == 0) { + return 0.9 + } + if (abbreviation.length > this.length) { + return 0.0 + } + + for (var i = abbreviation.length; i > 0; i--) { + var sub_abbreviation = abbreviation.substring(0,i) + var index = this.indexOf(sub_abbreviation) + + + if (index < 0) { + continue; + } + if (index + abbreviation.length > this.length + offset) { + continue; + } + + var next_string = this.substring(index+sub_abbreviation.length) + var next_abbreviation = null + + if (i >= abbreviation.length) { + next_abbreviation = '' + } else { + next_abbreviation = abbreviation.substring(i) + } + + var remaining_score = next_string.score(next_abbreviation,offset + index) + + if (remaining_score > 0) { + var score = this.length - next_string.length; + + if (index != 0) { + var j = 0; + var c = this.charCodeAt(index - 1) + if ( c==32 || c == 9) { + for (var j=(index-2); j >= 0; j--) { + c = this.charCodeAt(j) + score -= ((c == 32 || c == 9) ? 1 : 0.15) + } + // XXX maybe not port this heuristic + // + // } else if ([[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember:[self characterAtIndex:matchedRange.location]]) { + // for (j = matchedRange.location-1; j >= (int) searchRange.location; j--) { + // if ([[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember:[self characterAtIndex:j]]) + // score--; + // else + // score -= 0.15; + // } + } else { + score -= index + } + } + + score += remaining_score * next_string.length + score /= this.length; + return score + } + } + return 0.0 +} diff --git a/modules/discopower/www/assets/js/suggest.js b/modules/discopower/www/assets/js/suggest.js new file mode 100644 index 0000000000000000000000000000000000000000..b404edd0a0509dad13cab4d2d6fab86feaa0c85b --- /dev/null +++ b/modules/discopower/www/assets/js/suggest.js @@ -0,0 +1,25 @@ +var suggest_cache = new Array; + +String.prototype.score = function (abbreviation,offset) { + if (suggest_cache['abv'] != abbreviation) { + suggest_cache['abv'] = abbreviation; + var words = abbreviation.split(/\s/); + suggest_cache['len'] = words.length; + suggest_cache.re = new Array; + + //words.each(); + for (var i = 0; i < suggest_cache['len']; ++i) { + suggest_cache['re'][i] = new Array(); + // /\b<x>/ doesn't work when <x> i a non-ascii - oddly enough \s does ... + suggest_cache['re'][i]['initialword'] = new RegExp("^"+words[i], "i"); + suggest_cache['re'][i]['word'] = new RegExp("[\\s-()_]"+words[i], "i"); + } + } + + for (var i = 0; i < suggest_cache['len']; ++i) { + if (!(this.match(suggest_cache['re'][i]['initialword']) || this.match(suggest_cache['re'][i]['word']))) { + return 0; + } + } + return 1; +} diff --git a/modules/discopower/www/disco.php b/modules/discopower/www/disco.php index 29d4343f6d54aaec29939496c3b6e50631e609b8..963a9e17b602d08b9d03b4d30f73469b34bc11f0 100644 --- a/modules/discopower/www/disco.php +++ b/modules/discopower/www/disco.php @@ -1,7 +1,10 @@ <?php try { - $discoHandler = new \SimpleSAML\Module\discopower\PowerIdPDisco(array('saml20-idp-remote', 'shib13-idp-remote'), 'poweridpdisco'); + $discoHandler = new \SimpleSAML\Module\discopower\PowerIdPDisco( + array('saml20-idp-remote', 'shib13-idp-remote'), + 'poweridpdisco' + ); } catch (\Exception $exception) { // An error here should be caused by invalid query parameters throw new \SimpleSAML\Error\Error('DISCOPARAMS', $exception); diff --git a/modules/discopower/www/js/jquery.livesearch.js b/modules/discopower/www/js/jquery.livesearch.js deleted file mode 100644 index 06c30437371ed145f78c5d27b085fae6c825a47c..0000000000000000000000000000000000000000 --- a/modules/discopower/www/js/jquery.livesearch.js +++ /dev/null @@ -1,37 +0,0 @@ -jQuery.fn.liveUpdate = function(list){ - list = jQuery(list); - - if ( list.length ) { - var rows = list.children('a'), - cache = rows.map(function(){ - return jQuery(this).text().toLowerCase(); - }); - - this - .keyup(filter).keyup() - .parents('form').submit(function(){ - return false; - }); - } - - return this; - - function filter(){ - var term = jQuery.trim( jQuery(this).val().toLowerCase() ), scores = []; - - if ( !term ) { - rows.show(); - } else { - rows.hide(); - - cache.each(function(i){ - var score = this.score(term); - if (score > 0) { scores.push([score, i]); } - }); - - jQuery.each(scores.sort(function(a, b){return b[0] - a[0];}), function(){ - jQuery(rows[ this[1] ]).show(); - }); - } - } -}; diff --git a/modules/discopower/www/js/quicksilver.js b/modules/discopower/www/js/quicksilver.js deleted file mode 100644 index af29f732b48a5609bb09c6beb3c04f99610f2534..0000000000000000000000000000000000000000 --- a/modules/discopower/www/js/quicksilver.js +++ /dev/null @@ -1,95 +0,0 @@ -// qs_score - Quicksilver Score -// -// A port of the Quicksilver string ranking algorithm -// -// "hello world".score("axl") //=> 0.0 -// "hello world".score("ow") //=> 0.6 -// "hello world".score("hello world") //=> 1.0 -// -// Tested in Firefox 2 and Safari 3 -// -// The Quicksilver code is available here -// http://code.google.com/p/blacktree-alchemy/ -// http://blacktree-alchemy.googlecode.com/svn/trunk/Crucible/Code/NSString+BLTRRanking.m -// -// The MIT License -// -// Copyright (c) 2008 Lachie Cox -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - -String.prototype.score = function(abbreviation,offset) { - offset = offset || 0 // TODO: I think this is unused... remove - - if(abbreviation.length == 0) return 0.9 - if(abbreviation.length > this.length) return 0.0 - - for (var i = abbreviation.length; i > 0; i--) { - var sub_abbreviation = abbreviation.substring(0,i) - var index = this.indexOf(sub_abbreviation) - - - if(index < 0) continue; - if(index + abbreviation.length > this.length + offset) continue; - - var next_string = this.substring(index+sub_abbreviation.length) - var next_abbreviation = null - - if(i >= abbreviation.length) - next_abbreviation = '' - else - next_abbreviation = abbreviation.substring(i) - - var remaining_score = next_string.score(next_abbreviation,offset+index) - - if (remaining_score > 0) { - var score = this.length-next_string.length; - - if(index != 0) { - var j = 0; - - var c = this.charCodeAt(index-1) - if(c==32 || c == 9) { - for(var j=(index-2); j >= 0; j--) { - c = this.charCodeAt(j) - score -= ((c == 32 || c == 9) ? 1 : 0.15) - } - - // XXX maybe not port this heuristic - // - // } else if ([[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember:[self characterAtIndex:matchedRange.location]]) { - // for (j = matchedRange.location-1; j >= (int) searchRange.location; j--) { - // if ([[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember:[self characterAtIndex:j]]) - // score--; - // else - // score -= 0.15; - // } - } else { - score -= index - } - } - - score += remaining_score * next_string.length - score /= this.length; - return score - } - } - return 0.0 -} \ No newline at end of file diff --git a/modules/discopower/www/js/suggest.js b/modules/discopower/www/js/suggest.js deleted file mode 100644 index 667b35ac944d2aead91124e72542bba5409e00e6..0000000000000000000000000000000000000000 --- a/modules/discopower/www/js/suggest.js +++ /dev/null @@ -1,23 +0,0 @@ -var suggest_cache = new Array; - -String.prototype.score = function(abbreviation,offset) { - if (suggest_cache['abv'] != abbreviation) { - suggest_cache['abv'] = abbreviation; - var words = abbreviation.split(/\s/); - suggest_cache['len'] = words.length; - suggest_cache.re = new Array; - - //words.each(); - for ( var i=0; i<suggest_cache['len']; ++i ){ - suggest_cache['re'][i] = new Array(); - // /\b<x>/ doesn't work when <x> i a non-ascii - oddly enough \s does ... - suggest_cache['re'][i]['initialword'] = new RegExp("^"+words[i], "i"); - suggest_cache['re'][i]['word'] = new RegExp("[\\s-()_]"+words[i], "i"); - } - } - - for ( var i=0; i<suggest_cache['len']; ++i ){ - if (!(this.match(suggest_cache['re'][i]['initialword']) || this.match(suggest_cache['re'][i]['word']))) return 0; - } - return 1; -} diff --git a/modules/exampleattributeserver/www/attributeserver.php b/modules/exampleattributeserver/www/attributeserver.php index 1de9e54b06186977707846db08eea286222365ce..135cc6a74245f020ef2cba92e8778fd3b2f2869d 100644 --- a/modules/exampleattributeserver/www/attributeserver.php +++ b/modules/exampleattributeserver/www/attributeserver.php @@ -16,7 +16,7 @@ if ($spEntityId === null) { throw new \SimpleSAML\Error\BadRequest('Missing <saml:Issuer> in <samlp:AttributeQuery>.'); } -$idpMetadata = $metadata->getMetadataConfig($idpEntityId, 'saml20-idp-hosted'); +$idpMetadata = $metadata->getMetaDataConfig($idpEntityId, 'saml20-idp-hosted'); $spMetadata = $metadata->getMetaDataConfig($spEntityId, 'saml20-sp-remote'); // The endpoint we should deliver the message to diff --git a/modules/exampleauth/lib/Auth/Source/UserPass.php b/modules/exampleauth/lib/Auth/Source/UserPass.php index f1d6fcb042e6e9b1967b8c1aee0622c76ac877ca..633125c155089b318643533abe6f89100bcca798 100644 --- a/modules/exampleauth/lib/Auth/Source/UserPass.php +++ b/modules/exampleauth/lib/Auth/Source/UserPass.php @@ -39,12 +39,16 @@ class UserPass extends \SimpleSAML\Module\core\Auth\UserPassBase // Validate and parse our configuration foreach ($config as $userpass => $attributes) { if (!is_string($userpass)) { - throw new \Exception('Invalid <username>:<password> for authentication source '.$this->authId.': '.$userpass); + throw new \Exception( + 'Invalid <username>:<password> for authentication source '.$this->authId.': '.$userpass + ); } $userpass = explode(':', $userpass, 2); if (count($userpass) !== 2) { - throw new \Exception('Invalid <username>:<password> for authentication source '.$this->authId.': '.$userpass[0]); + throw new \Exception( + 'Invalid <username>:<password> for authentication source '.$this->authId.': '.$userpass[0] + ); } $username = $userpass[0]; $password = $userpass[1]; diff --git a/modules/exampleauth/www/authpage.php b/modules/exampleauth/www/authpage.php index f4fc5339d45e0dd253d04d508eb493d2c146bcab..e975d69860002c7825f5c2c1b29c40036bfdd56f 100644 --- a/modules/exampleauth/www/authpage.php +++ b/modules/exampleauth/www/authpage.php @@ -96,7 +96,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { </head> <body> <h1>exampleauth login page</h1> -<p>In this example you can log in with two accounts: <code>student</code> and <code>admin</code>. In both cases, the password is the same as the username.</p> +<p> +In this example you can log in with two accounts: <code>student</code> and <code>admin</code>. +In both cases, the password is the same as the username. +</p> <?php if ($badUserPass) { ?> <p>Bad username or password.</p> <?php } ?> diff --git a/modules/expirycheck/lib/Auth/Process/ExpiryDate.php b/modules/expirycheck/lib/Auth/Process/ExpiryDate.php index c41178c84023a3c8f31475260d66675fd23b3a1b..ca7d97308ae044eea12ac3448c98673df23a69ca 100644 --- a/modules/expirycheck/lib/Auth/Process/ExpiryDate.php +++ b/modules/expirycheck/lib/Auth/Process/ExpiryDate.php @@ -52,14 +52,18 @@ class ExpiryDate extends \SimpleSAML\Auth\ProcessingFilter if (array_key_exists('netid_attr', $config)) { $this->netid_attr = $config['netid_attr']; if (!is_string($this->netid_attr)) { - throw new \Exception('Invalid attribute name given as eduPersonPrincipalName to expirycheck::ExpiryDate filter.'); + throw new \Exception( + 'Invalid attribute name given as eduPersonPrincipalName to expirycheck::ExpiryDate filter.' + ); } } if (array_key_exists('expirydate_attr', $config)) { $this->expirydate_attr = $config['expirydate_attr']; if (!is_string($this->expirydate_attr)) { - throw new \Exception('Invalid attribute name given as schacExpiryDate to expirycheck::ExpiryDate filter.'); + throw new \Exception( + 'Invalid attribute name given as schacExpiryDate to expirycheck::ExpiryDate filter.' + ); } } diff --git a/modules/expirycheck/templates/about2expire.php b/modules/expirycheck/templates/about2expire.php index b3c538b2c843e0caeed35ae37369834c5d560c85..6b135f807f5eb1e5332e136dda9280efa50f8bbd 100644 --- a/modules/expirycheck/templates/about2expire.php +++ b/modules/expirycheck/templates/about2expire.php @@ -17,24 +17,21 @@ */ $this->data['autofocus'] = 'yesbutton'; - $this->includeAtTemplateBase('includes/header.php'); -?> - -<form style="display: inline; margin: 0px; padding: 0px" action="<?php echo htmlspecialchars($this->data['yesTarget']); ?>"> +$yesTarget = htmlspecialchars($this->data['yesTarget']); +$buttonContinue = htmlspecialchars($this->t('{expirycheck:expwarning:btn_continue}')); - <?php - // Embed hidden fields... - foreach ($this->data['yesData'] as $name => $value) { - echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'; - } - ?> - <h3><?php echo $warning; ?></h3> - <p><?php echo $this->t('{expirycheck:expwarning:expiry_date_text}')." ".$this->data['expireOnDate']; ?></p> - - <input type="submit" name="yes" id="yesbutton" value="<?php echo htmlspecialchars($this->t('{expirycheck:expwarning:btn_continue}')) ?>" /> +echo '<form style="display: inline; margin: 0px; padding: 0px" action="'.$yesTarget.'">'; +// Embed hidden fields... +foreach ($this->data['yesData'] as $name => $value) { + echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'; +} +?> +<h3><?php echo $warning; ?></h3> +<p><?php echo $this->t('{expirycheck:expwarning:expiry_date_text}')." ".$this->data['expireOnDate']; ?></p> +<input type="submit" name="yes" id="yesbutton" value="<?php echo $buttonContinue; ?>" /> </form> <?php diff --git a/modules/expirycheck/templates/about2expire.twig b/modules/expirycheck/templates/about2expire.twig index c60788051a4a8339aeb5f86a986062dfb80b4360..1e1d5d427323c00833c54872611c890ee309f485 100644 --- a/modules/expirycheck/templates/about2expire.twig +++ b/modules/expirycheck/templates/about2expire.twig @@ -4,10 +4,10 @@ {% block content %} <form style="display: inline; margin: 0px; padding: 0px" action="{{ yesTarget|escape('html') }}"> {% for name, value in yesData %} - <input type="hidden" name="{{ name|escape('html') }}" value="{{ value|escape('html') }}" /> + <input type="hidden" name="{{ name|escape('html') }}" value="{{ value|escape('html') }}"> {% endfor %} <h3>{{ warning }}</h3> <p>{{ '{expirycheck:expwarning:expiry_date_text}'|trans }} {{ expireOnDate }}</p> - <input type="submit" name="yes" id="yesbutton" value="{{ '{expirycheck:expwarning:btn_continue}'|trans }}" /> + <input type="submit" name="yes" id="yesbutton" value="{{ '{expirycheck:expwarning:btn_continue}'|trans }}" autofocus> </form> {% endblock %} diff --git a/modules/expirycheck/templates/expired.php b/modules/expirycheck/templates/expired.php index dc4f54718acc90a3adef7e94d4fccf369db3acc0..ee1e73bda4290575a2665f58740bb39119b972bf 100644 --- a/modules/expirycheck/templates/expired.php +++ b/modules/expirycheck/templates/expired.php @@ -3,8 +3,18 @@ $this->data['header'] = $this->t('{expirycheck:expwarning:access_denied}'); $this->includeAtTemplateBase('includes/header.php'); ?> <h2><?php echo $this->t('{expirycheck:expwarning:access_denied}'); ?></h2> - <p><?php echo $this->t('{expirycheck:expwarning:no_access_to}', array('%NETID%' => htmlspecialchars($this->data['netId']))); ?></p> - <p><?php echo $this->t('{expirycheck:expwarning:expiry_date_text}'); ?> <b><?php echo htmlspecialchars($this->data['expireOnDate']); ?></b></p> + <p> + <?php + echo $this->t( + '{expirycheck:expwarning:no_access_to}', + array('%NETID%' => htmlspecialchars($this->data['netId'])) + ); + ?> + </p> + <p> + <?php echo $this->t('{expirycheck:expwarning:expiry_date_text}'); ?> + <b><?php echo htmlspecialchars($this->data['expireOnDate']); ?></b> + </p> <p><?php echo $this->t('{expirycheck:expwarning:contact_home}'); ?></p> <?php $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php b/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php index 20ebfd33029a4fb0aab837b9500b4eade2a732ed..76d78fba8488ec95408ff3ce2c01971337bd97c2 100644 --- a/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php +++ b/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php @@ -105,7 +105,8 @@ class AttributeAddUsersGroups extends BaseFilter if (!isset($attributes[$map['memberof']])) { throw new \SimpleSAML\Error\Exception( $this->title.'The memberof attribute ['.$map['memberof']. - '] is not defined in the user\'s Attributes: '.implode(', ', array_keys($attributes))); + '] is not defined in the user\'s Attributes: '.implode(', ', array_keys($attributes)) + ); } // MemberOf must be an array of group DN's @@ -156,8 +157,14 @@ class AttributeAddUsersGroups extends BaseFilter $groups = array(); try { - // Intention is to filter in 'ou=groups,dc=example,dc=com' for '(memberUid = <value of attribute.username>)' and take only the attributes 'cn' (=name of the group) - $all_groups = $this->getLdap()->searchformultiple($openldap_base, array($map['memberof'] => $attributes[$map['username']][0]), array($map['member'])); + /* Intention is to filter in 'ou=groups,dc=example,dc=com' for + * '(memberUid = <value of attribute.username>)' and take only the attributes 'cn' (=name of the group) + */ + $all_groups = $this->getLdap()->searchformultiple( + $openldap_base, + array($map['memberof'] => $attributes[$map['username']][0]), + array($map['member']) + ); } catch (\SimpleSAML\Error\UserNotFound $e) { return $groups; // if no groups found return with empty (still just initialized) groups array } @@ -194,7 +201,8 @@ class AttributeAddUsersGroups extends BaseFilter if (!isset($attributes[$map['dn']])) { throw new \SimpleSAML\Error\Exception( $this->title.'The DN attribute ['.$map['dn']. - '] is not defined in the user\'s Attributes: '.implode(', ', array_keys($attributes))); + '] is not defined in the user\'s Attributes: '.implode(', ', array_keys($attributes)) + ); } // DN attribute must have a value @@ -249,7 +257,6 @@ class AttributeAddUsersGroups extends BaseFilter // Check each DN of the passed memberOf foreach ($memberof as $dn) { - // Avoid infinite loops, only need to check a DN once if (isset($searched[$dn])) { continue; diff --git a/modules/ldap/lib/Auth/Process/BaseFilter.php b/modules/ldap/lib/Auth/Process/BaseFilter.php index 60e9b70d9572fcd1a653387f88e79c0f8ad95116..42d5abb26d44bf0c1e87a67415eec5e007cf39ea 100644 --- a/modules/ldap/lib/Auth/Process/BaseFilter.php +++ b/modules/ldap/lib/Auth/Process/BaseFilter.php @@ -110,7 +110,6 @@ abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter // If an authsource was defined (an not empty string)... if (isset($config['authsource']) && $config['authsource']) { - // Log the authsource request \SimpleSAML\Logger::debug( $this->title.'Attempting to get configuration values from authsource ['. diff --git a/modules/ldap/lib/Auth/Source/LDAP.php b/modules/ldap/lib/Auth/Source/LDAP.php index e3cbd9d52c1fe20d910e56fceebcf9c8970911c5..4757a3bb2502c999fd2927f89f7f300224aa402a 100644 --- a/modules/ldap/lib/Auth/Source/LDAP.php +++ b/modules/ldap/lib/Auth/Source/LDAP.php @@ -35,8 +35,10 @@ class LDAP extends \SimpleSAML\Module\core\Auth\UserPassBase // Call the parent constructor first, as required by the interface parent::__construct($info, $config); - $this->ldapConfig = new \SimpleSAML\Module\ldap\ConfigHelper($config, - 'Authentication source '.var_export($this->authId, true)); + $this->ldapConfig = new \SimpleSAML\Module\ldap\ConfigHelper( + $config, + 'Authentication source '.var_export($this->authId, true) + ); } diff --git a/modules/ldap/lib/Auth/Source/LDAPMulti.php b/modules/ldap/lib/Auth/Source/LDAPMulti.php index 8025d44714df2d060db12565332e5267679548f8..88a575b742acd187b0b424e7385cbfff7d0f9686 100644 --- a/modules/ldap/lib/Auth/Source/LDAPMulti.php +++ b/modules/ldap/lib/Auth/Source/LDAPMulti.php @@ -45,25 +45,29 @@ class LDAPMulti extends \SimpleSAML\Module\core\Auth\UserPassOrgBase // Call the parent constructor first, as required by the interface parent::__construct($info, $config); - $cfgHelper = \SimpleSAML\Configuration::loadFromArray($config, - 'Authentication source '.var_export($this->authId, true)); + $cfgHelper = \SimpleSAML\Configuration::loadFromArray( + $config, + 'Authentication source '.var_export($this->authId, true) + ); $this->orgs = array(); $this->ldapOrgs = array(); foreach ($config as $name => $value) { - if ($name === 'username_organization_method') { $usernameOrgMethod = $cfgHelper->getValueValidate( 'username_organization_method', - array('none', 'allow', 'force')); + array('none', 'allow', 'force') + ); $this->setUsernameOrgMethod($usernameOrgMethod); continue; } if ($name === 'include_organization_in_username') { $this->includeOrgInUsername = $cfgHelper->getBoolean( - 'include_organization_in_username', false); + 'include_organization_in_username', + false + ); continue; } @@ -76,9 +80,10 @@ class LDAPMulti extends \SimpleSAML\Module\core\Auth\UserPassOrgBase $this->orgs[$orgId] = $orgId; } - $orgCfg = new \SimpleSAML\Module\ldap\ConfigHelper($orgCfg, - 'Authentication source '.var_export($this->authId, true). - ', organization '.var_export($orgId, true)); + $orgCfg = new \SimpleSAML\Module\ldap\ConfigHelper( + $orgCfg, + 'Authentication source '.var_export($this->authId, true).', organization '.var_export($orgId, true) + ); $this->ldapOrgs[$orgId] = $orgCfg; } } diff --git a/modules/ldap/lib/ConfigHelper.php b/modules/ldap/lib/ConfigHelper.php index 3b03a0826512413e6c888c3ae5de4e19331dcbff..d4dcff33ad5084d1f8fdd08cca9bc1734cff91bf 100644 --- a/modules/ldap/lib/ConfigHelper.php +++ b/modules/ldap/lib/ConfigHelper.php @@ -151,7 +151,6 @@ class ConfigHelper $this->searchScope = $config->getString('search.scope', 'subtree'); $this->searchFilter = $config->getString('search.filter', null); $this->searchAttributes = $config->getArray('search.attributes'); - } else { $this->dnPattern = $config->getString('dnpattern'); } @@ -187,7 +186,14 @@ class ConfigHelper throw new \SimpleSAML\Error\Error('WRONGUSERPASS'); } - $ldap = new \SimpleSAML\Auth\LDAP($this->hostname, $this->enableTLS, $this->debug, $this->timeout, $this->port, $this->referrals); + $ldap = new \SimpleSAML\Auth\LDAP( + $this->hostname, + $this->enableTLS, + $this->debug, + $this->timeout, + $this->port, + $this->referrals + ); if (!$this->searchEnable) { $ldapusername = addcslashes($username, ',+"\\<>;*'); @@ -199,7 +205,14 @@ class ConfigHelper } } - $dn = $ldap->searchfordn($this->searchBase, $this->searchAttributes, $username, true, $this->searchFilter, $this->searchScope); + $dn = $ldap->searchfordn( + $this->searchBase, + $this->searchAttributes, + $username, + true, + $this->searchFilter, + $this->searchScope + ); if ($dn === null) { /* User not found with search. */ \SimpleSAML\Logger::info($this->location.': Unable to find users DN. username=\''.$username.'\''); @@ -212,14 +225,14 @@ class ConfigHelper throw new \SimpleSAML\Error\Error('WRONGUSERPASS'); } - /* In case of SASL bind, authenticated and authorized DN may differ */ + // In case of SASL bind, authenticated and authorized DN may differ if (isset($sasl_args)) { $dn = $ldap->whoami($this->searchBase, $this->searchAttributes); } - /* Are privs needed to get the attributes? */ + // Are privs needed to get the attributes? if ($this->privRead) { - /* Yes, rebind with privs */ + // Yes, rebind with privs if (!$ldap->bind($this->privUsername, $this->privPassword)) { throw new \Exception('Error authenticating using privileged DN & password.'); } @@ -253,12 +266,14 @@ class ConfigHelper */ public function searchfordn($attribute, $value, $allowZeroHits) { - $ldap = new \SimpleSAML\Auth\LDAP($this->hostname, + $ldap = new \SimpleSAML\Auth\LDAP( + $this->hostname, $this->enableTLS, $this->debug, $this->timeout, $this->port, - $this->referrals); + $this->referrals + ); if ($attribute == null) { $attribute = $this->searchAttributes; @@ -270,8 +285,14 @@ class ConfigHelper } } - return $ldap->searchfordn($this->searchBase, $attribute, - $value, $allowZeroHits, $this->searchFilter, $this->searchScope); + return $ldap->searchfordn( + $this->searchBase, + $attribute, + $value, + $allowZeroHits, + $this->searchFilter, + $this->searchScope + ); } public function getAttributes($dn, $attributes = null) @@ -280,16 +301,18 @@ class ConfigHelper $attributes = $this->attributes; } - $ldap = new \SimpleSAML\Auth\LDAP($this->hostname, + $ldap = new \SimpleSAML\Auth\LDAP( + $this->hostname, $this->enableTLS, $this->debug, $this->timeout, $this->port, - $this->referrals); + $this->referrals + ); - /* Are privs needed to get the attributes? */ + // Are privs needed to get the attributes? if ($this->privRead) { - /* Yes, rebind with privs */ + // Yes, rebind with privs if (!$ldap->bind($this->privUsername, $this->privPassword)) { throw new \Exception('Error authenticating using privileged DN & password.'); } diff --git a/modules/memcacheMonitor/templates/memcachestat.tpl.php b/modules/memcacheMonitor/templates/memcachestat.tpl.php index 9a9a3399d313d69f9331ac08a7903cc42e9ed9b0..e3815c72bd5551ae0d1b7badaacf7a014e3f919e 100644 --- a/modules/memcacheMonitor/templates/memcachestat.tpl.php +++ b/modules/memcacheMonitor/templates/memcachestat.tpl.php @@ -1,42 +1,19 @@ <?php -$this->data['head'] = '<style type="text/css"> - table.statustable td, table.statustable th { - border: 1px solid #eee; - padding: 2px 6px; - } - table.statustable { - border-collapse: collapse; - } - .bmax { - border: 1px solid #555; - background: #eee; - } - .bused { - border-right: 1px solid #555; - border-bottom: 1px solid #555; - color: white; - background: #833; - } -</style> -'; - - - +$this->data['head'] = '<link href="'.$this->data['baseurlpath'].'assets/css/memcacheMonitor.css" rel="stylesheet" />'; $this->includeAtTemplateBase('includes/header.php'); $title = $this->data['title']; $table = $this->data['table']; - // Identify column headings $column_titles = array(); -foreach($table as $row_title => $row_data) { - foreach($row_data as $ct => $foo) { - if(!in_array($ct, $column_titles, true)) { - $column_titles[] = $ct; - } - } +foreach ($table as $row_title => $row_data) { + foreach ($row_data as $ct => $foo) { + if (!in_array($ct, $column_titles, true)) { + $column_titles[] = $ct; + } + } } ?> @@ -48,28 +25,28 @@ foreach($table as $row_title => $row_data) { <tr> <th></th> <?php -foreach($column_titles as $ct) { - echo '<th>' . htmlspecialchars($ct) . '</th>' . "\n"; +foreach ($column_titles as $ct) { + echo '<th>'.htmlspecialchars($ct).'</th>'."\n"; } ?> </tr> <?php -foreach($table as $row_title => $row_data) { - echo '<tr>' . "\n"; - echo '<th class="rowtitle" style="text-align: right">' . $this->t($this->data['rowtitles'][$row_title]) . '</th>' . "\n"; +foreach ($table as $row_title => $row_data) { + echo '<tr>' . "\n"; + echo '<th class="rowtitle" style="text-align: right">'.$this->t($this->data['rowtitles'][$row_title]).'</th>'."\n"; - foreach($column_titles as $ct) { - echo '<td>'; + foreach ($column_titles as $ct) { + echo '<td>'; - if(array_key_exists($ct, $row_data)) { - echo htmlspecialchars($row_data[$ct]); - } + if (array_key_exists($ct, $row_data)) { + echo htmlspecialchars($row_data[$ct]); + } - echo '</td>' . "\n"; - } + echo '</td>' . "\n"; + } - echo '</tr>' . "\n"; + echo '</tr>' . "\n"; } ?> @@ -77,15 +54,14 @@ foreach($table as $row_title => $row_data) { <?php if (array_key_exists('bytes', $this->data['statsraw']) && array_key_exists('limit_maxbytes', $this->data['statsraw'])) { - foreach($this->data['statsraw']['bytes'] as $key => $row_data) { - echo ('<h3>Storage usage on [' . $key . ']</h3>'); - $maxpix = 400; - $pix = floor($this->data['statsraw']['bytes'][$key]*$maxpix / $this->data['statsraw']['limit_maxbytes'][$key]); - - echo('<div class="bmax" style="width: ' . $maxpix. 'px"><div class="bused" style="width: ' . $pix . 'px"> - Used: ' . $table['bytes'][$key] . ' - </div>Total available: ' . $table['limit_maxbytes'][$key] . '</div>'); - } + foreach ($this->data['statsraw']['bytes'] as $key => $row_data) { + echo ('<h3>Storage usage on ['.$key.']</h3>'); + $maxpix = 400; + $pix = floor($this->data['statsraw']['bytes'][$key]*$maxpix / $this->data['statsraw']['limit_maxbytes'][$key]); + + echo '<div class="bmax" style="width: '.$maxpix.'px"><div class="bused" style="width: '.$pix.'px">Used: '. + $table['bytes'][$key].'</div>Total available: '.$table['limit_maxbytes'][$key].'</div>'; + } } $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/memcacheMonitor/templates/memcachestat.twig b/modules/memcacheMonitor/templates/memcachestat.twig index f3d4cbd013eb655c0c9bc986f06501d7f85be7f9..fdc4af4bd03a307ad28974a4c4463185ec4ab749 100644 --- a/modules/memcacheMonitor/templates/memcachestat.twig +++ b/modules/memcacheMonitor/templates/memcachestat.twig @@ -2,7 +2,7 @@ {% extends "base.twig" %} {% block preload %} - <link href="{{ baseurlpath }}style.css" rel="stylesheet" /> + <link href="{{ baseurlpath }}assets/css/memcacheMonitor.css" rel="stylesheet" /> {% endblock %} {% block content %} diff --git a/modules/memcacheMonitor/www/style.css b/modules/memcacheMonitor/www/assets/css/memcacheMonitor.css similarity index 100% rename from modules/memcacheMonitor/www/style.css rename to modules/memcacheMonitor/www/assets/css/memcacheMonitor.css diff --git a/modules/memcacheMonitor/www/memcachestat.php b/modules/memcacheMonitor/www/memcachestat.php index 3025afce4679b47f64263c84cb86869f5e312116..78bf44f56e8c811f14c4382099ebc8ce133a2acb 100644 --- a/modules/memcacheMonitor/www/memcachestat.php +++ b/modules/memcacheMonitor/www/memcachestat.php @@ -2,7 +2,7 @@ function tdate($input) { - return date(DATE_RFC822, $input); + return date(DATE_RFC822, $input); } function hours($input) @@ -23,42 +23,42 @@ function humanreadable($input) { $output = ""; $input = abs($input); - + if ($input >= (1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 100)) { - $output = sprintf("%5ldEi", $input / (1024 * 1024 * 1024 * 1024 * 1024 * 1024)); - } else if ($input >= (1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 10)) { - $output = sprintf("%5.1fEi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0)); - } else if ($input >= (1024 * 1024 * 1024 * 1024 * 1024 * 1024)) { - $output = sprintf("%5.2fEi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0)); - } else if ($input >= (1024 * 1024 * 1024 * 1024 * 1024 * 100)) { - $output = sprintf("%5ldPi", $input / (1024 * 1024 * 1024 * 1024 * 1024)); - } else if ($input >= (1024 * 1024 * 1024 * 1024 * 1024 * 10)) { - $output = sprintf("%5.1fPi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0)); - } else if ($input >= (1024 * 1024 * 1024 * 1024 * 1024)) { - $output = sprintf("%5.2fPi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0)); - } else if ($input >= (1024 * 1024 * 1024 * 1024 * 100)) { + $output = sprintf("%5ldEi", $input / (1024 * 1024 * 1024 * 1024 * 1024 * 1024)); + } elseif ($input >= (1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 10)) { + $output = sprintf("%5.1fEi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0)); + } elseif ($input >= (1024 * 1024 * 1024 * 1024 * 1024 * 1024)) { + $output = sprintf("%5.2fEi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0)); + } elseif ($input >= (1024 * 1024 * 1024 * 1024 * 1024 * 100)) { + $output = sprintf("%5ldPi", $input / (1024 * 1024 * 1024 * 1024 * 1024)); + } elseif ($input >= (1024 * 1024 * 1024 * 1024 * 1024 * 10)) { + $output = sprintf("%5.1fPi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0)); + } elseif ($input >= (1024 * 1024 * 1024 * 1024 * 1024)) { + $output = sprintf("%5.2fPi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0)); + } elseif ($input >= (1024 * 1024 * 1024 * 1024 * 100)) { $output = sprintf("%5ldTi", $input / (1024 * 1024 * 1024 * 1024)); - } else if ($input >= (1024 * 1024 * 1024 * 1024 * 10)) { - $output = sprintf("%5.1fTi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0)); - } else if ($input >= (1024 * 1024 * 1024 * 1024)) { + } elseif ($input >= (1024 * 1024 * 1024 * 1024 * 10)) { + $output = sprintf("%5.1fTi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0)); + } elseif ($input >= (1024 * 1024 * 1024 * 1024)) { $output = sprintf("%5.2fTi", $input / (1024.0 * 1024.0 * 1024.0 * 1024.0)); - } else if ($input >= (1024 * 1024 * 1024 * 100)) { - $output = sprintf("%5ldGi", $input / (1024 * 1024 * 1024)); - } else if ($input >= (1024 * 1024 * 1024 * 10)) { - $output = sprintf("%5.1fGi", $input / (1024.0 * 1024.0 * 1024.0)); - } else if ($input >= (1024 * 1024 * 1024)) { - $output = sprintf("%5.2fGi", $input / (1024.0 * 1024.0 * 1024.0)); - } else if ($input >= (1024 * 1024 * 100)) { + } elseif ($input >= (1024 * 1024 * 1024 * 100)) { + $output = sprintf("%5ldGi", $input / (1024 * 1024 * 1024)); + } elseif ($input >= (1024 * 1024 * 1024 * 10)) { + $output = sprintf("%5.1fGi", $input / (1024.0 * 1024.0 * 1024.0)); + } elseif ($input >= (1024 * 1024 * 1024)) { + $output = sprintf("%5.2fGi", $input / (1024.0 * 1024.0 * 1024.0)); + } elseif ($input >= (1024 * 1024 * 100)) { $output = sprintf("%5ldMi", $input / (1024 * 1024)); - } else if ($input >= (1024 * 1024 * 10)) { - $output = sprintf("%5.1fM", $input / (1024.0 * 1024.0)); - } else if ($input >= (1024 * 1024)) { - $output = sprintf("%5.2fMi", $input / (1024.0 * 1024.0)); - } else if ($input >= (1024 * 100)) { + } elseif ($input >= (1024 * 1024 * 10)) { + $output = sprintf("%5.1fM", $input / (1024.0 * 1024.0)); + } elseif ($input >= (1024 * 1024)) { + $output = sprintf("%5.2fMi", $input / (1024.0 * 1024.0)); + } elseif ($input >= (1024 * 100)) { $output = sprintf("%5ldKi", $input / 1024); - } else if ($input >= (1024 * 10)) { + } elseif ($input >= (1024 * 10)) { $output = sprintf("%5.1fKi", $input / 1024.0); - } else if ($input >= (1024)) { + } elseif ($input >= (1024)) { $output = sprintf("%5.2fKi", $input / 1024.0); } else { $output = sprintf("%5ld", $input); @@ -109,7 +109,9 @@ $rowTitles = array( 'cmd_get' => \SimpleSAML\Locale\Translate::noop('{memcacheMonitor:memcachestat:cmd_get}'), 'cmd_set' => \SimpleSAML\Locale\Translate::noop('{memcacheMonitor:memcachestat:cmd_set}'), 'cmd_touch' => \SimpleSAML\Locale\Translate::noop('{memcacheMonitor:memcachestat:cmd_touch}'), - 'connection_structures' => \SimpleSAML\Locale\Translate::noop('{memcacheMonitor:memcachestat:connection_structures}'), + 'connection_structures' => \SimpleSAML\Locale\Translate::noop( + '{memcacheMonitor:memcachestat:connection_structures}' + ), 'conn_yields' => \SimpleSAML\Locale\Translate::noop('{memcacheMonitor:memcachestat:conn_yields}'), 'curr_connections' => \SimpleSAML\Locale\Translate::noop('{memcacheMonitor:memcachestat:curr_connections}'), 'curr_items' => \SimpleSAML\Locale\Translate::noop('{memcacheMonitor:memcachestat:curr_items}'), diff --git a/modules/metarefresh/config-templates/config-metarefresh.php b/modules/metarefresh/config-templates/config-metarefresh.php index 978170178fd3388b63687fde928be04688e37944..e86585c6a5b0232d2976dbd269dff3fd9028146c 100644 --- a/modules/metarefresh/config-templates/config-metarefresh.php +++ b/modules/metarefresh/config-templates/config-metarefresh.php @@ -68,7 +68,7 @@ $config = array( ), 'expireAfter' => 34560060, // Maximum 4 days cache time (3600*24*4) - 'outputDir' => 'metadata/metadata-kalmar-consuming/', + 'outputDir' => 'metadata/metadata-kalmar-consuming/', /* * Which output format the metadata should be saved as. diff --git a/modules/metarefresh/hooks/hook_cron.php b/modules/metarefresh/hooks/hook_cron.php index 8feee46ee642405a78d8c1dbf8237c39d97f146a..bb396b8a0ba41d75155fdfd64833386ba988f3b4 100644 --- a/modules/metarefresh/hooks/hook_cron.php +++ b/modules/metarefresh/hooks/hook_cron.php @@ -1,4 +1,7 @@ <?php + +use \SimpleSAML\Logger; + /** * Hook to run a cron job. * @@ -10,7 +13,7 @@ function metarefresh_hook_cron(&$croninfo) assert(array_key_exists('summary', $croninfo)); assert(array_key_exists('tag', $croninfo)); - SimpleSAML\Logger::info('cron [metarefresh]: Running cron in cron tag ['.$croninfo['tag'].'] '); + Logger::info('cron [metarefresh]: Running cron in cron tag ['.$croninfo['tag'].'] '); try { $config = \SimpleSAML\Configuration::getInstance(); @@ -26,7 +29,7 @@ function metarefresh_hook_cron(&$croninfo) continue; } - \SimpleSAML\Logger::info('cron [metarefresh]: Executing set ['.$setkey.']'); + Logger::info('cron [metarefresh]: Executing set ['.$setkey.']'); $expireAfter = $set->getInteger('expireAfter', null); if ($expireAfter !== null) { @@ -62,7 +65,6 @@ function metarefresh_hook_cron(&$croninfo) $set_types = $set->getArrayize('types', $available_types); foreach ($set->getArray('sources') as $source) { - // filter metadata by type of entity if (isset($source['types'])) { $metaloader->setTypes($source['types']); @@ -89,7 +91,7 @@ function metarefresh_hook_cron(&$croninfo) $source['conditionalGET'] = $conditionalGET; } - \SimpleSAML\Logger::debug('cron [metarefresh]: In set ['.$setkey.'] loading source ['.$source['src'].']'); + Logger::debug('cron [metarefresh]: In set ['.$setkey.'] loading source ['.$source['src'].']'); $metaloader->loadSource($source); } diff --git a/modules/metarefresh/lib/ARP.php b/modules/metarefresh/lib/ARP.php index 00ce469725b061ab9b8b91ae0210d4584b977cfe..c64ff3463f593c0ed0565b578e069eb70e7c43be 100644 --- a/modules/metarefresh/lib/ARP.php +++ b/modules/metarefresh/lib/ARP.php @@ -47,7 +47,7 @@ class ARP $this->loadAttributeMap($attributemap_filename); } } - + /** * @param string $attributemap_filename * diff --git a/modules/metarefresh/lib/MetaLoader.php b/modules/metarefresh/lib/MetaLoader.php index abdc371602e68ed81c2d4658175551a43eda7e8a..1398a623b3a0ee496b50d8e156f9d02de2cb8c15 100644 --- a/modules/metarefresh/lib/MetaLoader.php +++ b/modules/metarefresh/lib/MetaLoader.php @@ -2,6 +2,8 @@ namespace SimpleSAML\Module\metarefresh; +use SimpleSAML\Logger; + /** * @package SimpleSAMLphp * @author Andreas Ã…kre Solberg <andreas.solberg@uninett.no> @@ -85,23 +87,23 @@ class MetaLoader try { list($data, $responseHeaders) = \SimpleSAML\Utils\HTTP::fetch($source['src'], $context, true); } catch (\Exception $e) { - \SimpleSAML\Logger::warning('metarefresh: '.$e->getMessage()); + Logger::warning('metarefresh: '.$e->getMessage()); } // We have response headers, so the request succeeded if (!isset($responseHeaders)) { // No response headers, this means the request failed in some way, so re-use old data - \SimpleSAML\Logger::debug('No response from '.$source['src'].' - attempting to re-use cached metadata'); + Logger::debug('No response from '.$source['src'].' - attempting to re-use cached metadata'); $this->addCachedMetadata($source); return; } elseif (preg_match('@^HTTP/1\.[01]\s304\s@', $responseHeaders[0])) { // 304 response - \SimpleSAML\Logger::debug('Received HTTP 304 (Not Modified) - attempting to re-use cached metadata'); + Logger::debug('Received HTTP 304 (Not Modified) - attempting to re-use cached metadata'); $this->addCachedMetadata($source); return; } elseif (!preg_match('@^HTTP/1\.[01]\s200\s@', $responseHeaders[0])) { // Other error - \SimpleSAML\Logger::debug('Error from '.$source['src'].' - attempting to re-use cached metadata'); + Logger::debug('Error from '.$source['src'].' - attempting to re-use cached metadata'); $this->addCachedMetadata($source); return; } @@ -114,37 +116,38 @@ class MetaLoader // Everything OK. Proceed. if (isset($source['conditionalGET']) && $source['conditionalGET']) { // Stale or no metadata, so a fresh copy - \SimpleSAML\Logger::debug('Downloaded fresh copy'); + Logger::debug('Downloaded fresh copy'); } try { $entities = $this->loadXML($data, $source); } catch (\Exception $e) { - \SimpleSAML\Logger::debug('XML parser error when parsing '.$source['src'].' - attempting to re-use cached metadata'); - \SimpleSAML\Logger::debug('XML parser returned: '.$e->getMessage()); + Logger::debug('XML parser error when parsing '.$source['src'].' - attempting to re-use cached metadata'); + Logger::debug('XML parser returned: '.$e->getMessage()); $this->addCachedMetadata($source); return; } foreach ($entities as $entity) { - if (isset($source['blacklist'])) { - if (!empty($source['blacklist']) && in_array($entity->getEntityID(), $source['blacklist'], true)) { - \SimpleSAML\Logger::info('Skipping "'.$entity->getEntityID().'" - blacklisted.'."\n"); + if (!empty($source['blacklist']) && in_array($entity->getEntityId(), $source['blacklist'], true)) { + Logger::info('Skipping "'.$entity->getEntityId().'" - blacklisted.'."\n"); continue; } } if (isset($source['whitelist'])) { - if (!empty($source['whitelist']) && !in_array($entity->getEntityID(), $source['whitelist'], true)) { - \SimpleSAML\Logger::info('Skipping "'.$entity->getEntityID().'" - not in the whitelist.'."\n"); + if (!empty($source['whitelist']) && !in_array($entity->getEntityId(), $source['whitelist'], true)) { + Logger::info('Skipping "'.$entity->getEntityId().'" - not in the whitelist.'."\n"); continue; } } if (array_key_exists('certificates', $source) && $source['certificates'] !== null) { if (!$entity->validateSignature($source['certificates'])) { - \SimpleSAML\Logger::info('Skipping "'.$entity->getEntityId().'" - could not verify signature using certificate.'."\n"); + Logger::info( + 'Skipping "'.$entity->getEntityId().'" - could not verify signature using certificate.'."\n" + ); continue; } } @@ -152,11 +155,13 @@ class MetaLoader if (array_key_exists('validateFingerprint', $source) && $source['validateFingerprint'] !== null) { if (!array_key_exists('certificates', $source) || $source['certificates'] == null) { if (!$entity->validateFingerprint($source['validateFingerprint'])) { - \SimpleSAML\Logger::info('Skipping "'.$entity->getEntityId().'" - could not verify signature using fingerprint.'."\n"); + Logger::info( + 'Skipping "'.$entity->getEntityId().'" - could not verify signature using fingerprint.'."\n" + ); continue; } } else { - \SimpleSAML\Logger::info('Skipping validation with fingerprint since option certificate is set.'."\n"); + Logger::info('Skipping validation with fingerprint since option certificate is set.'."\n"); } } @@ -180,7 +185,12 @@ class MetaLoader if (in_array('attributeauthority-remote', $this->types, true)) { $attributeAuthorities = $entity->getAttributeAuthorities(); if (!empty($attributeAuthorities)) { - $this->addMetadata($source['src'], $attributeAuthorities[0], 'attributeauthority-remote', $template); + $this->addMetadata( + $source['src'], + $attributeAuthorities[0], + 'attributeauthority-remote', + $template + ); } } } @@ -281,7 +291,7 @@ class MetaLoader public function writeState() { if ($this->changed) { - \SimpleSAML\Logger::debug('Writing: '.$this->stateFile); + Logger::debug('Writing: '.$this->stateFile); \SimpleSAML\Utils\System::writeFile( $this->stateFile, "<?php\n/* This file was generated by the metarefresh module at ".$this->getTime().".\n". @@ -299,7 +309,6 @@ class MetaLoader public function dumpMetadataStdOut() { foreach ($this->metadata as $category => $elements) { - echo '/* The following data should be added to metadata/'.$category.'.php. */'."\n"; foreach ($elements as $m) { @@ -378,7 +387,8 @@ class MetaLoader } // $metadata, $attributemap, $prefix, $suffix - $arp = new \SimpleSAML\Module\metarefresh\ARP($md, + $arp = new \SimpleSAML\Module\metarefresh\ARP( + $md, $config->getValue('attributemap', ''), $config->getValue('prefix', ''), $config->getValue('suffix', '') @@ -387,7 +397,7 @@ class MetaLoader $arpxml = $arp->getXML(); - \SimpleSAML\Logger::info('Writing ARP file: '.$arpfile."\n"); + Logger::info('Writing ARP file: '.$arpfile."\n"); file_put_contents($arpfile, $arpxml); } @@ -402,7 +412,7 @@ class MetaLoader } if (!file_exists($outputDir)) { - \SimpleSAML\Logger::info('Creating directory: '.$outputDir."\n"); + Logger::info('Creating directory: '.$outputDir."\n"); $res = @mkdir($outputDir, 0777, true); if ($res === false) { throw new \Exception('Error creating directory: '.$outputDir); @@ -414,15 +424,15 @@ class MetaLoader if (array_key_exists($type, $this->metadata)) { $elements = $this->metadata[$type]; - \SimpleSAML\Logger::debug('Writing: '.$filename); + Logger::debug('Writing: '.$filename); - $content = '<?php'."\n".'/* This file was generated by the metarefresh module at '.$this->getTime()."\n"; - $content .= ' Do not update it manually as it will get overwritten'."\n".'*/'."\n"; + $content = '<?php'."\n".'/* This file was generated by the metarefresh module at '; + $content .= $this->getTime()."\nDo not update it manually as it will get overwritten\n".'*/'."\n"; foreach ($elements as $m) { $entityID = $m['metadata']['entityid']; - $content .= "\n"; - $content .= '$metadata[\''.addslashes($entityID).'\'] = '.var_export($m['metadata'], true).';'."\n"; + $content .= "\n".'$metadata[\''. + $content .= addslashes($entityID).'\'] = '.var_export($m['metadata'], true).';'."\n"; } $content .= "\n".'?>'; @@ -430,9 +440,9 @@ class MetaLoader \SimpleSAML\Utils\System::writeFile($filename, $content, 0644); } elseif (is_file($filename)) { if (unlink($filename)) { - \SimpleSAML\Logger::debug('Deleting stale metadata file: '.$filename); + Logger::debug('Deleting stale metadata file: '.$filename); } else { - \SimpleSAML\Logger::warning('Could not delete stale metadata file: '.$filename); + Logger::warning('Could not delete stale metadata file: '.$filename); } } } @@ -455,7 +465,7 @@ class MetaLoader foreach ($elements as $m) { $entityId = $m['metadata']['entityid']; - \SimpleSAML\Logger::debug( + Logger::debug( 'metarefresh: Add metadata entry '. var_export($entityId, true).' in set '.var_export($set, true).'.' ); @@ -468,7 +478,7 @@ class MetaLoader foreach ($metaHandler->getMetadataSets() as $set) { foreach ($metaHandler->getMetadataSet($set) as $entityId => $metadata) { if (!array_key_exists('expire', $metadata)) { - \SimpleSAML\Logger::warning( + Logger::warning( 'metarefresh: Metadata entry without expire timestamp: '.var_export($entityId, true). ' in set '.var_export($set, true).'.' ); @@ -477,10 +487,11 @@ class MetaLoader if ($metadata['expire'] > $ct) { continue; } - \SimpleSAML\Logger::debug('metarefresh: '.$entityId.' expired '.date('l jS \of F Y h:i:s A', $metadata['expire'])); - \SimpleSAML\Logger::debug( + Logger::debug('metarefresh: '.$entityId.' expired '.date('l jS \of F Y h:i:s A', $metadata['expire'])); + Logger::debug( 'metarefresh: Delete expired metadata entry '. - var_export($entityId, true).' in set '.var_export($set, true).'. ('.($ct - $metadata['expire']).' sec)' + var_export($entityId, true).' in set '.var_export($set, true). + '. ('.($ct - $metadata['expire']).' sec)' ); $metaHandler->deleteMetadata($entityId, $set); } diff --git a/modules/metarefresh/templates/fetch.tpl.php b/modules/metarefresh/templates/fetch.tpl.php index 780e98c894c86ca40c45cbddb8c8878c255ce83a..5a988ce74c1b4c3d03c188dc8956890a59a6e8b8 100644 --- a/modules/metarefresh/templates/fetch.tpl.php +++ b/modules/metarefresh/templates/fetch.tpl.php @@ -2,21 +2,16 @@ $this->data['header'] = $this->t('{metarefresh:metarefresh:metarefresh_header}'); $this->includeAtTemplateBase('includes/header.php'); -echo('<h1>'.$this->data['header'].'</h1>'); - +echo '<h1>'.$this->data['header'].'</h1>'; if (!empty($this->data['logentries'])) { - - echo '<pre style="border: 1px solid #aaa; padding: .5em; overflow: scroll">'; - foreach($this->data['logentries'] AS $l) { - echo $l . "\n"; - } - echo '</pre>'; - + echo '<pre style="border: 1px solid #aaa; padding: .5em; overflow: scroll">'; + foreach ($this->data['logentries'] as $l) { + echo $l."\n"; + } + echo '</pre>'; } else { - echo $this->t('{metarefresh:metarefresh:no_output}'); + echo $this->t('{metarefresh:metarefresh:no_output}'); } - - $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/metarefresh/www/fetch.php b/modules/metarefresh/www/fetch.php index 2a1bbc01fe715c83f4cfb1b1c63f1d57f00a3a99..0ecb548d0206fb7c1ca395e58fbe736fec3d21c4 100644 --- a/modules/metarefresh/www/fetch.php +++ b/modules/metarefresh/www/fetch.php @@ -36,7 +36,6 @@ foreach ($sets as $setkey => $set) { $set_types = $set->getArrayize('types', $available_types); foreach ($set->getArray('sources') as $source) { - // filter metadata by type of entity if (isset($source['types'])) { $metaloader->setTypes($source['types']); @@ -73,7 +72,7 @@ foreach ($sets as $setkey => $set) { case 'serialize': $metaloader->writeMetadataSerialize($outputDir); break; - } + } } catch (\Exception $e) { $e = \SimpleSAML\Error\Exception::fromException($e); $e->logWarning(); diff --git a/modules/multiauth/lib/Auth/Source/MultiAuth.php b/modules/multiauth/lib/Auth/Source/MultiAuth.php index ae3682f697b90dd6601047db89792d2fe18ff869..a0f9778a2ffdf8a5f505a19b01c616d3abb5f8d5 100644 --- a/modules/multiauth/lib/Auth/Source/MultiAuth.php +++ b/modules/multiauth/lib/Auth/Source/MultiAuth.php @@ -40,8 +40,8 @@ class MultiAuth extends \SimpleSAML\Auth\Source /** * Constructor for this authentication source. * - * @param array $info Information about this authentication source. - * @param array $config Configuration. + * @param array $info Information about this authentication source. + * @param array $config Configuration. */ public function __construct($info, $config) { @@ -61,7 +61,7 @@ class MultiAuth extends \SimpleSAML\Auth\Source $this->sources = array(); foreach ($config['sources'] as $source => $info) { if (is_int($source)) { - // Backwards compatibility + // Backwards compatibility $source = $info; $info = array(); } @@ -106,7 +106,7 @@ class MultiAuth extends \SimpleSAML\Auth\Source * This method never return. The authentication process is finished * in the delegateAuthentication method. * - * @param array &$state Information about the current authentication. + * @param array &$state Information about the current authentication. */ public function authenticate(&$state) { @@ -143,8 +143,8 @@ class MultiAuth extends \SimpleSAML\Auth\Source * to be able to logout properly. Then it calls the authenticate method * on such selected authentication source. * - * @param string $authId Selected authentication source - * @param array $state Information about the current authentication. + * @param string $authId Selected authentication source + * @param array $state Information about the current authentication. */ public static function delegateAuthentication($authId, $state) { @@ -153,7 +153,7 @@ class MultiAuth extends \SimpleSAML\Auth\Source $as = \SimpleSAML\Auth\Source::getById($authId); $valid_sources = array_map( - function($src) { + function ($src) { return $src['source']; }, $state[self::SOURCESID] @@ -164,7 +164,12 @@ class MultiAuth extends \SimpleSAML\Auth\Source // Save the selected authentication source for the logout process. $session = \SimpleSAML\Session::getSessionFromRequest(); - $session->setData(self::SESSION_SOURCE, $state[self::AUTHID], $authId, \SimpleSAML\Session::DATA_TIMEOUT_SESSION_END); + $session->setData( + self::SESSION_SOURCE, + $state[self::AUTHID], + $authId, + \SimpleSAML\Session::DATA_TIMEOUT_SESSION_END + ); try { $as->authenticate($state); @@ -183,7 +188,7 @@ class MultiAuth extends \SimpleSAML\Auth\Source * This method retrieves the authentication source used for this * session and then call the logout method on it. * - * @param array &$state Information about the current logout operation. + * @param array &$state Information about the current logout operation. */ public function logout(&$state) { diff --git a/modules/multiauth/templates/selectsource.twig b/modules/multiauth/templates/selectsource.twig index d308d457afa092088005cea3e90f8199ac811efd..5d1e3793e93dc82d3752390d1ab24013aa6d560b 100644 --- a/modules/multiauth/templates/selectsource.twig +++ b/modules/multiauth/templates/selectsource.twig @@ -6,17 +6,13 @@ <p>{{ '{multiauth:multiauth:select_source_text}'| trans }}</p> <form action="{{ selfUrl|escape('html') }}" method="get"> - <input type="hidden" name="AuthState" value="{{ authstate|escape('html') }} " /> + <input type="hidden" name="AuthState" value="{{ authstate|escape('html') }} "> <ul> {% for key, source in sources %} {% set name = ('src-' ~ source.source64) %} {% set button = ('button-' ~ source.source) %} <li class="{{ source.css_class|escape('html') }} authsource"> - {% if source.source == preferred %} - <input type="submit" name="{{ name|escape('html') }}" autofocus="autofocus" id="{{ button|escape('html') }}" value="{{ source.text|escape('html') }}" /> - {% else %} - <input type="submit" name="{{ name|escape('html') }}" id="{{ button|escape('html') }}" value="{{ source.text|escape('html') }}" /> - {% endif %} + <input type="submit" name="{{ name|escape('html') }}" id="{{ button|escape('html') }}" value="{{ source.text|escape('html') }}"{%- if source.source == preferred %} autofocus{% endif -%}> {% if source.help %} <p>{{ source.help|escape('html') }}</p> {% endif %} diff --git a/modules/multiauth/www/selectsource.php b/modules/multiauth/www/selectsource.php index 70c889d8a5646912ea17c0e2ebfcc647bb347167..287f7808eab880abd9749df3e665f90f4b836fac 100644 --- a/modules/multiauth/www/selectsource.php +++ b/modules/multiauth/www/selectsource.php @@ -56,8 +56,17 @@ $language = $t->getTranslator()->getLanguage()->getLanguage(); $sources = $state[\SimpleSAML\Module\multiauth\Auth\Source\MultiAuth::SOURCESID]; foreach ($sources as $key => $source) { $sources[$key]['source64'] = base64_encode($sources[$key]['source']); - $sources[$key]['text'] = (isset($sources[$key]['text'][$language]) ? $sources[$key]['text'][$language] : $sources[$key]['text'][$defaultLanguage]); - $sources[$key]['help'] = (isset($sources[$key]['help'][$language]) ? $sources[$key]['help'][$language] : $sources[$key]['help'][$defaultLanguage]); + if (isset($sources[$key]['text'][$language])) { + $sources[$key]['text'] = $sources[$key]['text'][$language]; + } else { + $sources[$key]['text'] = $sources[$key]['text'][$defaultLanguage]; + } + + if (isset($sources[$key]['help'][$language])) { + $sources[$key]['help'] = $sources[$key]['help'][$language]; + } else { + $sources[$key]['help'] = $sources[$key]['help'][$defaultLanguage]; + } } $t->data['authstate'] = $authStateId; diff --git a/modules/negotiate/lib/Auth/Source/Negotiate.php b/modules/negotiate/lib/Auth/Source/Negotiate.php index ed9b8c5e81adfe5b4dbbd04d8621fb0bf3a8daf9..5ef72f4cf4364b3ebc7f85a4189f144250e410e9 100644 --- a/modules/negotiate/lib/Auth/Source/Negotiate.php +++ b/modules/negotiate/lib/Auth/Source/Negotiate.php @@ -2,6 +2,8 @@ namespace SimpleSAML\Module\negotiate\Auth\Source; +use \SimpleSAML\Logger; + /** * The Negotiate module. Allows for password-less, secure login by Kerberos and Negotiate. * @@ -24,7 +26,7 @@ class Negotiate extends \SimpleSAML\Auth\Source protected $timeout = 30; protected $keytab = ''; protected $base = array(); - protected $attr = 'uid'; + protected $attr = array('uid'); protected $subnet = null; protected $admin_user = null; protected $admin_pw = null; @@ -60,9 +62,9 @@ class Negotiate extends \SimpleSAML\Auth\Source $this->enableTLS = $config->getBoolean('enable_tls', false); $this->debugLDAP = $config->getBoolean('debugLDAP', false); $this->timeout = $config->getInteger('timeout', 30); - $this->keytab = $config->getString('keytab'); + $this->keytab = \SimpleSAML\Utils\Config::getCertPath($config->getString('keytab')); $this->base = $config->getArrayizeString('base'); - $this->attr = $config->getString('attr', 'uid'); + $this->attr = $config->getArrayizeString('attr', 'uid'); $this->subnet = $config->getArray('subnet', null); $this->admin_user = $config->getString('adminUser', null); $this->admin_pw = $config->getString('adminPassword', null); @@ -105,7 +107,7 @@ class Negotiate extends \SimpleSAML\Auth\Source (!empty($_COOKIE['NEGOTIATE_AUTOLOGIN_DISABLE_PERMANENT']) && $_COOKIE['NEGOTIATE_AUTOLOGIN_DISABLE_PERMANENT'] == 'True') ) { - \SimpleSAML\Logger::debug('Negotiate - session disabled. falling back'); + Logger::debug('Negotiate - session disabled. falling back'); $this->fallBack($state); // never executed assert(false); @@ -117,9 +119,9 @@ class Negotiate extends \SimpleSAML\Auth\Source assert(false); } - \SimpleSAML\Logger::debug('Negotiate - authenticate(): looking for Negotiate'); + Logger::debug('Negotiate - authenticate(): looking for Negotiate'); if (!empty($_SERVER['HTTP_AUTHORIZATION'])) { - \SimpleSAML\Logger::debug('Negotiate - authenticate(): Negotiate found'); + Logger::debug('Negotiate - authenticate(): Negotiate found'); $this->ldap = new \SimpleSAML\Auth\LDAP( $this->hostname, $this->enableTLS, @@ -131,10 +133,10 @@ class Negotiate extends \SimpleSAML\Auth\Source list($mech,) = explode(' ', $_SERVER['HTTP_AUTHORIZATION'], 2); if (strtolower($mech) == 'basic') { - \SimpleSAML\Logger::debug('Negotiate - authenticate(): Basic found. Skipping.'); + Logger::debug('Negotiate - authenticate(): Basic found. Skipping.'); } else { if (strtolower($mech) != 'negotiate') { - \SimpleSAML\Logger::debug('Negotiate - authenticate(): No "Negotiate" found. Skipping.'); + Logger::debug('Negotiate - authenticate(): No "Negotiate" found. Skipping.'); } } @@ -143,14 +145,14 @@ class Negotiate extends \SimpleSAML\Auth\Source try { $reply = $auth->doAuthentication(); } catch (\Exception $e) { - \SimpleSAML\Logger::error('Negotiate - authenticate(): doAuthentication() exception: '.$e->getMessage()); + Logger::error('Negotiate - authenticate(): doAuthentication() exception: '.$e->getMessage()); $reply = null; } if ($reply) { // success! krb TGS received $user = $auth->getAuthenticatedUser(); - \SimpleSAML\Logger::info('Negotiate - authenticate(): '.$user.' authenticated.'); + Logger::info('Negotiate - authenticate(): '.$user.' authenticated.'); $lookup = $this->lookupUserData($user); if ($lookup !== null) { $state['Attributes'] = $lookup; @@ -158,20 +160,20 @@ class Negotiate extends \SimpleSAML\Auth\Source $state['LogoutState'] = array( 'negotiate:backend' => null, ); - \SimpleSAML\Logger::info('Negotiate - authenticate(): '.$user.' authorized.'); + Logger::info('Negotiate - authenticate(): '.$user.' authorized.'); \SimpleSAML\Auth\Source::completeAuth($state); // Never reached. assert(false); } } else { // Some error in the received ticket. Expired? - \SimpleSAML\Logger::info('Negotiate - authenticate(): Kerberos authN failed. Skipping.'); + Logger::info('Negotiate - authenticate(): Kerberos authN failed. Skipping.'); } } else { // No auth token. Send it. - \SimpleSAML\Logger::debug('Negotiate - authenticate(): Sending Negotiate.'); + Logger::debug('Negotiate - authenticate(): Sending Negotiate.'); // Save the $state array, so that we can restore if after a redirect - \SimpleSAML\Logger::debug('Negotiate - fallback: '.$state['LogoutState']['negotiate:backend']); + Logger::debug('Negotiate - fallback: '.$state['LogoutState']['negotiate:backend']); $id = \SimpleSAML\Auth\State::saveState($state, self::STAGEID); $params = array('AuthState' => $id); @@ -179,10 +181,9 @@ class Negotiate extends \SimpleSAML\Auth\Source exit; } - \SimpleSAML\Logger::info('Negotiate - authenticate(): Client failed Negotiate. Falling back'); + Logger::info('Negotiate - authenticate(): Client failed Negotiate. Falling back'); $this->fallBack($state); - /* The previous function never returns, so this code is never - executed */ + // The previous function never returns, so this code is never executed assert(false); } @@ -191,13 +192,13 @@ class Negotiate extends \SimpleSAML\Auth\Source { if (array_key_exists('negotiate:disable', $spMetadata)) { if ($spMetadata['negotiate:disable'] == true) { - \SimpleSAML\Logger::debug('Negotiate - SP disabled. falling back'); + Logger::debug('Negotiate - SP disabled. falling back'); return true; } else { - \SimpleSAML\Logger::debug('Negotiate - SP disable flag found but set to FALSE'); + Logger::debug('Negotiate - SP disable flag found but set to FALSE'); } } else { - \SimpleSAML\Logger::debug('Negotiate - SP disable flag not found'); + Logger::debug('Negotiate - SP disable flag not found'); } return false; } @@ -221,11 +222,11 @@ class Negotiate extends \SimpleSAML\Auth\Source foreach ($this->subnet as $cidr) { $ret = \SimpleSAML\Utils\Net::ipCIDRcheck($cidr); if ($ret) { - \SimpleSAML\Logger::debug('Negotiate: Client "'.$ip.'" matched subnet.'); + Logger::debug('Negotiate: Client "'.$ip.'" matched subnet.'); return true; } } - \SimpleSAML\Logger::debug('Negotiate: Client "'.$ip.'" did not match subnet.'); + Logger::debug('Negotiate: Client "'.$ip.'" did not match subnet.'); return false; } @@ -238,22 +239,19 @@ class Negotiate extends \SimpleSAML\Auth\Source */ protected function sendNegotiate($params) { + $config = \SimpleSAML\Configuration::getInstance(); + $url = htmlspecialchars(\SimpleSAML\Module::getModuleURL('negotiate/backend.php', $params)); $json_url = json_encode($url); header('HTTP/1.1 401 Unauthorized'); header('WWW-Authenticate: Negotiate', false); - echo <<<EOF -<html> - <head> - <script type="text/javascript">window.location = $json_url</script> - <title>Redirect to login</title> - </head> -<body> - <p>Your browser seems to have Javascript disabled. Please click <a href="$url">here</a>.</p> -</body> -</html> -EOF; + + $t = new \SimpleSAML\XHTML\Template($config, 'negotiate:redirect.twig'); + $t->data['baseurlpath'] = \SimpleSAML\Module::getModuleURL('negotiate'); + $t->data['url'] = $url; + $t->data['json_url'] = $json_url; + $t->show(); } @@ -284,7 +282,7 @@ EOF; \SimpleSAML\Auth\State::throwException($state, $e); } // fallBack never returns after loginCompleted() - \SimpleSAML\Logger::debug('Negotiate: backend returned'); + Logger::debug('Negotiate: backend returned'); self::loginCompleted($state); } @@ -311,7 +309,7 @@ EOF; $dn = $this->ldap->searchfordn($this->base, $this->attr, $uid); return $this->ldap->getAttributes($dn, $this->attributes); } catch (\SimpleSAML\Error\Exception $e) { - \SimpleSAML\Logger::debug('Negotiate - ldap lookup failed: '.$e); + Logger::debug('Negotiate - ldap lookup failed: '.$e); return null; } } @@ -327,13 +325,11 @@ EOF; // no admin user return; } - \SimpleSAML\Logger::debug( - 'Negotiate - authenticate(): Binding as system user '.var_export($this->admin_user, true) - ); + Logger::debug('Negotiate - authenticate(): Binding as system user '.var_export($this->admin_user, true)); if (!$this->ldap->bind($this->admin_user, $this->admin_pw)) { $msg = 'Unable to authenticate system user (LDAP_INVALID_CREDENTIALS) '.var_export($this->admin_user, true); - \SimpleSAML\Logger::error('Negotiate - authenticate(): '.$msg); + Logger::error('Negotiate - authenticate(): '.$msg); throw new \SimpleSAML\Error\AuthSource('negotiate', $msg); } } @@ -352,7 +348,7 @@ EOF; assert(is_array($state)); // get the source that was used to authenticate $authId = $state['negotiate:backend']; - \SimpleSAML\Logger::debug('Negotiate - logout has the following authId: "'.$authId.'"'); + Logger::debug('Negotiate - logout has the following authId: "'.$authId.'"'); if ($authId === null) { $session = \SimpleSAML\Session::getSessionFromRequest(); diff --git a/modules/negotiate/templates/redirect.twig b/modules/negotiate/templates/redirect.twig new file mode 100644 index 0000000000000000000000000000000000000000..3a69556eec3127cc60c5dec5ab09fac27d970857 --- /dev/null +++ b/modules/negotiate/templates/redirect.twig @@ -0,0 +1,11 @@ +<!DOCTYPE HTML> +<html lang="en-US"> + <head> + <script src="{{ baseurlpath }}/assets/js/redirect.js"></script> + <title>Redirect to login</title> + </head> + <body> + <p>Your browser seems to have Javascript disabled. Please click <a id="redirect" href="{{ url }}">here</a>.</p> + </body> +</html> + diff --git a/modules/negotiate/www/assets/js/redirect.js b/modules/negotiate/www/assets/js/redirect.js new file mode 100644 index 0000000000000000000000000000000000000000..3b829d111db9ff4fbbb28f36c7ccb8dc87ce0277 --- /dev/null +++ b/modules/negotiate/www/assets/js/redirect.js @@ -0,0 +1,3 @@ +document.addEventListener('DOMContentLoaded', function () { + window.location = document.querySelector('#redirect'); +}); diff --git a/modules/negotiate/www/backend.php b/modules/negotiate/www/backend.php index 07550c9e07337cc1d9cc2aef6bfd5c0aa47f0bdc..8a5222f26dd378995e108b38105ce3fb445615c8 100644 --- a/modules/negotiate/www/backend.php +++ b/modules/negotiate/www/backend.php @@ -8,7 +8,10 @@ * @package SimpleSAMLphp */ -$state = \SimpleSAML\Auth\State::loadState($_REQUEST['AuthState'], \SimpleSAML\Module\negotiate\Auth\Source\Negotiate::STAGEID); +$state = \SimpleSAML\Auth\State::loadState( + $_REQUEST['AuthState'], + \SimpleSAML\Module\negotiate\Auth\Source\Negotiate::STAGEID +); \SimpleSAML\Logger::debug('backend - fallback: '.$state['LogoutState']['negotiate:backend']); \SimpleSAML\Module\negotiate\Auth\Source\Negotiate::fallBack($state); diff --git a/modules/negotiate/www/retry.php b/modules/negotiate/www/retry.php index 390e712e42b339774fe719f29c5c658e2833522b..c4ffd87a52ee21a5553fcb6d5277f5a2066c1bbf 100644 --- a/modules/negotiate/www/retry.php +++ b/modules/negotiate/www/retry.php @@ -8,7 +8,10 @@ * */ -$state = \SimpleSAML\Auth\State::loadState($_REQUEST['AuthState'], \SimpleSAML\Module\negotiate\Auth\Source\Negotiate::STAGEID); +$state = \SimpleSAML\Auth\State::loadState( + $_REQUEST['AuthState'], + \SimpleSAML\Module\negotiate\Auth\Source\Negotiate::STAGEID +); $metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler(); $idpid = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted', 'metaindex'); diff --git a/modules/oauth/config-template/module_oauth.php b/modules/oauth/config-template/module_oauth.php index a99f2acf121553267045dedf33ee739d66f1521a..475acb3e24b900a45ac5a2df07780645facc67f5 100644 --- a/modules/oauth/config-template/module_oauth.php +++ b/modules/oauth/config-template/module_oauth.php @@ -1,7 +1,7 @@ <?php -/* +/* * Configuration for the OAuth module. - * + * */ $config = array( @@ -17,7 +17,7 @@ $config = array( // Tag to run storage cleanup script using the cron module... 'cron_tag' => 'hourly', - // auth is the idp to use for admin authentication, + // auth is the idp to use for admin authentication, // useridattr is the attribute-name that contains the userid as returned from idp 'auth' => 'default-sp', 'useridattr', 'user', diff --git a/modules/oauth/lib/Consumer.php b/modules/oauth/lib/Consumer.php index 634cf63eda6bd278f4174c24ece8330bbef85643..0f7b81bca12e803e3a516acf48d91129201d2498 100644 --- a/modules/oauth/lib/Consumer.php +++ b/modules/oauth/lib/Consumer.php @@ -51,9 +51,9 @@ class Consumer * This static helper function wraps \SimpleSAML\Utils\HTTP::fetch * and throws an exception with diagnostics messages if it appear * to be failing on an OAuth endpoint. - * + * * If the status code is not 200, an exception is thrown. If the content-type - * of the response if text/plain, the content of the response is included in + * of the response if text/plain, the content of the response is included in * the text of the Exception thrown. */ public static function getHTTP($url, $context = '') @@ -74,7 +74,7 @@ class Consumer } throw new \Exception($error.':'.$url); - } + } // Fall back to return response, if could not reckognize HTTP header. Should not happen. return $response; } @@ -111,7 +111,7 @@ class Consumer if ($redirect) { \SimpleSAML\Utils\HTTP::redirectTrustedURL($authorizeURL); exit; - } + } return $authorizeURL; } diff --git a/modules/oauth/lib/OAuthServer.php b/modules/oauth/lib/OAuthServer.php index 5114fff1ff0ddca40b849e6cde55a75a8377c471..b6607e6feb6bfeb4372dd1c50462295f6325821d 100644 --- a/modules/oauth/lib/OAuthServer.php +++ b/modules/oauth/lib/OAuthServer.php @@ -23,4 +23,3 @@ class OAuthServer extends OAuthServer return $this->signature_methods; } } - diff --git a/modules/oauth/lib/OAuthStore.php b/modules/oauth/lib/OAuthStore.php index 5469dab2d3bfa0d114fceddf926ee49ad4666bf2..ee5725cb1276546407f04b9e43d984ccf496cc93 100644 --- a/modules/oauth/lib/OAuthStore.php +++ b/modules/oauth/lib/OAuthStore.php @@ -6,8 +6,8 @@ require_once(dirname(dirname(__FILE__)).'/libextinc/OAuth.php'); /** * OAuth Store - * - * Updated version, works with consumer-callbacks, certificates and 1.0-RevA protocol + * + * Updated version, works with consumer-callbacks, certificates and 1.0-RevA protocol * behaviour (requestToken-callbacks and verifiers) * * @author Andreas Ã…kre Solberg, <andreas.solberg@uninett.no>, UNINETT AS. @@ -22,7 +22,7 @@ class OAuthStore extends \OAuthDataStore private $defaultversion = '1.0'; protected $_store_tables = array( - 'consumers' => 'consumer = array with consumer attributes', + 'consumers' => 'consumer = array with consumer attributes', 'nonce' => 'nonce+consumer_key = -boolean-', 'requesttorequest' => 'requestToken.key = array(version,callback,consumerKey,)', 'authorized' => 'requestToken.key, verifier = array(authenticated-user-attributes)', @@ -153,7 +153,7 @@ class OAuthStore extends \OAuthDataStore { \SimpleSAML\Logger::info('OAuth new_request_token('.$consumer.')'); - $lifetime = $this->config->getValue('requestTokenDuration', 1800); //60*30 + $lifetime = $this->config->getValue('requestTokenDuration', 1800); //60*30 $token = new \OAuthToken(\SimpleSAML\Utils\Random::generateID(), \SimpleSAML\Utils\Random::generateID()); $token->callback = $callback; // OAuth1.0-RevA @@ -161,13 +161,15 @@ class OAuthStore extends \OAuthDataStore // also store in requestToken->key => array('callback'=>CallbackURL, 'version'=>oauth_version $request_attributes = array( - 'callback' => $callback, + 'callback' => $callback, 'version' => ($version ? $version : $this->defaultversion), 'consumerKey' => $consumer->key, ); $this->store->set('requesttorequest', $token->key, '', $request_attributes, $lifetime); - // also store in requestToken->key => Consumer->key (enables consumer-lookup during reqToken-authorization stage) + /* also store in requestToken->key => + * Consumer->key (enables consumer-lookup during reqToken-authorization stage) + */ $this->store->set('requesttoconsumer', $token->key, '', $consumer->key, $lifetime); return $token; @@ -177,7 +179,13 @@ class OAuthStore extends \OAuthDataStore { \SimpleSAML\Logger::info('OAuth new_access_token('.$requestToken.','.$consumer.')'); $accesstoken = new \OAuthToken(\SimpleSAML\Utils\Random::generateID(), \SimpleSAML\Utils\Random::generateID()); - $this->store->set('access', $accesstoken->key, $consumer->key, $accesstoken, $this->config->getValue('accessTokenDuration', 86400)); //60*60*24=86400 + $this->store->set( + 'access', + $accesstoken->key, + $consumer->key, + $accesstoken, + $this->config->getValue('accessTokenDuration', 86400) //60*60*24=86400 + ); return $accesstoken; } diff --git a/modules/oauth/lib/Registry.php b/modules/oauth/lib/Registry.php index aea40cc86af0493e27c0389ced974b84ae71332e..984638b6fb98366ceee50d54f7b62d57812adf49 100644 --- a/modules/oauth/lib/Registry.php +++ b/modules/oauth/lib/Registry.php @@ -15,7 +15,7 @@ class Registry { if (array_key_exists('field_'.$key, $request)) { $entry[$key] = $request['field_'.$key]; - } else if (isset($entry[$key])) { + } elseif (isset($entry[$key])) { unset($entry[$key]); } } @@ -53,7 +53,7 @@ class Registry $this->requireStandardField($request, 'description'); $this->requireStandardField($request, 'key'); } - + protected function header($name) { return '<tr><td> </td><td class="header">'.$name.'</td></tr>'; @@ -124,7 +124,12 @@ class Registry $this->readonlyField($metadata, 'owner', 'Owner'). $this->standardField($metadata, 'key', 'Consumer Key'). $this->readonlyField($metadata, 'secret', 'Consumer Secret<br />(Used for HMAC_SHA1 signatures)'). - $this->standardField($metadata, 'RSAcertificate', 'RSA certificate (PEM)<br />(Used for RSA_SHA1 signatures)', true). + $this->standardField( + $metadata, + 'RSAcertificate', + 'RSA certificate (PEM)<br />(Used for RSA_SHA1 signatures)', + true + ). $this->standardField($metadata, 'callback_url', 'Static/enforcing callback-url'). '</table></div>'. '</div>'. diff --git a/modules/oauth/libextinc/OAuth.php b/modules/oauth/libextinc/OAuth.php index 7ea0d8dfe4fcf0ba74082b707849564ebe885adf..994241b331a6dbd442be0012988f12d4fd7623ce 100644 --- a/modules/oauth/libextinc/OAuth.php +++ b/modules/oauth/libextinc/OAuth.php @@ -316,9 +316,8 @@ class OAuthRequest // It's a POST request of the proper content-type, so parse POST // parameters and add those overriding any duplicates from GET if ($http_method == "POST" - && isset($request_headers['Content-Type']) - && strstr($request_headers['Content-Type'], - 'application/x-www-form-urlencoded') + && isset($request_headers['Content-Type']) + && strstr($request_headers['Content-Type'], 'application/x-www-form-urlencoded') ) { $post_data = OAuthUtil::parse_parameters( file_get_contents(self::$POST_INPUT) @@ -328,13 +327,14 @@ class OAuthRequest // We have a Authorization-header with OAuth data. Parse the header // and add those overriding any duplicates from GET or POST - if (isset($request_headers['Authorization']) && substr($request_headers['Authorization'], 0, 6) == 'OAuth ') { + if (isset($request_headers['Authorization']) + && substr($request_headers['Authorization'], 0, 6) == 'OAuth ' + ) { $header_parameters = OAuthUtil::split_header( $request_headers['Authorization'] ); $parameters = array_merge($parameters, $header_parameters); } - } return new OAuthRequest($http_method, $http_url, $parameters); @@ -577,14 +577,14 @@ class OAuthServer */ public function fetch_request_token(&$request) { - $this->get_version($request); + $this->getVersion($request); - $consumer = $this->get_consumer($request); + $consumer = $this->getConsumer($request); // no token required for the initial token request $token = null; - $this->check_signature($request, $consumer, $token); + $this->checkSignature($request, $consumer, $token); // Rev A change $callback = $request->get_parameter('oauth_callback'); @@ -599,14 +599,14 @@ class OAuthServer */ public function fetch_access_token(&$request) { - $this->get_version($request); + $this->getVersion($request); - $consumer = $this->get_consumer($request); + $consumer = $this->getConsumer($request); // requires authorized request token - $token = $this->get_token($request, $consumer, "request"); + $token = $this->getToken($request, $consumer, "request"); - $this->check_signature($request, $consumer, $token); + $this->checkSignature($request, $consumer, $token); // Rev A change $verifier = $request->get_parameter('oauth_verifier'); @@ -620,10 +620,10 @@ class OAuthServer */ public function verify_request(&$request) { - $this->get_version($request); - $consumer = $this->get_consumer($request); - $token = $this->get_token($request, $consumer, "access"); - $this->check_signature($request, $consumer, $token); + $this->getVersion($request); + $consumer = $this->getConsumer($request); + $token = $this->getToken($request, $consumer, "access"); + $this->checkSignature($request, $consumer, $token); return array($consumer, $token); } @@ -631,7 +631,7 @@ class OAuthServer /** * version 1 */ - private function get_version(&$request) + private function getVersion(&$request) { $version = $request->get_parameter("oauth_version"); if (!$version) { @@ -648,7 +648,7 @@ class OAuthServer /** * figure out the signature with some defaults */ - private function get_signature_method($request) + private function getSignatureMethod($request) { $signature_method = $request instanceof OAuthRequest ? $request->get_parameter("oauth_signature_method") @@ -660,8 +660,7 @@ class OAuthServer throw new OAuthException('No signature method parameter. This parameter is required'); } - if (!in_array($signature_method, - array_keys($this->signature_methods))) { + if (!in_array($signature_method, array_keys($this->signature_methods))) { throw new OAuthException( "Signature method '$signature_method' not supported ". "try one of the following: ". @@ -674,7 +673,7 @@ class OAuthServer /** * try to find the consumer for the provided request's consumer key */ - private function get_consumer($request) + private function getConsumer($request) { $consumer_key = $request instanceof OAuthRequest ? $request->get_parameter("oauth_consumer_key") @@ -695,16 +694,14 @@ class OAuthServer /** * try to find the token for the provided request's token key */ - private function get_token($request, $consumer, $token_type = "access") + private function getToken($request, $consumer, $token_type = "access") { $token_field = $request instanceof OAuthRequest ? $request->get_parameter('oauth_token') : null; if (!empty($token_field)) { - $token = $this->data_store->lookup_token( - $consumer, $token_type, $token_field - ); + $token = $this->data_store->lookup_token($consumer, $token_type, $token_field); if (!$token) { throw new OAuthException('Invalid '.$token_type.' token: '.$token_field); } @@ -718,7 +715,7 @@ class OAuthServer * all-in-one function to check the signature on a request * should guess the signature method appropriately */ - private function check_signature($request, $consumer, $token) + private function checkSignature($request, $consumer, $token) { // this should probably be in a different method $timestamp = $request instanceof OAuthRequest @@ -728,13 +725,13 @@ class OAuthServer ? $request->get_parameter('oauth_nonce') : null; - $this->check_timestamp($timestamp); - $this->check_nonce($consumer, $token, $nonce, $timestamp); + $this->checkTimestamp($timestamp); + $this->checkNonce($consumer, $token, $nonce, $timestamp); - $signature_method = $this->get_signature_method($request); + $signature_method = $this->getSignatureMethod($request); $signature = $request->get_parameter('oauth_signature'); - $valid_sig = $signature_method->check_signature( + $valid_sig = $signature_method->checkSignature( $request, $consumer, $token, @@ -749,7 +746,7 @@ class OAuthServer /** * check that the timestamp is new enough */ - private function check_timestamp($timestamp) + private function checkTimestamp($timestamp) { if (!$timestamp) { throw new OAuthException( @@ -769,7 +766,7 @@ class OAuthServer /** * check that the nonce is not repeated */ - private function check_nonce($consumer, $token, $nonce, $timestamp) + private function checkNonce($consumer, $token, $nonce, $timestamp) { if (!$nonce) { throw new OAuthException( @@ -819,7 +816,6 @@ class OAuthDataStore // is authorized // should also invalidate the request token } - } class OAuthUtil @@ -828,7 +824,7 @@ class OAuthUtil { if (is_array($input)) { return array_map(array('OAuthUtil', 'urlencode_rfc3986'), $input); - } else if (is_scalar($input)) { + } elseif (is_scalar($input)) { return str_replace( '+', ' ', @@ -856,7 +852,11 @@ class OAuthUtil public static function split_header($header, $only_allow_oauth_parameters = true) { $params = array(); - if (preg_match_all('/('.($only_allow_oauth_parameters ? 'oauth_' : '').'[a-z_-]*)=(:?"([^"]*)"|([^,]*))/', $header, $matches)) { + if (preg_match_all( + '/('.($only_allow_oauth_parameters ? 'oauth_' : '').'[a-z_-]*)=(:?"([^"]*)"|([^,]*))/', + $header, + $matches + )) { foreach ($matches[1] as $i => $h) { $params[$h] = OAuthUtil::urldecode_rfc3986(empty($matches[3][$i]) ? $matches[4][$i] : $matches[3][$i]); } diff --git a/modules/oauth/templates/registry.edit.tpl.php b/modules/oauth/templates/registry.edit.tpl.php index 4c97f36f57300b845bbecb62620bff0241371cf9..58a58d0100c456c4e76c26b37de07c80fc334c8c 100644 --- a/modules/oauth/templates/registry.edit.tpl.php +++ b/modules/oauth/templates/registry.edit.tpl.php @@ -1,21 +1,18 @@ <?php $this->data['jquery'] = array('core' => true, 'ui' => true, 'css' => true); -$this->data['head'] = '<link rel="stylesheet" type="text/css" href="/' . $this->data['baseurlpath'] . 'module.php/oauth/resources/style.css" />' . "\n"; -$this->data['head'] .= '<script type="text/javascript"> -$(document).ready(function() { - $("#tabdiv").tabs(); -}); -</script>'; +$this->data['head'] = '<link rel="stylesheet" type="text/css" href="/'. + $this->data['baseurlpath'].'module.php/oauth/assets/css/oauth.css" />'."\n"; +$this->data['head'] .= '<script type="text/javascript" src="/'. + $this->data['baseurlpath'].'module.php/oauth/assets/js/oauth.js"></script>'; $this->includeAtTemplateBase('includes/header.php'); +echo '<h1>OAuth Client</h1>'; -echo('<h1>OAuth Client</h1>'); +echo $this->data['form']; -echo($this->data['form']); - -echo('<p style="float: right"><a href="registry.php">Return to entity listing <strong>without saving...</strong></a></p>'); +echo '<p style="float: right"><a href="registry.php">'. + 'Return to entity listing <strong>without saving...</strong></a></p>'; $this->includeAtTemplateBase('includes/footer.php'); - diff --git a/modules/oauth/templates/registry.edit.twig b/modules/oauth/templates/registry.edit.twig index baa44d4f966634fc952e48ad96ad3b1aa21ee30e..ad9345d731a93a397528e1c6e2c0a05d7dd940f6 100644 --- a/modules/oauth/templates/registry.edit.twig +++ b/modules/oauth/templates/registry.edit.twig @@ -2,21 +2,11 @@ {% extends "base.twig" %} {% block preload %} - <link href="{{ baseurlpath }}resources/style.css" rel="stylesheet" /> + <link href="{{ baseurlpath }}assets/css/oauth.css" rel="stylesheet"> {% endblock %} {% block postload %} -<script type="text/javascript"> - $(document).ready(function() { - $("#tabdiv").tabs(); - $('ul.tabset_tabs li').click( - function() { - $("html, body").animate({ scrollTop: 0 }, "slow"); - } - ) - - }); -</script> + <script src="{{ baseurlpath}}assets/js/oauth.js"></script> {% endblock %} {% block content %} diff --git a/modules/oauth/templates/registry.list.php b/modules/oauth/templates/registry.list.php index e17329e52467e6c5da9271872b6ef5164b7dcab4..bbccab1d9e00a5ed0b440e3144e8230d79cc451a 100644 --- a/modules/oauth/templates/registry.list.php +++ b/modules/oauth/templates/registry.list.php @@ -1,51 +1,47 @@ <?php $this->data['jquery'] = array('core' => true, 'ui' => true, 'css' => true); -$this->data['head'] = '<link rel="stylesheet" type="text/css" href="/'.$this->data['baseurlpath'].'module.php/oauth/resources/style.css" />'."\n"; - +$this->data['head'] = '<link rel="stylesheet" type="text/css" href="/'. + $this->data['baseurlpath'].'module.php/oauth/assets/oauth.css" />'."\n"; $this->includeAtTemplateBase('includes/header.php'); - -echo('<h1>OAuth Client Registry</h1>'); - -echo('<p>Here you can register new OAuth Clients. You are successfully logged in as ' . htmlspecialchars($this->data['userid']) . '</p>'); - -echo('<h2>Your clients</h2>'); -echo('<table class="metalist" style="width: 100%">'); -$i = 0; $rows = array('odd', 'even'); -foreach($this->data['entries']['mine'] AS $entryc ) { - $entry = $entryc['value']; - $i++; - echo('<tr class="' . $rows[$i % 2] . '"> - <td>' . htmlspecialchars($entry['name']) . '</td> - <td><tt>' . htmlspecialchars($entry['key']) . '</tt></td> - <td> - <a href="registry.edit.php?editkey=' . urlencode($entry['key']) . '">edit</a> - <a href="registry.php?delete=' . urlencode($entry['key']) . '">delete</a> - </td></tr>'); +echo '<h1>OAuth Client Registry</h1>'; +echo '<p>Here you can register new OAuth Clients. You are successfully logged in as '. + htmlspecialchars($this->data['userid']).'</p>'; + +echo '<h2>Your clients</h2>'; +echo '<table class="metalist" style="width: 100%">'; +$i = 0; +$rows = array('odd', 'even'); +foreach ($this->data['entries']['mine'] as $entryc) { + $entry = $entryc['value']; + $i++; + echo '<tr class="'.$rows[$i % 2].'"><td>'. + htmlspecialchars($entry['name']).'</td> <td><code>'.htmlspecialchars($entry['key']). + '</code></td><td><a href="registry.edit.php?editkey='.urlencode($entry['key']). + '">edit</a><a href="registry.php?delete='.urlencode($entry['key']).'">delete</a></td></tr>'; } if ($i == 0) { - echo('<tr><td colspan="3">No entries registered</td></tr>'); + echo'<tr><td colspan="3">No entries registered</td></tr>'; } -echo('</table>'); - -echo('<p><a href="registry.edit.php">Add new client</a></p>'); - -echo('<h2>Other clients</h2>'); -echo('<table class="metalist" style="width: 100%">'); -$i = 0; $rows = array('odd', 'even'); -foreach($this->data['entries']['others'] AS $entryc ) { - $entry = $entryc['value']; - $i++; - echo('<tr class="' . $rows[$i % 2] . '"> - <td>' . htmlspecialchars($entry['name']) . '</td> - <td><tt>' . htmlspecialchars($entry['key']) . '</tt></td> - <td>' . (isset($entry['owner']) ? htmlspecialchars($entry['owner']) : 'No owner') . ' - </td></tr>'); +echo '</table>'; + +echo '<p><a href="registry.edit.php">Add new client</a></p>'; + +echo '<h2>Other clients</h2>'; +echo '<table class="metalist" style="width: 100%">'; +$i = 0; +$rows = array('odd', 'even'); +foreach ($this->data['entries']['others'] as $entryc) { + $entry = $entryc['value']; + $i++; + echo '<tr class="'.$rows[$i % 2].'"><td>'. + htmlspecialchars($entry['name']).'</td><td><code>'.htmlspecialchars($entry['key']). + '</code></td><td>'.(isset($entry['owner']) ? htmlspecialchars($entry['owner']) : 'No owner'). + '</td></tr>'; } if ($i == 0) { - echo('<tr><td colspan="3">No entries registered</td></tr>'); + echo '<tr><td colspan="3">No entries registered</td></tr>'; } -echo('</table>'); +echo '</table>'; $this->includeAtTemplateBase('includes/footer.php'); - diff --git a/modules/oauth/templates/registry.list.twig b/modules/oauth/templates/registry.list.twig index e6ec234c6020d7623373ee2dd0de468033250f2a..86bc5a6792a26489a6d52ec13b65538ab764ca82 100644 --- a/modules/oauth/templates/registry.list.twig +++ b/modules/oauth/templates/registry.list.twig @@ -2,7 +2,7 @@ {% extends "base.twig" %} {% block preload %} - <link href="{{ baseurlpath }}style.css" rel="stylesheet" /> + <link href="{{ baseurlpath }}assets/css/oauth.css" rel="stylesheet" /> {% endblock %} {% block content %} @@ -12,7 +12,7 @@ <table class="metalist" style="width: 100%;"> {% for key, entryc in entries.mine %} - {% if loop.index0 % 2 == 0 %} + {% if loop.index0 is even %} {% set class = 'even' %} {% else %} {% set class = 'odd' %} @@ -36,7 +36,7 @@ <table class="metalist" style="width: 100%"> {% for key, entryc in entries.others %} - {% if loop.index0 % 2 == 0 %} + {% if loop.index0 is even %} {% set class = 'even' %} {% else %} {% set class = 'odd' %} diff --git a/modules/oauth/templates/registry.saved.php b/modules/oauth/templates/registry.saved.php index 0ff62eb50fb116c93272588995898d3b371b3299..2e4bd27a92a916384f614e8b55fd058803e9c199 100644 --- a/modules/oauth/templates/registry.saved.php +++ b/modules/oauth/templates/registry.saved.php @@ -1,15 +1,8 @@ <?php - - $this->includeAtTemplateBase('includes/header.php'); - -echo('<h1>OAuth Client saved</h1>'); - -echo('<p><a href="registry.php">Go back to OAuth client listing</a></p>'); - - +echo '<h1>OAuth Client saved</h1>'; +echo '<p><a href="registry.php">Go back to OAuth client listing</a></p>'; $this->includeAtTemplateBase('includes/footer.php'); - diff --git a/modules/oauth/www/resources/style.css b/modules/oauth/www/assets/css/oauth.css similarity index 71% rename from modules/oauth/www/resources/style.css rename to modules/oauth/www/assets/css/oauth.css index 4df7a79504106ad9102dfb88d797561b12f9a55b..7b8ad7e92cb2d9fcf4f6f57ecaf714898bd15fa3 100644 --- a/modules/oauth/www/resources/style.css +++ b/modules/oauth/www/assets/css/oauth.css @@ -1,39 +1,38 @@ table.formtable { - width: 100%; + width: 100%; } table.formtable tr td.name { - text-align: right; - vertical-align: top; - padding-right: .6em; + text-align: right; + vertical-align: top; + padding-right: .6em; } table.formtable tr td.value { - text-align: left; - padding: 0px; + text-align: left; + padding: 0px; } table.formtable tr td.header { - padding-left: 5px; - padding-top: 8px; - font-weight: bold; - font-size: 110%; + padding-left: 5px; + padding-top: 8px; + font-weight: bold; + font-size: 110%; } table.formtable tr td input,table.formtable tr td textarea { - width: 90%; - border: 1px solid #bbb; - margin: 2px 5px; - padding: 2px 4px; + width: 90%; + border: 1px solid #bbb; + margin: 2px 5px; + padding: 2px 4px; } - table.metalist { - border: 1px solid #aaa; - border-collapse: collapse; + border: 1px solid #aaa; + border-collapse: collapse; } table.metalist tr td { - padding: 2px 5px; + padding: 2px 5px; } table.metalist tr.even td { - background: #e5e5e5; + background: #e5e5e5; } @media all { diff --git a/modules/oauth/www/assets/js/oauth.js b/modules/oauth/www/assets/js/oauth.js new file mode 100644 index 0000000000000000000000000000000000000000..442c63effcc4101a5f3ca02b50fb522cb83fd229 --- /dev/null +++ b/modules/oauth/www/assets/js/oauth.js @@ -0,0 +1,3 @@ +document.addEventListener('DOMContentLoaded', function () { + $("#tabdiv").tabs(); +}); diff --git a/modules/oauth/www/getUserInfo.php b/modules/oauth/www/getUserInfo.php index d793ed97345b2131f77f69495fe027c536630d35..ad9f878c8b511be1eaa9c87a1ff7ac15120f7b22 100644 --- a/modules/oauth/www/getUserInfo.php +++ b/modules/oauth/www/getUserInfo.php @@ -5,7 +5,9 @@ require_once(dirname(dirname(__FILE__)).'/libextinc/OAuth.php'); $oauthconfig = \SimpleSAML\Configuration::getConfig('module_oauth.php'); if (!$oauthconfig->getBoolean('getUserInfo.enable', false)) { - throw new \Exception('Get user info endpoint is disabled. This endpoint can be enabled in the module_oauth.php configuration file.'); + throw new \Exception( + 'Get user info endpoint is disabled. This endpoint can be enabled in the module_oauth.php configuration file.' + ); } $store = new \SimpleSAML\Module\oauth\OAuthStore(); diff --git a/modules/oauth/www/registry.edit.php b/modules/oauth/www/registry.edit.php index 053f7737f5096a972c4c2cc8fecd5f08aedb6431..b475e0aa98d0b3bc0c49f0a3a799d150556b9fc1 100644 --- a/modules/oauth/www/registry.edit.php +++ b/modules/oauth/www/registry.edit.php @@ -28,7 +28,9 @@ function requireOwnership($entry, $userid) throw new \Exception('OAuth Consumer has no owner. Which means no one is granted access, not even you.'); } if ($entry['owner'] !== $userid) { - throw new \Exception('OAuth Consumer has an owner that is not equal to your userid, hence you are not granted access.'); + throw new \Exception( + 'OAuth Consumer has an owner that is not equal to your userid, hence you are not granted access.' + ); } } diff --git a/modules/oauth/www/registry.php b/modules/oauth/www/registry.php index 4fbdcd1ed4f75a928eaff29edbd5ae4f5dcee245..9f97762ac5bb30a51119345f0ff8d4d0c83c9f64 100644 --- a/modules/oauth/www/registry.php +++ b/modules/oauth/www/registry.php @@ -1,5 +1,4 @@ <?php - // Load SimpleSAMLphp, configuration and metadata $config = \SimpleSAML\Configuration::getInstance(); $session = \SimpleSAML\Session::getSessionFromRequest(); @@ -28,7 +27,9 @@ function requireOwnership($entry, $userid) throw new \Exception('OAuth Consumer has no owner. Which means no one is granted access, not even you.'); } if ($entry['owner'] !== $userid) { - throw new \Exception('OAuth Consumer has an owner that is not equal to your userid, hence you are not granted access.'); + throw new \Exception( + 'OAuth Consumer has an owner that is not equal to your userid, hence you are not granted access.' + ); } } @@ -47,7 +48,8 @@ if (is_array($list)) { foreach ($list as $listitem) { if (array_key_exists('owner', $listitem['value'])) { if ($listitem['value']['owner'] === $userid) { - $slist['mine'][] = $listitem; continue; + $slist['mine'][] = $listitem; + continue; } } } diff --git a/modules/portal/config-templates/module_portal.php b/modules/portal/config-templates/module_portal.php index e390ce25052b7934265427d374f532bc93b8d612..99cdaf4f959b0c1d9b849d325073e759d0fa14e0 100644 --- a/modules/portal/config-templates/module_portal.php +++ b/modules/portal/config-templates/module_portal.php @@ -1,5 +1,5 @@ <?php -/* +/* * Configuration for the module portal. */ diff --git a/modules/portal/hooks/hook_htmlinject.php b/modules/portal/hooks/hook_htmlinject.php index 699837c0551a77df3b56b810f610d6b63436c454..5fffdf6087a68da043637a6d332ce2c22e506725 100644 --- a/modules/portal/hooks/hook_htmlinject.php +++ b/modules/portal/hooks/hook_htmlinject.php @@ -36,8 +36,8 @@ function portal_hook_htmlinject(&$hookinfo) $hookinfo['jquery']['css'] = true; // Header - $hookinfo['pre'][] = '<div id="portalmenu" class="ui-tabs ui-widget ui-widget-content ui-corner-all">'. - $portal->getMenu($hookinfo['page']). + $hookinfo['pre'][] = '<div id="portalmenu" class="ui-tabs ui-widget ui-widget-content ui-corner-all">'. + $portal->getMenu($hookinfo['page']). '<div id="portalcontent" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'; // Footer diff --git a/modules/portal/lib/Portal.php b/modules/portal/lib/Portal.php index 52d722c112f7f76929b34bf87a903d8e39283b9b..a27bb343da3535e552cae38ce91c10687fc6c7c1 100644 --- a/modules/portal/lib/Portal.php +++ b/modules/portal/lib/Portal.php @@ -49,8 +49,8 @@ class Portal $t = new \SimpleSAML\Locale\Translate($config); $tabset = $this->getTabset($thispage); $logininfo = $this->getLoginInfo($t, $thispage); - $text = ''; - $text .= '<ul class="tabset_tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">'; + $classes = 'tabset_tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all'; + $text = '<ul class="'.$classes.'">'; foreach ($this->pages as $pageid => $page) { if (isset($tabset) && !in_array($pageid, $tabset, true)) { continue; @@ -65,7 +65,7 @@ class Portal if (!isset($page['href'])) { $text .= '<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#">'. $t->t($name).'</a></li>'; - } else if ($pageid === $thispage) { + } elseif ($pageid === $thispage) { $text .= '<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#">'. $t->t($name).'</a></li>'; } else { diff --git a/modules/preprodwarning/templates/warning.php b/modules/preprodwarning/templates/warning.php index 41f2912d875219502a63b366ae7a1ecdfc886ef3..3d09fa9c33334cd53a9dd6d49b669fa50ddc0856 100644 --- a/modules/preprodwarning/templates/warning.php +++ b/modules/preprodwarning/templates/warning.php @@ -20,22 +20,17 @@ $this->data['header'] = $this->t('{preprodwarning:warning:warning_header}'); $this->data['autofocus'] = 'yesbutton'; $this->includeAtTemplateBase('includes/header.php'); - -?> - -<form style="display: inline; margin: 0px; padding: 0px" action="<?php echo htmlspecialchars($this->data['yesTarget']); ?>"> - -<?php - // Embed hidden fields... - foreach ($this->data['yesData'] as $name => $value) { - echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'; - } -?> - <p><?php echo $this->t('{preprodwarning:warning:warning}'); ?></p> - <input type="submit" name="yes" id="yesbutton" value="<?php echo htmlspecialchars($this->t('{preprodwarning:warning:yes}')) ?>" /> - -</form> - -<?php +$yesTarget = htmlspecialchars($this->data['yesTarget']); +$yesWarning = htmlspecialchars($this->t('{preprodwarning:warning:yes}')); +$warning = $this->t('{preprodwarning:warning:warning}'); +echo '<form style="display: inline; margin: 0px; padding: 0px" action="'.$yesTarget.'">'; + +// Embed hidden fields... +foreach ($this->data['yesData'] as $name => $value) { + echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />'; +} +echo '<p>'.$warning.'</p>'; +echo '<input type="submit" name="yes" id="yesbutton" value="'.$yesWarning.'" />'; +echo '</form>'; $this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/preprodwarning/templates/warning.twig b/modules/preprodwarning/templates/warning.twig index 9a86ffb69eab0654e68e8d54dba08e34dfa6e845..838dd072b1d946abb43b16c41846dc1cf7afc13f 100644 --- a/modules/preprodwarning/templates/warning.twig +++ b/modules/preprodwarning/templates/warning.twig @@ -7,11 +7,10 @@ <p>{% trans %}You are now accessing a pre-production system. This authentication setup is for testing and pre-production verification only. If someone sent you a link that pointed you here, and you are not <i>a tester</i> you probably got the wrong link, and should <b>not be here</b>.{% endtrans %}</p><br /> {% for name,value in yesData %} - <input type="hidden" name="{{ name }}" value="{{ value }}" /> + <input type="hidden" name="{{ name }}" value="{{ value }}"> {% endfor %} <p> - <input type="submit" name="yes" class="pure-button pure-button-red" value="{{'Yes, I know I am accessing a pre-production system'|trans}}" /> - + <input type="submit" name="yes" class="pure-button pure-button-red" value="{{'Yes, I know I am accessing a pre-production system'|trans}}" autofocus> </p> </form> diff --git a/modules/radius/lib/Auth/Source/Radius.php b/modules/radius/lib/Auth/Source/Radius.php index c37238e826973f2be3e0c1e674b33730832bb743..4709f3bec50b5fb339cfa3866d0665b5affb36b9 100644 --- a/modules/radius/lib/Auth/Source/Radius.php +++ b/modules/radius/lib/Auth/Source/Radius.php @@ -83,8 +83,10 @@ class Radius extends \SimpleSAML\Module\core\Auth\UserPassBase parent::__construct($info, $config); // Parse configuration. - $config = \SimpleSAML\Configuration::loadFromArray($config, - 'Authentication source '.var_export($this->authId, true)); + $config = \SimpleSAML\Configuration::loadFromArray( + $config, + 'Authentication source '.var_export($this->authId, true) + ); $this->servers = $config->getArray('servers', array()); // For backwards compatibility @@ -102,7 +104,8 @@ class Radius extends \SimpleSAML\Module\core\Auth\UserPassBase $this->retries = $config->getInteger('retries', 3); $this->realm = $config->getString('realm', null); $this->usernameAttribute = $config->getString('username_attribute', null); - $this->nasIdentifier = $config->getString('nas_identifier', + $this->nasIdentifier = $config->getString( + 'nas_identifier', \SimpleSAML\Utils\HTTP::getSelfHost() ); @@ -127,7 +130,7 @@ class Radius extends \SimpleSAML\Module\core\Auth\UserPassBase $radius = radius_auth_open(); - /* Try to add all radius servers, trigger a failure if no one works. */ + // Try to add all radius servers, trigger a failure if no one works $success = false; foreach ($this->servers as $server) { if (!isset($server['port'])) { @@ -135,10 +138,14 @@ class Radius extends \SimpleSAML\Module\core\Auth\UserPassBase } if (!radius_add_server( $radius, - $server['hostname'], $server['port'], $server['secret'], - $this->timeout, $this->retries)) { - \SimpleSAML\Logger::info("Could not add radius server: ". - radius_strerror($radius) + $server['hostname'], + $server['port'], + $server['secret'], + $this->timeout, + $this->retries + )) { + \SimpleSAML\Logger::info( + "Could not add radius server: ".radius_strerror($radius) ); continue; } @@ -149,8 +156,8 @@ class Radius extends \SimpleSAML\Module\core\Auth\UserPassBase } if (!radius_create_request($radius, \RADIUS_ACCESS_REQUEST)) { - throw new \Exception('Error creating radius request: '. - radius_strerror($radius) + throw new \Exception( + 'Error creating radius request: '.radius_strerror($radius) ); } @@ -174,9 +181,9 @@ class Radius extends \SimpleSAML\Module\core\Auth\UserPassBase case \RADIUS_ACCESS_CHALLENGE: throw new \Exception('Radius authentication error: Challenge requested, but not supported.'); default: - throw new \Exception('Error during radius authentication: '. - radius_strerror($radius) - ); + throw new \Exception( + 'Error during radius authentication: '.radius_strerror($radius) + ); } } @@ -198,10 +205,9 @@ class Radius extends \SimpleSAML\Module\core\Auth\UserPassBase // get AAI attribute sets. Contributed by Stefan Winter, (c) RESTENA while ($resa = radius_get_attr($radius)) { - if (!is_array($resa)) { - throw new \Exception('Error getting radius attributes: '. - radius_strerror($radius) + throw new \Exception( + 'Error getting radius attributes: '.radius_strerror($radius) ); } @@ -217,8 +223,8 @@ class Radius extends \SimpleSAML\Module\core\Auth\UserPassBase $resv = radius_get_vendor_attr($resa['data']); if (!is_array($resv)) { - throw new \Exception('Error getting vendor specific attribute: '. - radius_strerror($radius) + throw new \Exception( + 'Error getting vendor specific attribute: '.radius_strerror($radius) ); } diff --git a/modules/riak/hooks/hook_cron.php b/modules/riak/hooks/hook_cron.php index c7bc7e6f17d632af01b5f4c39f17d6508a6035c2..c42d2c313e75b66cb6855a2b353e7033e1ebdff9 100644 --- a/modules/riak/hooks/hook_cron.php +++ b/modules/riak/hooks/hook_cron.php @@ -41,14 +41,14 @@ function riak_hook_cron(&$croninfo) try { $store = new \SimpleSAML\Module\riak\Store\Store(); - $result = $store->bucket->indexSearch('expires', 'int', - 1, time() - 30); + $result = $store->bucket->indexSearch('expires', 'int', 1, time() - 30); foreach ($result as $link) { $link->getBinary()->delete(); } - \SimpleSAML\Logger::info(sprintf("deleted %s riak key%s", - sizeof($result), sizeof($result) == 1 ? '' : 's')); + \SimpleSAML\Logger::info( + sprintf("deleted %s riak key%s", sizeof($result), sizeof($result) == 1 ? '' : 's') + ); } catch (\Exception $e) { $message = 'riak threw exception: '.$e->getMessage(); \SimpleSAML\Logger::warning($message); diff --git a/modules/saml/hooks/hook_metadata_hosted.php b/modules/saml/hooks/hook_metadata_hosted.php index 9090edd9c62c66bfd0dd0d1aada5243d45b827ea..f04ee40cd90bd84f5dc2a0f18e32d02301e1e4e3 100644 --- a/modules/saml/hooks/hook_metadata_hosted.php +++ b/modules/saml/hooks/hook_metadata_hosted.php @@ -20,7 +20,7 @@ function saml_hook_metadata_hosted(&$metadataHosted) $name = $metadata->getValue('OrganizationDisplayName', null); } if ($name === null) { - $name = $source->getAuthID(); + $name = $source->getAuthId(); } $md = array( diff --git a/modules/saml/lib/Auth/Source/SP.php b/modules/saml/lib/Auth/Source/SP.php index 25a70078156e207d741039d470fa2e483470ae6c..58e43744fcae24a9f1a4d907b57ffe388b54f05f 100644 --- a/modules/saml/lib/Auth/Source/SP.php +++ b/modules/saml/lib/Auth/Source/SP.php @@ -247,13 +247,15 @@ class SP extends Source $IDPList = array(); } - $ar->setIDPList(array_unique( - array_merge( - $this->metadata->getArray('IDPList', array()), - $idpMetadata->getArray('IDPList', array() - ), - (array) $IDPList) - )); + $ar->setIDPList( + array_unique( + array_merge( + $this->metadata->getArray('IDPList', array()), + $idpMetadata->getArray('IDPList', array()), + (array) $IDPList + ) + ) + ); if (isset($state['saml:ProxyCount']) && $state['saml:ProxyCount'] !== null) { $ar->setProxyCount($state['saml:ProxyCount']); @@ -284,19 +286,26 @@ class SP extends Source $id = State::saveState($state, 'saml:sp:sso', true); $ar->setId($id); - \SimpleSAML\Logger::debug('Sending SAML 2 AuthnRequest to '. - var_export($idpMetadata->getString('entityid'), true)); + \SimpleSAML\Logger::debug( + 'Sending SAML 2 AuthnRequest to '.var_export($idpMetadata->getString('entityid'), true) + ); // Select appropriate SSO endpoint if ($ar->getProtocolBinding() === \SAML2\Constants::BINDING_HOK_SSO) { - $dst = $idpMetadata->getDefaultEndpoint('SingleSignOnService', array( - \SAML2\Constants::BINDING_HOK_SSO) + $dst = $idpMetadata->getDefaultEndpoint( + 'SingleSignOnService', + array( + \SAML2\Constants::BINDING_HOK_SSO + ) ); } else { - $dst = $idpMetadata->getEndpointPrioritizedByBinding('SingleSignOnService', [ - \SAML2\Constants::BINDING_HTTP_REDIRECT, - \SAML2\Constants::BINDING_HTTP_POST, - ]); + $dst = $idpMetadata->getEndpointPrioritizedByBinding( + 'SingleSignOnService', + [ + \SAML2\Constants::BINDING_HTTP_REDIRECT, + \SAML2\Constants::BINDING_HTTP_POST, + ] + ); } $ar->setDestination($dst['Location']); @@ -539,8 +548,8 @@ class SP extends Source if (isset($state['isPassive']) && (bool) $state['isPassive']) { // passive request, we cannot authenticate the user throw new \SimpleSAML\Module\saml\Error\NoPassive( - \SAML2\Constants::STATUS_REQUESTER, - 'Reauthentication required' + \SAML2\Constants::STATUS_REQUESTER, + 'Reauthentication required' ); } @@ -701,7 +710,7 @@ class SP extends Source assert(array_key_exists('LogoutState', $state)); assert(array_key_exists('saml:logout:Type', $state['LogoutState'])); - $idpMetadata = $this->getIdpMetadata($idp); + $idpMetadata = $this->getIdPMetadata($idp); $spMetadataArray = $this->metadata->toArray(); $idpMetadataArray = $idpMetadata->toArray(); diff --git a/modules/saml/lib/BaseNameIDGenerator.php b/modules/saml/lib/BaseNameIDGenerator.php index 12115dc37dfb5769db9cdbeca9193c47c349f7f7..c5360854e7904bb1ba721eafd5d5937093f0080b 100644 --- a/modules/saml/lib/BaseNameIDGenerator.php +++ b/modules/saml/lib/BaseNameIDGenerator.php @@ -117,5 +117,4 @@ abstract class BaseNameIDGenerator extends \SimpleSAML\Auth\ProcessingFilter $state['saml:NameID'][$this->format] = $nameId; } - } diff --git a/modules/saml/lib/Error.php b/modules/saml/lib/Error.php index b288ef107e8d71cf6c6959452522ab3598270ab5..e45b846ff89c99987927d99907da775750c7a43d 100644 --- a/modules/saml/lib/Error.php +++ b/modules/saml/lib/Error.php @@ -36,8 +36,10 @@ class Error extends \SimpleSAML\Error\Exception * Create a SAML 2 error. * * @param string $status The top-level status code. - * @param string|null $subStatus The second-level status code. Can be NULL, in which case there is no second-level status code. - * @param string|null $statusMessage The status message. Can be NULL, in which case there is no status message. + * @param string|null $subStatus The second-level status code. + * Can be NULL, in which case there is no second-level status code. + * @param string|null $statusMessage The status message. + * Can be NULL, in which case there is no status message. * @param \Exception|null $cause The cause of this exception. Can be NULL. */ public function __construct($status, $subStatus = null, $statusMessage = null, \Exception $cause = null) @@ -116,7 +118,7 @@ class Error extends \SimpleSAML\Error\Exception \SAML2\Constants::STATUS_NO_PASSIVE, $exception->getMessage(), $exception - ); + ); // TODO: remove this branch in 2.0 } elseif ($exception instanceof \SimpleSAML\Error\ProxyCountExceeded) { $e = new self( @@ -131,7 +133,7 @@ class Error extends \SimpleSAML\Error\Exception null, get_class($exception).': '.$exception->getMessage(), $exception - ); + ); } return $e; @@ -163,7 +165,7 @@ class Error extends \SimpleSAML\Error\Exception ); break; } - break; + break; } if ($e === null) { diff --git a/modules/saml/lib/IdP/SAML1.php b/modules/saml/lib/IdP/SAML1.php index a6d8ce0ed4b075b57fe443ee50d6b4d3e6e188b3..15c3e56ba049f7d3f64a8766585656289ab27d6b 100644 --- a/modules/saml/lib/IdP/SAML1.php +++ b/modules/saml/lib/IdP/SAML1.php @@ -27,8 +27,10 @@ class SAML1 $spMetadata = $state["SPMetadata"]; $spEntityId = $spMetadata['entityid']; - $spMetadata = \SimpleSAML\Configuration::loadFromArray($spMetadata, - '$metadata['.var_export($spEntityId, true).']'); + $spMetadata = \SimpleSAML\Configuration::loadFromArray( + $spMetadata, + '$metadata['.var_export($spEntityId, true).']' + ); \SimpleSAML\Logger::info('Sending SAML 1.1 Response to '.var_export($spEntityId, true)); @@ -96,7 +98,9 @@ class SAML1 $target = null; } - \SimpleSAML\Logger::info('Shib1.3 - IdP.SSOService: Got incoming Shib authnRequest from '.var_export($spEntityId, true).'.'); + \SimpleSAML\Logger::info( + 'Shib1.3 - IdP.SSOService: Got incoming Shib authnRequest from '.var_export($spEntityId, true).'.' + ); $metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler(); $spMetadata = $metadata->getMetaDataConfig($spEntityId, 'shib13-sp-remote'); @@ -113,18 +117,23 @@ class SAML1 break; } if (!$found) { - throw new \Exception('Invalid AssertionConsumerService for SP '. - var_export($spEntityId, true).': '.var_export($shire, true)); + throw new \Exception( + 'Invalid AssertionConsumerService for SP '.var_export($spEntityId, true).': '.var_export($shire, true) + ); } - \SimpleSAML\Stats::log('saml:idp:AuthnRequest', array( - 'spEntityID' => $spEntityId, - 'protocol' => 'saml1', - )); + \SimpleSAML\Stats::log( + 'saml:idp:AuthnRequest', + array( + 'spEntityID' => $spEntityId, + 'protocol' => 'saml1', + ) + ); $sessionLostURL = HTTP::addURLParameters( HTTP::getSelfURL(), - array('cookieTime' => time())); + array('cookieTime' => time()) + ); $state = array( 'Responder' => array('\SimpleSAML\Module\saml\IdP\SAML1', 'sendResponse'), diff --git a/modules/saml/lib/IdP/SAML2.php b/modules/saml/lib/IdP/SAML2.php index d4a02d5ff06afd677233a061a9e97788fdb2ae7f..5309d081ef8b762973b47373bee5397ac45bcb43 100644 --- a/modules/saml/lib/IdP/SAML2.php +++ b/modules/saml/lib/IdP/SAML2.php @@ -414,9 +414,12 @@ class SAML2 ); $state = array( - 'Responder' => array('\SimpleSAML\Module\saml\IdP\SAML2', 'sendResponse'), - \SimpleSAML\Auth\State::EXCEPTION_HANDLER_FUNC => array('\SimpleSAML\Module\saml\IdP\SAML2', 'handleAuthError'), - \SimpleSAML\Auth\State::RESTART => $sessionLostURL, + 'Responder' => array('\SimpleSAML\Module\saml\IdP\SAML2', 'sendResponse'), + \SimpleSAML\Auth\State::EXCEPTION_HANDLER_FUNC => array( + '\SimpleSAML\Module\saml\IdP\SAML2', + 'handleAuthError' + ), + \SimpleSAML\Auth\State::RESTART => $sessionLostURL, 'SPMetadata' => $spMetadata->toArray(), 'saml:RelayState' => $relayState, @@ -897,6 +900,8 @@ class SAML2 if (isset($state['saml:AuthnContextClassRef'])) { $a->setAuthnContextClassRef($state['saml:AuthnContextClassRef']); + } elseif (\SimpleSAML\Utils\HTTP::isHTTPS()) { + $a->setAuthnContextClassRef(\SAML2\Constants::AC_PASSWORD_PROTECTED_TRANSPORT); } else { $a->setAuthnContextClassRef(\SAML2\Constants::AC_PASSWORD); } diff --git a/modules/saml/lib/IdP/SQLNameID.php b/modules/saml/lib/IdP/SQLNameID.php index f07ff36e2ff644f25cd969f4138fbe563f72b239..0df0a9607bef6c5c9d2c87734d4e7c30774001ce 100644 --- a/modules/saml/lib/IdP/SQLNameID.php +++ b/modules/saml/lib/IdP/SQLNameID.php @@ -30,7 +30,8 @@ class SQLNameID )'; $store->pdo->exec($query); - $query = 'CREATE INDEX '.$store->prefix.'_saml_PersistentNameID_idp_sp ON '.$store->prefix.'_saml_PersistentNameID (_idp, _sp)'; + $query = 'CREATE INDEX '.$store->prefix.'_saml_PersistentNameID_idp_sp ON '; + $query .= $store->prefix.'_saml_PersistentNameID (_idp, _sp)'; $store->pdo->exec($query); $store->setTableVersion('saml_PersistentNameID', 1); @@ -48,7 +49,9 @@ class SQLNameID { $store = \SimpleSAML\Store::getInstance(); if (!($store instanceof \SimpleSAML\Store\SQL)) { - throw new \SimpleSAML\Error\Exception('SQL NameID store requires SimpleSAMLphp to be configured with a SQL datastore.'); + throw new \SimpleSAML\Error\Exception( + 'SQL NameID store requires SimpleSAMLphp to be configured with a SQL datastore.' + ); } self::createTable($store); @@ -82,7 +85,8 @@ class SQLNameID '_value' => $value, ); - $query = 'INSERT INTO '.$store->prefix.'_saml_PersistentNameID (_idp, _sp, _user, _value) VALUES(:_idp, :_sp, :_user, :_value)'; + $query = 'INSERT INTO '.$store->prefix; + $query .= '_saml_PersistentNameID (_idp, _sp, _user, _value) VALUES(:_idp, :_sp, :_user, :_value)'; $query = $store->pdo->prepare($query); $query->execute($params); } @@ -110,7 +114,8 @@ class SQLNameID '_user' => $user, ); - $query = 'SELECT _value FROM '.$store->prefix.'_saml_PersistentNameID WHERE _idp = :_idp AND _sp = :_sp AND _user = :_user'; + $query = 'SELECT _value FROM '.$store->prefix; + $query .= '_saml_PersistentNameID WHERE _idp = :_idp AND _sp = :_sp AND _user = :_user'; $query = $store->pdo->prepare($query); $query->execute($params); @@ -145,7 +150,8 @@ class SQLNameID '_user' => $user, ); - $query = 'DELETE FROM '.$store->prefix.'_saml_PersistentNameID WHERE _idp = :_idp AND _sp = :_sp AND _user = :_user'; + $query = 'DELETE FROM '.$store->prefix; + $query .= '_saml_PersistentNameID WHERE _idp = :_idp AND _sp = :_sp AND _user = :_user'; $query = $store->pdo->prepare($query); $query->execute($params); } @@ -170,7 +176,8 @@ class SQLNameID '_sp' => $spEntityId, ); - $query = 'SELECT _user, _value FROM '.$store->prefix.'_saml_PersistentNameID WHERE _idp = :_idp AND _sp = :_sp'; + $query = 'SELECT _user, _value FROM '.$store->prefix; + $query .= '_saml_PersistentNameID WHERE _idp = :_idp AND _sp = :_sp'; $query = $store->pdo->prepare($query); $query->execute($params); diff --git a/modules/saml/lib/SP/LogoutStore.php b/modules/saml/lib/SP/LogoutStore.php index b3db87991abdd11fb712c6bcc843c8c91b29f148..641c246048a16ce5230f518a4032be01beaa3c4a 100644 --- a/modules/saml/lib/SP/LogoutStore.php +++ b/modules/saml/lib/SP/LogoutStore.php @@ -25,10 +25,12 @@ class LogoutStore switch ($store->driver) { case 'pgsql': // This does not affect the NOT NULL constraint - $query = 'ALTER TABLE '.$store->prefix.'_saml_LogoutStore ALTER COLUMN _authSource TYPE VARCHAR(255)'; + $query = 'ALTER TABLE '.$store->prefix. + '_saml_LogoutStore ALTER COLUMN _authSource TYPE VARCHAR(255)'; break; default: - $query = 'ALTER TABLE '.$store->prefix.'_saml_LogoutStore MODIFY _authSource VARCHAR(255) NOT NULL'; + $query = 'ALTER TABLE '.$store->prefix. + '_saml_LogoutStore MODIFY _authSource VARCHAR(255) NOT NULL'; break; } @@ -52,10 +54,12 @@ class LogoutStore )'; $store->pdo->exec($query); - $query = 'CREATE INDEX '.$store->prefix.'_saml_LogoutStore_expire ON '.$store->prefix.'_saml_LogoutStore (_expire)'; + $query = 'CREATE INDEX '.$store->prefix.'_saml_LogoutStore_expire ON '; + $query .= $store->prefix.'_saml_LogoutStore (_expire)'; $store->pdo->exec($query); - $query = 'CREATE INDEX '.$store->prefix.'_saml_LogoutStore_nameId ON '.$store->prefix.'_saml_LogoutStore (_authSource, _nameId)'; + $query = 'CREATE INDEX '.$store->prefix.'_saml_LogoutStore_nameId ON '; + $query .= $store->prefix.'_saml_LogoutStore (_authSource, _nameId)'; $store->pdo->exec($query); $store->setTableVersion('saml_LogoutStore', 2); @@ -87,8 +91,14 @@ class LogoutStore * @param string $nameId The hash of the users NameID. * @param string $sessionIndex The SessionIndex of the user. */ - private static function addSessionSQL(\SimpleSAML\Store\SQL $store, $authId, $nameId, $sessionIndex, $expire, $sessionId) - { + private static function addSessionSQL( + \SimpleSAML\Store\SQL $store, + $authId, + $nameId, + $sessionIndex, + $expire, + $sessionId + ) { assert(is_string($authId)); assert(is_string($nameId)); assert(is_string($sessionIndex)); @@ -108,7 +118,11 @@ class LogoutStore '_expire' => gmdate('Y-m-d H:i:s', $expire), '_sessionId' => $sessionId, ); - $store->insertOrUpdate($store->prefix.'_saml_LogoutStore', array('_authSource', '_nameId', '_sessionIndex'), $data); + $store->insertOrUpdate( + $store->prefix.'_saml_LogoutStore', + array('_authSource', '_nameId', '_sessionIndex'), + $data + ); } @@ -134,8 +148,8 @@ class LogoutStore ); // We request the columns in lowercase in order to be compatible with PostgreSQL - $query = 'SELECT _sessionIndex AS _sessionindex, _sessionId AS _sessionid FROM '.$store->prefix.'_saml_LogoutStore'. - ' WHERE _authSource = :_authSource AND _nameId = :_nameId AND _expire >= :now'; + $query = 'SELECT _sessionIndex AS _sessionindex, _sessionId AS _sessionid FROM '.$store->prefix; + $query .= '_saml_LogoutStore'.' WHERE _authSource = :_authSource AND _nameId = :_nameId AND _expire >= :now'; $query = $store->pdo->prepare($query); $query->execute($params); @@ -267,7 +281,9 @@ class LogoutStore $sessionIndex = sha1($sessionIndex); } } - unset($sessionIndex); // Remove reference + + // Remove reference + unset($sessionIndex); if ($store instanceof \SimpleSAML\Store\SQL) { $sessions = self::getSessionsSQL($store, $authId, $strNameId); @@ -277,7 +293,6 @@ class LogoutStore } else { /** @var \SimpleSAML\Store $sessions At this point the store cannot be false */ $sessions = self::getSessionsStore($store, $authId, $strNameId, $sessionIndexes); - } if (empty($sessionIndexes)) { @@ -300,11 +315,15 @@ class LogoutStore } if (!$session->isValid($authId)) { - \SimpleSAML\Logger::info('saml.LogoutStore: Skipping logout of session because it isn\'t authenticated.'); + \SimpleSAML\Logger::info( + 'saml.LogoutStore: Skipping logout of session because it isn\'t authenticated.' + ); continue; } - \SimpleSAML\Logger::info('saml.LogoutStore: Logging out of session with trackId ['.$session->getTrackID().'].'); + \SimpleSAML\Logger::info( + 'saml.LogoutStore: Logging out of session with trackId ['.$session->getTrackID().'].' + ); $session->doLogout($authId); $numLoggedOut += 1; } diff --git a/modules/saml/www/sp/metadata.php b/modules/saml/www/sp/metadata.php index 7ed92b3c32c02401c7dcdbc7ae81e46f4985aac6..abc9140928310dd9770d68cc0f61734cde2a7bdc 100644 --- a/modules/saml/www/sp/metadata.php +++ b/modules/saml/www/sp/metadata.php @@ -15,8 +15,10 @@ if ($source === null) { } if (!($source instanceof \SimpleSAML\Module\saml\Auth\Source\SP)) { - throw new \SimpleSAML\Error\AuthSource($sourceId, - 'The authentication source is not a SAML Service Provider.'); + throw new \SimpleSAML\Error\AuthSource( + $sourceId, + 'The authentication source is not a SAML Service Provider.' + ); } $entityId = $source->getEntityId(); @@ -61,7 +63,6 @@ $index = 0; $eps = array(); $supported_protocols = array(); foreach ($assertionsconsumerservices as $services) { - $acsArray = array('index' => $index); switch ($services) { case 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST': @@ -260,7 +261,6 @@ if (isset($metaArray20['attributes']) && is_array($metaArray20['attributes'])) { $xml = \SimpleSAML\Metadata\Signer::sign($xml, $spconfig->toArray(), 'SAML 2 SP'); if (array_key_exists('output', $_REQUEST) && $_REQUEST['output'] == 'xhtml') { - $t = new \SimpleSAML\XHTML\Template($config, 'metadata.php', 'admin'); $t->data['clipboard.js'] = true; diff --git a/modules/saml/www/sp/saml1-acs.php b/modules/saml/www/sp/saml1-acs.php index c6be5c70149998fefed8fd312a71d14ed3d9f21a..66392f4ce3e07820d59899640cab0bbdb1ce4819 100644 --- a/modules/saml/www/sp/saml1-acs.php +++ b/modules/saml/www/sp/saml1-acs.php @@ -37,10 +37,12 @@ if (preg_match('@^https?://@i', $target)) { } else { $state = \SimpleSAML\Auth\State::loadState($_REQUEST['TARGET'], 'saml:sp:sso'); - // Check that the authentication source is correct. + // Check that the authentication source is correct assert(array_key_exists('saml:sp:AuthId', $state)); if ($state['saml:sp:AuthId'] !== $sourceId) { - throw new \SimpleSAML\Error\Exception('The authentication source id in the URL does not match the authentication source which sent the request.'); + throw new \SimpleSAML\Error\Exception( + 'The authentication source id in the URL does not match the authentication source which sent the request.' + ); } assert(isset($state['saml:idp'])); @@ -50,8 +52,10 @@ $spMetadata = $source->getMetadata(); if (array_key_exists('SAMLart', $_REQUEST)) { if (!isset($state['saml:idp'])) { - /* Unsolicited response. */ - throw new \SimpleSAML\Error\Exception('IdP initiated authentication not supported with the SAML 1.1 SAMLart protocol.'); + // Unsolicited response + throw new \SimpleSAML\Error\Exception( + 'IdP initiated authentication not supported with the SAML 1.1 SAMLart protocol.' + ); } $idpMetadata = $source->getIdPMetadata($state['saml:idp']); diff --git a/modules/saml/www/sp/saml2-acs.php b/modules/saml/www/sp/saml2-acs.php index 859c287832028318b9bd94b090ddd7f4fcb2acc1..75504252d5eeace1967ea6855b5479a46c74a728 100644 --- a/modules/saml/www/sp/saml2-acs.php +++ b/modules/saml/www/sp/saml2-acs.php @@ -143,7 +143,6 @@ $expire = null; $attributes = array(); $foundAuthnStatement = false; foreach ($assertions as $assertion) { - // check for duplicate assertion (replay attack) $store = \SimpleSAML\Store::getInstance(); if ($store !== false) { diff --git a/modules/saml/www/sp/saml2-logout.php b/modules/saml/www/sp/saml2-logout.php index 8b9cc250f93412fe13dff9583d1197256eb43a5c..710966efdb5b53980cb8d8c718b4a561c375516e 100644 --- a/modules/saml/www/sp/saml2-logout.php +++ b/modules/saml/www/sp/saml2-logout.php @@ -54,7 +54,6 @@ if ($destination !== null && $destination !== \SimpleSAML\Utils\HTTP::getSelfURL } if ($message instanceof \SAML2\LogoutResponse) { - $relayState = $message->getRelayState(); if ($relayState === null) { // Somehow, our RelayState has been lost. @@ -62,15 +61,15 @@ if ($message instanceof \SAML2\LogoutResponse) { } if (!$message->isSuccess()) { - \SimpleSAML\Logger::warning('Unsuccessful logout. Status was: '.\SimpleSAML\Module\saml\Message::getResponseError($message)); + \SimpleSAML\Logger::warning( + 'Unsuccessful logout. Status was: '.\SimpleSAML\Module\saml\Message::getResponseError($message) + ); } $state = \SimpleSAML\Auth\State::loadState($relayState, 'saml:slosent'); $state['saml:sp:LogoutStatus'] = $message->getStatus(); \SimpleSAML\Auth\Source::completeLogout($state); - } elseif ($message instanceof \SAML2\LogoutRequest) { - \SimpleSAML\Logger::debug('module/saml2/sp/logout: Request from '.$idpEntityId); \SimpleSAML\Logger::stats('saml20-idp-SLO idpinit '.$spEntityId.' '.$idpEntityId); @@ -119,9 +118,12 @@ if ($message instanceof \SAML2\LogoutResponse) { \SimpleSAML\Logger::warning('Logged out of '.$numLoggedOut.' of '.count($sessionIndexes).' sessions.'); } - $dst = $idpMetadata->getEndpointPrioritizedByBinding('SingleLogoutService', array( - \SAML2\Constants::BINDING_HTTP_REDIRECT, - \SAML2\Constants::BINDING_HTTP_POST) + $dst = $idpMetadata->getEndpointPrioritizedByBinding( + 'SingleLogoutService', + array( + \SAML2\Constants::BINDING_HTTP_REDIRECT, + \SAML2\Constants::BINDING_HTTP_POST + ) ); if (!$binding instanceof \SAML2\SOAP) { diff --git a/modules/sanitycheck/config-templates/config-sanitycheck.php b/modules/sanitycheck/config-templates/config-sanitycheck.php index 7ba3199e33d86cfbe33551e06ad7713de1b3b053..543ebbba9c4c284bca626fc710f08d87b212a7d9 100644 --- a/modules/sanitycheck/config-templates/config-sanitycheck.php +++ b/modules/sanitycheck/config-templates/config-sanitycheck.php @@ -1,5 +1,5 @@ <?php -/* +/* * The configuration of SimpleSAMLphp sanitycheck package */ diff --git a/modules/sanitycheck/hooks/hook_cron.php b/modules/sanitycheck/hooks/hook_cron.php index ae85a1a208d665098b62ce46e6d626649b35cf65..dcea2adefae82eb67b63a257157606b631f0dbb9 100644 --- a/modules/sanitycheck/hooks/hook_cron.php +++ b/modules/sanitycheck/hooks/hook_cron.php @@ -35,7 +35,6 @@ function sanitycheck_hook_cron(&$croninfo) $croninfo['summary'][] = 'Sanitycheck error: '.$err; } } - } catch (Exception $e) { $croninfo['summary'][] = 'Error executing sanity check: '.$e->getMessage(); } diff --git a/modules/sanitycheck/templates/check.tpl.php b/modules/sanitycheck/templates/check.tpl.php index cf34bff6121205914565cc434813e7973b006db3..ba9f69ada602d490a9f01bf6593e81a123f02800 100644 --- a/modules/sanitycheck/templates/check.tpl.php +++ b/modules/sanitycheck/templates/check.tpl.php @@ -2,44 +2,28 @@ $this->data['header'] = 'Sanity check'; $this->includeAtTemplateBase('includes/header.php'); -?> - -<h2><?php echo($this->data['header']); ?></h2> - -<?php +echo '<h2>'.$this->data['header'].'</h2>'; if (count($this->data['errors']) > 0) { -?> -<div style="border: 1px solid #800; background: #caa; margin: 1em; padding: .5em"> -<p><?php echo '<img class="float-r" src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/delete.png" alt="Failed" />'; ?> -These checks failed:</p> -<?php - - echo '<ul>'; - foreach ($this->data['errors'] AS $err) { - echo '<li>' . $err . '</li>'; - } - echo '</ul>'; - -echo '</div>'; + echo '<div style="border: 1px solid #800; background: #caa; margin: 1em; padding: .5em">'; + echo '<p><img class="float-r" src="/'.$this->data['baseurlpath']. + 'resources/icons/silk/delete.png" alt="Failed" />These checks failed:</p>'; + echo '<ul>'; + foreach ($this->data['errors'] as $err) { + echo '<li>'.$err.'</li>'; + } } ?> - + </ul> +</div> <?php if (count($this->data['info']) > 0) { -?> -<div style="border: 1px solid #ccc; background: #eee; margin: 1em; padding: .5em"> -<p><?php echo '<img class="float-r" src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/accept.png" alt="OK" />'; ?> -These checks succeeded:</p> -<?php - echo '<ul>'; - foreach ($this->data['info'] AS $i) { - echo '<li>' . $i . '</li>'; - } - echo '</ul>'; - - -echo '</div>'; + echo '<div style="border: 1px solid #ccc; background: #eee; margin: 1em; padding: .5em">'; + echo '<p><img class="float-r" src="/'.$this->data['baseurlpath']. + 'resources/icons/silk/accept.png" alt="OK" />These checks succeeded:</p>'; + echo '<ul>'; + foreach ($this->data['info'] as $i) { + echo '<li>'.$i.'</li>'; + } } -?> - -<?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file +echo '</ul></div>'; +$this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/sanitycheck/www/index.php b/modules/sanitycheck/www/index.php index d7302529e7d3aa9437c2e13a7949f13e2f696e4e..ccfd7daecd514b6e5aff555aec99f92ecd4fdded 100644 --- a/modules/sanitycheck/www/index.php +++ b/modules/sanitycheck/www/index.php @@ -11,7 +11,6 @@ $hookinfo = array( \SimpleSAML\Module::callHooks('sanitycheck', $hookinfo); if (isset($_REQUEST['output']) && $_REQUEST['output'] == 'text') { - if (count($errors) === 0) { echo 'OK'; } else { diff --git a/modules/smartattributes/lib/Auth/Process/SmartID.php b/modules/smartattributes/lib/Auth/Process/SmartID.php index 4a23cf7c6159edb7dc2bbbd8e2a05246c5bbfffc..d2aebb452c0c4039d2d2e2751f49392395cb50b5 100644 --- a/modules/smartattributes/lib/Auth/Process/SmartID.php +++ b/modules/smartattributes/lib/Auth/Process/SmartID.php @@ -11,7 +11,7 @@ class SmartID extends \SimpleSAML\Auth\ProcessingFilter * etc., be sure to comment out the entries that map xxx_targetedID to * eduPersonTargetedID, or there will be no way to see its origin any more. */ - private $_candidates = array( + private $candidates = array( 'eduPersonTargetedID', 'eduPersonPrincipalName', 'pairwise-id', @@ -26,18 +26,18 @@ class SmartID extends \SimpleSAML\Auth\ProcessingFilter /** * The name of the generated ID attribute. */ - private $_id_attribute = 'smart_id'; + private $id_attribute = 'smart_id'; /** * Whether to append the AuthenticatingAuthority, separated by '!' * This only works when SSP is used as a gateway. */ - private $_add_authority = true; + private $add_authority = true; /** * Whether to prepend the CandidateID, separated by ':' */ - private $_add_candidate = true; + private $add_candidate = true; /** * Attributes which should be added/appended. @@ -54,29 +54,29 @@ class SmartID extends \SimpleSAML\Auth\ProcessingFilter assert(is_array($config)); if (array_key_exists('candidates', $config)) { - $this->_candidates = $config['candidates']; - if (!is_array($this->_candidates)) { + $this->candidates = $config['candidates']; + if (!is_array($this->candidates)) { throw new \Exception('SmartID authproc configuration error: \'candidates\' should be an array.'); } } if (array_key_exists('id_attribute', $config)) { - $this->_id_attribute = $config['id_attribute']; - if (!is_string($this->_id_attribute)) { + $this->id_attribute = $config['id_attribute']; + if (!is_string($this->id_attribute)) { throw new \Exception('SmartID authproc configuration error: \'id_attribute\' should be a string.'); } } if (array_key_exists('add_authority', $config)) { - $this->_add_authority = $config['add_authority']; - if (!is_bool($this->_add_authority)) { + $this->add_authority = $config['add_authority']; + if (!is_bool($this->add_authority)) { throw new \Exception('SmartID authproc configuration error: \'add_authority\' should be a boolean.'); } } if (array_key_exists('add_candidate', $config)) { - $this->_add_candidate = $config['add_candidate']; - if (!is_bool($this->_add_candidate)) { + $this->add_candidate = $config['add_candidate']; + if (!is_bool($this->add_candidate)) { throw new \Exception('SmartID authproc configuration error: \'add_candidate\' should be a boolean.'); } } @@ -85,12 +85,13 @@ class SmartID extends \SimpleSAML\Auth\ProcessingFilter private function addID($attributes, $request) { $state = $request['saml:sp:State']; - foreach ($this->_candidates as $idCandidate) { + foreach ($this->candidates as $idCandidate) { if (isset($attributes[$idCandidate][0])) { - if (($this->_add_authority) && (isset($state['saml:AuthenticatingAuthority'][0]))) { - return ($this->_add_candidate ? $idCandidate.':' : '').$attributes[$idCandidate][0].'!'.$state['saml:AuthenticatingAuthority'][0]; + if (($this->add_authority) && (isset($state['saml:AuthenticatingAuthority'][0]))) { + return ($this->add_candidate ? $idCandidate.':' : '').$attributes[$idCandidate][0].'!'. + $state['saml:AuthenticatingAuthority'][0]; } else { - return ($this->_add_candidate ? $idCandidate.':' : '').$attributes[$idCandidate][0]; + return ($this->add_candidate ? $idCandidate.':' : '').$attributes[$idCandidate][0]; } } } @@ -98,7 +99,7 @@ class SmartID extends \SimpleSAML\Auth\ProcessingFilter * At this stage no usable id_candidate has been detected. */ throw new \SimpleSAML\Error\Exception('This service needs at least one of the following - attributes to identity users: '.implode(', ', $this->_candidates).'. Unfortunately not + attributes to identity users: '.implode(', ', $this->candidates).'. Unfortunately not one of them was detected. Please ask your institution administrator to release one of them, or try using another identity provider.'); } @@ -118,7 +119,7 @@ class SmartID extends \SimpleSAML\Auth\ProcessingFilter $id = $this->addID($request['Attributes'], $request); if (isset($id)) { - $request['Attributes'][$this->_id_attribute] = array($id); + $request['Attributes'][$this->id_attribute] = array($id); } } } diff --git a/modules/smartattributes/lib/Auth/Process/SmartName.php b/modules/smartattributes/lib/Auth/Process/SmartName.php index 388ffe5c35e6503c1a1632dad3e1a2798d216e7c..4ed5af03638a745bf18ff6d8f1be44618e84aa64 100644 --- a/modules/smartattributes/lib/Auth/Process/SmartName.php +++ b/modules/smartattributes/lib/Auth/Process/SmartName.php @@ -52,7 +52,7 @@ class SmartName extends \SimpleSAML\Auth\ProcessingFilter if (isset($localname)) { return $localname; } - } + } return null; } diff --git a/modules/sqlauth/lib/Auth/Source/SQL.php b/modules/sqlauth/lib/Auth/Source/SQL.php index f968dbc9c695d8be002de780289314e9d8a9e791..2ec835f9ad1129f6ba5e7c2ad5da877ec104d62a 100644 --- a/modules/sqlauth/lib/Auth/Source/SQL.php +++ b/modules/sqlauth/lib/Auth/Source/SQL.php @@ -172,7 +172,6 @@ class SQL extends \SimpleSAML\Module\core\Auth\UserPassBase $attributes = array(); foreach ($data as $row) { foreach ($row as $name => $value) { - if ($value === null) { continue; } diff --git a/modules/statistics/bin/loganalyzer.php b/modules/statistics/bin/loganalyzer.php index 52f5842ea907791a23fb8be53b27e59209b20613..0f0f7bfbf64d2b3e101580181b4791592be2c917 100755 --- a/modules/statistics/bin/loganalyzer.php +++ b/modules/statistics/bin/loganalyzer.php @@ -85,6 +85,4 @@ Options: -d, --debug Used when configuring the log file syntax. See doc. --dry-run Aggregate but do not store the results. END; - } - diff --git a/modules/statistics/bin/logcleaner.php b/modules/statistics/bin/logcleaner.php index 071318124d4b9fc002bbdb5a09445361973d20bb..440780d02230ca0bf7ed3a79b942a127b966d722 100755 --- a/modules/statistics/bin/logcleaner.php +++ b/modules/statistics/bin/logcleaner.php @@ -90,4 +90,3 @@ Options: END; } - diff --git a/modules/statistics/config-templates/module_statistics.php b/modules/statistics/config-templates/module_statistics.php index 16a21cdd187033b0c131f6f9edfdfd621a00b884..eb582159f855e95967911ea68caf0cd852744b98 100644 --- a/modules/statistics/config-templates/module_statistics.php +++ b/modules/statistics/config-templates/module_statistics.php @@ -1,5 +1,5 @@ <?php -/* +/* * The configuration of SimpleSAMLphp statistics package */ @@ -24,19 +24,19 @@ $config = array( 'statdir' => '/tmp/stats/', 'inputfile' => '/var/log/simplesamlphp.stat', 'offset' => 60 * 60 * 2 + 60 * 60 * 24 * 3, // Two hours offset to match epoch and norwegian winter time. - + 'datestart' => 1, 'datelength' => 15, 'offsetspan' => 21, - + // Dimensions on graph from Google Charts in pixels... 'dimension.x' => 800, 'dimension.y' => 350, - + /* * Do you want to generate statistics using the cron module? If so, specify which cron tag to use. * Examples: daily, weekly - * To not run statistics in cron, set value to + * To not run statistics in cron, set value to * 'cron_tag' => null, */ 'cron_tag' => 'daily', @@ -48,31 +48,31 @@ $config = array( * CGI timeout function. Both default to 300 seconds. */ 'time_limit' => 300, - + 'timeres' => array( 'day' => array( 'name' => 'Day', 'slot' => 60 * 15, // Slots of 15 minutes 'fileslot' => 60 * 60 * 24, // One day (24 hours) file slots - 'axislabelint' => 6 * 4, // Number of slots per label. 4 per hour *6 = 6 hours - 'dateformat-period' => 'j. M', // 4. Mars - 'dateformat-intra' => 'j. M H:i', // 4. Mars 12:30 + 'axislabelint' => 6 * 4, // Number of slots per label. 4 per hour *6 = 6 hours + 'dateformat-period' => 'j. M', // 4. Mars + 'dateformat-intra' => 'j. M H:i', // 4. Mars 12:30 ), 'week' => array( 'name' => 'Week', 'slot' => 60 * 60, // Slots of one hour 'fileslot' => 60 * 60 * 24 * 7, // 7 days of data in each file 'axislabelint' => 24, // Number of slots per label. 24 is one each day - 'dateformat-period' => 'j. M', // 4. Mars - 'dateformat-intra' => 'j. M H:i', // 4. Mars 12:30 + 'dateformat-period' => 'j. M', // 4. Mars + 'dateformat-intra' => 'j. M H:i', // 4. Mars 12:30 ), 'month' => array( 'name' => 'Month', 'slot' => 60 * 60 * 24, // Slots of one day 'fileslot' => 60 * 60 * 24 * 30, // 30 days of data in each file 'axislabelint' => 7, // Number of slots per label. 7 days => 1 week - 'dateformat-period' => 'j. M Y H:i', // 4. Mars 12:30 - 'dateformat-intra' => 'j. M', // 4. Mars + 'dateformat-period' => 'j. M Y H:i', // 4. Mars 12:30 + 'dateformat-intra' => 'j. M', // 4. Mars ), 'monthaligned' => array( 'name' => 'AlignedMonth', @@ -80,8 +80,8 @@ $config = array( 'fileslot' => null, // 30 days of data in each file 'customDateHandler' => 'month', 'axislabelint' => 7, // Number of slots per label. 7 days => 1 week - 'dateformat-period' => 'j. M Y H:i', // 4. Mars 12:30 - 'dateformat-intra' => 'j. M', // 4. Mars + 'dateformat-period' => 'j. M Y H:i', // 4. Mars 12:30 + 'dateformat-intra' => 'j. M', // 4. Mars ), 'days180' => array( 'name' => '180 days', @@ -96,7 +96,8 @@ $config = array( 'statrules' => array( 'sloratio' => array( 'name' => 'SLO to SSO ratio', - 'descr' => 'Comparison of the number of Single Log-Out compared to Single Sign-On. Graph shows how many logouts where initiated for each Single Sign-On.', + 'descr' => 'Comparison of the number of Single Log-Out compared to Single Sign-On.'. + ' Graph shows how many logouts where initiated for each Single Sign-On.', 'type' => 'calculated', 'presenter' => 'statistics:Ratio', 'ref' => array('slo', 'sso'), @@ -107,7 +108,8 @@ $config = array( ), 'ssomulti' => array( 'name' => 'Requests per session', - 'descr' => 'Number of SSO request pairs exchanged between IdP and SP within the same IdP session. A high number indicates that the session at the SP is timing out faster than at the IdP.', + 'descr' => 'Number of SSO request pairs exchanged between IdP and SP within the same IdP session.'. + ' A high number indicates that the session at the SP is timing out faster than at the IdP.', 'type' => 'calculated', 'presenter' => 'statistics:Ratio', 'ref' => array('sso', 'ssofirst'), @@ -148,7 +150,8 @@ $config = array( ), 'consent' => array( 'name' => 'Consent', - 'descr' => 'Consent statistics. Everytime a user logs in to a service an entry is logged for one of three states: consent was found, consent was not found or consent storage was not available.', + 'descr' => 'Consent statistics. Everytime a user logs in to a service an entry is logged for'. + ' one of three states: consent was found, consent was not found or consent storage was not available.', 'action' => 'consent', 'col' => 6, 'fieldPresentation' => array( @@ -158,7 +161,8 @@ $config = array( ), 'consentresponse' => array( 'name' => 'Consent response', - 'descr' => 'Consent response statistics. Everytime a user accepts consent, it is logged whether the user selected to remember the consent to next time.', + 'descr' => 'Consent response statistics. Everytime a user accepts consent,'. + ' it is logged whether the user selected to remember the consent to next time.', 'action' => 'consentResponse', 'col' => 6, 'fieldPresentation' => array( diff --git a/modules/statistics/hooks/hook_cron.php b/modules/statistics/hooks/hook_cron.php index b86b480d3121d3c8dd8a6f8b7bda1a86332d0163..a3ee4952cc347d567d4d044f4bbd83b05b7a7b5d 100644 --- a/modules/statistics/hooks/hook_cron.php +++ b/modules/statistics/hooks/hook_cron.php @@ -13,19 +13,19 @@ function statistics_hook_cron(&$croninfo) assert(array_key_exists('tag', $croninfo)); $statconfig = \SimpleSAML\Configuration::getConfig('module_statistics.php'); - + if (is_null($statconfig->getValue('cron_tag', null))) { return; } if ($statconfig->getValue('cron_tag', null) !== $croninfo['tag']) { return; } - + $maxtime = $statconfig->getInteger('time_limit', null); if ($maxtime) { set_time_limit($maxtime); } - + try { $aggregator = new \SimpleSAML\Module\statistics\Aggregator(); $results = $aggregator->aggregate(); diff --git a/modules/statistics/hooks/hook_sanitycheck.php b/modules/statistics/hooks/hook_sanitycheck.php index 85117477c9bdc3d11014f50899868f44dc50bb85..879ee3ee784c292f68cd979d66420799b6251085 100644 --- a/modules/statistics/hooks/hook_sanitycheck.php +++ b/modules/statistics/hooks/hook_sanitycheck.php @@ -13,7 +13,8 @@ function statistics_hook_sanitycheck(&$hookinfo) try { $statconfig = \SimpleSAML\Configuration::getConfig('module_statistics.php'); } catch (Exception $e) { - $hookinfo['errors'][] = '[statistics] Could not get configuration: '.$e->getMessage(); return; + $hookinfo['errors'][] = '[statistics] Could not get configuration: '.$e->getMessage(); + return; } $statdir = $statconfig->getValue('statdir'); diff --git a/modules/statistics/lib/AccessCheck.php b/modules/statistics/lib/AccessCheck.php index a4a003abb90488cda913eb43949dfa8780b50d19..750a5d0526e0aa3aa494e6f0ffdba9dc70dbef6c 100644 --- a/modules/statistics/lib/AccessCheck.php +++ b/modules/statistics/lib/AccessCheck.php @@ -61,10 +61,14 @@ class AccessCheck // Check if userid is allowed access.. if (in_array($attributes[$useridattr][0], $allowedusers, true)) { - \SimpleSAML\Logger::debug('Statistics auth - User granted access by user ID ['.$attributes[$useridattr][0].']'); + \SimpleSAML\Logger::debug( + 'Statistics auth - User granted access by user ID ['.$attributes[$useridattr][0].']' + ); return; } - \SimpleSAML\Logger::debug('Statistics auth - User denied access by user ID ['.$attributes[$useridattr][0].']'); + \SimpleSAML\Logger::debug( + 'Statistics auth - User denied access by user ID ['.$attributes[$useridattr][0].']' + ); } else { \SimpleSAML\Logger::debug('Statistics auth - no allowedUsers list.'); } diff --git a/modules/statistics/lib/Aggregator.php b/modules/statistics/lib/Aggregator.php index 9a022e341194b820382c2e3a941c66a7b61f4b99..dbdba27e6f84bc04a32ddb4d6e8fcc32205d08b0 100644 --- a/modules/statistics/lib/Aggregator.php +++ b/modules/statistics/lib/Aggregator.php @@ -93,7 +93,9 @@ class Aggregator } $logparser = new LogParser( - $this->statconfig->getValue('datestart', 0), $this->statconfig->getValue('datelength', 15), $this->statconfig->getValue('offsetspan', 44) + $this->statconfig->getValue('datestart', 0), + $this->statconfig->getValue('datelength', 15), + $this->statconfig->getValue('offsetspan', 44) ); $datehandler = array( 'default' => new DateHandler($this->offset), @@ -109,7 +111,7 @@ class Aggregator $lastlinehash = $this->metadata['lastlinehash']; } - $lastlogline = 'sdfsdf'; + $lastlogline = 'sdfsdf'; $lastlineflip = false; $results = array(); @@ -138,7 +140,8 @@ class Aggregator if ($debug) { echo "----------------------------------------\n"; echo 'Log line: '.$logline."\n"; - echo 'Date parse ['.substr($logline, 0, $this->statconfig->getValue('datelength', 15)).'] to ['.date(DATE_RFC822, $epoch).']'."\n"; + echo 'Date parse ['.substr($logline, 0, $this->statconfig->getValue('datelength', 15)). + '] to ['.date(DATE_RFC822, $epoch).']'."\n"; echo htmlentities(print_r($content, true)); if ($i >= 13) { exit; @@ -270,11 +273,11 @@ class Aggregator // Get start and end slot number within the file, based on the fileslot. $start = (int) $datehandler['default']->toSlot( - $datehandler[$dh]->fromSlot($fileno, $this->timeres[$tres]['fileslot']), + $datehandler[$dh]->fromSlot($fileno, $this->timeres[$tres]['fileslot']), $this->timeres[$tres]['slot'] ); $end = (int) $datehandler['default']->toSlot( - $datehandler[$dh]->fromSlot($fileno + 1, $this->timeres[$tres]['fileslot']), + $datehandler[$dh]->fromSlot($fileno + 1, $this->timeres[$tres]['fileslot']), $this->timeres[$tres]['slot'] ); @@ -295,7 +298,7 @@ class Aggregator $filename = $this->statdir.'/'.$rulename.'-'.$tres.'-'.$fileno.'.stat'; if (file_exists($filename)) { $previousData = unserialize(file_get_contents($filename)); - $filledresult = $this->cummulateData($previousData, $filledresult); + $filledresult = $this->cummulateData($previousData, $filledresult); } // store file diff --git a/modules/statistics/lib/DateHandler.php b/modules/statistics/lib/DateHandler.php index b62cfb62494ab703f3e82b3b2ff866a0f8ce85e1..ae9807df9ea6907992b4e25c7aad2921df49fcd2 100644 --- a/modules/statistics/lib/DateHandler.php +++ b/modules/statistics/lib/DateHandler.php @@ -14,7 +14,7 @@ class DateHandler /** * Constructor * - * @param array $offset Date offset + * @param array $offset Date offset */ public function __construct($offset) { diff --git a/modules/statistics/lib/DateHandlerMonth.php b/modules/statistics/lib/DateHandlerMonth.php index 78209d03e98880ab2a9c0accc076de53b47b397c..061af6e62c8029a3eeea32de3a221c4b811f496b 100644 --- a/modules/statistics/lib/DateHandlerMonth.php +++ b/modules/statistics/lib/DateHandlerMonth.php @@ -12,7 +12,7 @@ class DateHandlerMonth extends DateHandler /** * Constructor * - * @param integer $offset Date offset + * @param integer $offset Date offset */ public function __construct($offset) { diff --git a/modules/statistics/lib/Graph/GoogleCharts.php b/modules/statistics/lib/Graph/GoogleCharts.php index 072ef33b7d92b867acf0854b9796273141bd10bd..087dffcb2376eb0e2c112c7e46a2e197f81c241d 100644 --- a/modules/statistics/lib/Graph/GoogleCharts.php +++ b/modules/statistics/lib/Graph/GoogleCharts.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Module\statistics\Graph; /* * \SimpleSAML\Module\statistics\Graph\GoogleCharts will help you to create a Google Chart - * using the Google Charts API. + * using the Google Charts API. * * @author Andreas Ã…kre Solberg <andreas.solberg@uninett.no> * @package SimpleSAMLphp @@ -64,15 +64,15 @@ class GoogleCharts $second = substr($extended_table, intval(($delta * $v / 100) % $size), 1); $chardata .= "$first$second"; } else { - $chardata .= '__'; // Value out of max range; - } + $chardata .= '__'; // Value out of max range; + } } - return $chardata; + return $chardata; } /** * Generate a Google Charts URL which points to a generated image. - * More documentation on Google Charts here: + * More documentation on Google Charts here: * http://code.google.com/apis/chart/ * * @param string $axis Axis @@ -137,12 +137,14 @@ class GoogleCharts * * Here is some test code: * <code> - * $foo = array(0, 2, 2.3, 2.6, 6, 10, 15, 98, 198, 256, 487, 563, 763, 801, 899, 999, 987, 198234.485, 283746); - * foreach ($foo AS $f) { - * echo '<p>' . $f . ' => ' . \SimpleSAML\Module\statistics\Graph\GoogleCharts::roof($f); - * } + * $foo = array( + * 0, 2, 2.3, 2.6, 6, 10, 15, 98, 198, 256, 487, 563, 763, 801, 899, 999, 987, 198234.485, 283746 + * ); + * foreach ($foo as $f) { + * echo '<p>'.$f.' => '.\SimpleSAML\Module\statistics\Graph\GoogleCharts::roof($f); + * } * </code> - * + * * @param integer $max Input value. */ public static function roof($max) diff --git a/modules/statistics/lib/LogCleaner.php b/modules/statistics/lib/LogCleaner.php index d04204df951894a9a273d83bb63e8a0eb29e4e70..ac172a28e359e34c007ca8e86e0966afd5cabe46 100644 --- a/modules/statistics/lib/LogCleaner.php +++ b/modules/statistics/lib/LogCleaner.php @@ -60,7 +60,9 @@ class LogCleaner $file = fopen($this->inputfile, 'r'); $logparser = new LogParser( - $this->statconfig->getValue('datestart', 0), $this->statconfig->getValue('datelength', 15), $this->statconfig->getValue('offsetspan', 44) + $this->statconfig->getValue('datestart', 0), + $this->statconfig->getValue('datelength', 15), + $this->statconfig->getValue('offsetspan', 44) ); $sessioncounter = array(); @@ -94,7 +96,8 @@ class LogCleaner if ($debug) { echo "----------------------------------------\n"; echo 'Log line: '.$logline."\n"; - echo 'Date parse ['.substr($logline, 0, $this->statconfig->getValue('datelength', 15)).'] to ['.date(DATE_RFC822, $epoch).']'."\n"; + echo 'Date parse ['.substr($logline, 0, $this->statconfig->getValue('datelength', 15)). + '] to ['.date(DATE_RFC822, $epoch).']'."\n"; echo htmlentities(print_r($content, true)); if ($i >= 13) { exit; @@ -149,7 +152,9 @@ class LogCleaner $outfile = fopen($outputfile, 'x'); // Create the output file $logparser = new LogParser( - $this->statconfig->getValue('datestart', 0), $this->statconfig->getValue('datelength', 15), $this->statconfig->getValue('offsetspan', 44) + $this->statconfig->getValue('datestart', 0), + $this->statconfig->getValue('datelength', 15), + $this->statconfig->getValue('offsetspan', 44) ); $i = 0; diff --git a/modules/statistics/lib/RatioDataset.php b/modules/statistics/lib/RatioDataset.php index fcb7377fd4a0aafdba04dec9d6f855617f8b857a..0abd90416cf158dcf7581ae9852e1e62d8e7d85f 100644 --- a/modules/statistics/lib/RatioDataset.php +++ b/modules/statistics/lib/RatioDataset.php @@ -14,7 +14,7 @@ class RatioDataset extends StatDataset /** * Aggregate summary table from dataset. To be used in the table view. */ - $this->summary = array(); + $this->summary = array(); $noofvalues = array(); foreach ($this->results as $slot => $res) { foreach ($res as $key => $value) { @@ -65,7 +65,7 @@ class RatioDataset extends StatDataset foreach ($result2 as $tick => $val) { $combined[$tick] = array(); foreach ($val as $index => $num) { - $combined[$tick][$index] = $this->divide( + $combined[$tick][$index] = $this->divide( $this->ag($index, $result1[$tick]), $this->ag($index, $result2[$tick]) ); @@ -79,4 +79,3 @@ class RatioDataset extends StatDataset return null; } } - diff --git a/modules/statistics/lib/Ruleset.php b/modules/statistics/lib/Ruleset.php index d94ee7c03ce89f31f769e6f18bed9e22b602dc5f..5b7b85d943106c7758fe20e9fadff497dd5732c6 100644 --- a/modules/statistics/lib/Ruleset.php +++ b/modules/statistics/lib/Ruleset.php @@ -91,9 +91,11 @@ class Ruleset $statrulesConfig = $this->statconfig->getConfigItem('statrules'); $statruleConfig = $statrulesConfig->getConfigItem($rule); - $presenterClass = \SimpleSAML\Module::resolveClass($statruleConfig->getValue('presenter', 'statistics:BaseRule'), 'Statistics_Rulesets'); + $presenterClass = \SimpleSAML\Module::resolveClass( + $statruleConfig->getValue('presenter', 'statistics:BaseRule'), + 'Statistics_Rulesets' + ); $statrule = new $presenterClass($this->statconfig, $statruleConfig, $rule, $this->available); return $statrule; } } - diff --git a/modules/statistics/lib/StatDataset.php b/modules/statistics/lib/StatDataset.php index 7d890848c81863672acff24e629a18121790f53b..cc8fed1497fc0f4660bc999fb3300bafb8494801 100644 --- a/modules/statistics/lib/StatDataset.php +++ b/modules/statistics/lib/StatDataset.php @@ -306,4 +306,3 @@ class StatDataset $this->results = $combined; } } - diff --git a/modules/statistics/lib/Statistics/Rulesets/BaseRule.php b/modules/statistics/lib/Statistics/Rulesets/BaseRule.php index 5ceca8590c7a6a7f8f278909ac25a4ddabfcd3e5..469bec780c88e611d8f57086060ebfd6ffff1382 100644 --- a/modules/statistics/lib/Statistics/Rulesets/BaseRule.php +++ b/modules/statistics/lib/Statistics/Rulesets/BaseRule.php @@ -27,7 +27,7 @@ class BaseRule $this->available = null; if (array_key_exists($ruleid, $available)) { - $this->available = $available[$ruleid]; + $this->available = $available[$ruleid]; } } @@ -39,7 +39,7 @@ class BaseRule public function availableTimeRes() { $timeresConfigs = $this->statconfig->getValue('timeres'); - $available_times = array(); + $available_times = array(); foreach ($timeresConfigs as $tres => $tresconfig) { if (array_key_exists($tres, $this->available)) { $available_times[$tres] = $tresconfig['name']; @@ -62,9 +62,14 @@ class BaseRule /* * Get list of avaiable times in current file (rule) */ - $available_times = array(); + $available_times = array(); foreach ($this->available[$timeres] as $slot) { - $available_times[$slot] = $datehandler->prettyHeader($slot, $slot + 1, $timeresConfig['fileslot'], $timeresConfig['dateformat-period']); + $available_times[$slot] = $datehandler->prettyHeader( + $slot, + $slot + 1, + $timeresConfig['fileslot'], + $timeresConfig['dateformat-period'] + ); } return $available_times; } @@ -117,8 +122,13 @@ class BaseRule { $timeres = $this->resolveTimeRes($preferTimeRes); $fileslot = $this->resolveFileSlot($timeres, $preferTime); - $dataset = new \SimpleSAML\Module\statistics\StatDataset($this->statconfig, $this->ruleconfig, $this->ruleid, $timeres, $fileslot); + $dataset = new \SimpleSAML\Module\statistics\StatDataset( + $this->statconfig, + $this->ruleconfig, + $this->ruleid, + $timeres, + $fileslot + ); return $dataset; } } - diff --git a/modules/statistics/lib/Statistics/Rulesets/Ratio.php b/modules/statistics/lib/Statistics/Rulesets/Ratio.php index 89d9f1c78fbeaf796627e3e110b2150361f4d8b0..1f76f6b4709791447db69970aafcf7d666e02175 100644 --- a/modules/statistics/lib/Statistics/Rulesets/Ratio.php +++ b/modules/statistics/lib/Statistics/Rulesets/Ratio.php @@ -65,8 +65,13 @@ class Ratio extends BaseRule $refNames = $this->ruleconfig->getArray('ref'); - $dataset = new \SimpleSAML\Module\statistics\RatioDataset($this->statconfig, $this->ruleconfig, $refNames, $timeres, $fileslot); + $dataset = new \SimpleSAML\Module\statistics\RatioDataset( + $this->statconfig, + $this->ruleconfig, + $refNames, + $timeres, + $fileslot + ); return $dataset; } } - diff --git a/modules/statistics/templates/statistics.tpl.php b/modules/statistics/templates/statistics.tpl.php index 91cca855098d7deb8898e2f7c949dafde2e1e118..243a101e5ac75525fd62fca077153e6df5e3d8e1 100644 --- a/modules/statistics/templates/statistics.tpl.php +++ b/modules/statistics/templates/statistics.tpl.php @@ -3,33 +3,36 @@ $this->data['header'] = 'SimpleSAMLphp Statistics'; $this->data['jquery'] = array('core' => true, 'ui' => true, 'css' => true); -$this->data['head'] = '<link rel="stylesheet" type="text/css" href="' . SimpleSAML\Module::getModuleURL("statistics/assets/statistics.css") . '" />' . "\n"; -$this->data['head'] .= '<script type="text/javascript" src="' . SimpleSAML\Module::getModuleURL("statistics/assets/statistics.js") . '"></script>' . "\n"; +$this->data['head'] = '<link rel="stylesheet" type="text/css" href="'. + SimpleSAML\Module::getModuleURL("statistics/assets/css/statistics.css").'" />'."\n"; +$this->data['head'] .= '<script type="text/javascript" src="'. + SimpleSAML\Module::getModuleURL("statistics/assets/js/statistics.js").'"></script>'."\n"; $this->includeAtTemplateBase('includes/header.php'); -echo '<h1>'. $this->data['available.rules'][$this->data['selected.rule']]['name'] . '</h1>'; -echo '<p>' . $this->data['available.rules'][$this->data['selected.rule']]['descr'] . '</p>'; +echo '<h1>'.$this->data['available.rules'][$this->data['selected.rule']]['name'].'</h1>'; +echo '<p>'.$this->data['available.rules'][$this->data['selected.rule']]['descr'].'</p>'; // Report settings echo '<table class="selecttime">'; -echo '<tr><td class="selecttime_icon"><img src="' . SimpleSAML\Utils\HTTP::getBaseUrl() . 'resources/icons/crystal_project/kchart.32x32.png" alt="Report settings" /></td>'; +echo '<tr><td class="selecttime_icon"><img src="'.SimpleSAML\Utils\HTTP::getBaseURL(). + 'resources/icons/crystal_project/kchart.32x32.png" alt="Report settings" /></td>'; // Select report echo '<td>'; echo '<form action="#">'; foreach ($this->data['post_rule'] as $k => $v) { - echo '<input type="hidden" name="' . $k . '" value="'. htmlspecialchars($v) . '" />' . "\n"; + echo '<input type="hidden" name="'.$k.'" value="'.htmlspecialchars($v).'" />'."\n"; } if (!empty($this->data['available_rules'])) { echo '<select onchange="submit();" name="rule">'; foreach ($this->data['available_rules'] as $key => $rule) { if ($key === $this->data['selected_rule']) { - echo '<option selected="selected" value="' . $key . '">' . $rule['name'] . '</option>'; + echo '<option selected="selected" value="'.$key.'">'.$rule['name'].'</option>'; } else { - echo '<option value="' . $key . '">' . $rule['name'] . '</option>'; + echo '<option value="'.$key.'">'.$rule['name'].'</option>'; } } echo '</select>'; @@ -40,8 +43,8 @@ echo '</form></td>'; echo '<td class="td_right">'; echo '<form action="#">'; -foreach($this->data['post_d'] as $k => $v) { - echo '<input type="hidden" name="' . $k . '" value="'. htmlspecialchars($v) . '" />' . "\n"; +foreach ($this->data['post_d'] as $k => $v) { + echo '<input type="hidden" name="'.$k.'" value="'.htmlspecialchars($v).'" />'."\n"; } if (!empty($this->data['availdelimiters'])) { @@ -55,9 +58,10 @@ if (!empty($this->data['availdelimiters'])) { if ($key == '_') { echo '<option value="_">Total</option>'; } elseif (isset($_REQUEST['d']) && $delim == $_REQUEST['d']) { - echo '<option selected="selected" value="' . htmlspecialchars($delim) . '">' . htmlspecialchars($delimName) . '</option>'; + echo '<option selected="selected" value="'.htmlspecialchars($delim).'">'. + htmlspecialchars($delimName).'</option>'; } else { - echo '<option value="' . htmlspecialchars($delim) . '">' . htmlspecialchars($delimName) . '</option>'; + echo '<option value="'.htmlspecialchars($delim).'">'.htmlspecialchars($delimName).'</option>'; } } echo '</select>'; @@ -71,10 +75,11 @@ echo '</table>'; // Select time and date echo '<table class="selecttime">'; -echo '<tr><td class="selecttime_icon"><img src="' . SimpleSAML\Utils\HTTP::getBaseUrl() . 'resources/icons/crystal_project/date.32x32.png" alt="Select date and time" /></td>'; +echo '<tr><td class="selecttime_icon"><img src="'.SimpleSAML\Utils\HTTP::getBaseURL(). + 'resources/icons/crystal_project/date.32x32.png" alt="Select date and time" /></td>'; if (isset($this->data['available.times.prev'])) { - echo '<td><a href="' . $this->data['get_times_prev'] . '">« Previous</a></td>'; + echo '<td><a href="'.$this->data['get_times_prev'].'">« Previous</a></td>'; } else { echo '<td class="selecttime_link_grey">« Previous</td>'; } @@ -83,16 +88,16 @@ echo '<td class="td_right">'; echo '<form action="#">'; foreach ($this->data['post_res'] as $k => $v) { - echo '<input type="hidden" name="' . $k . '" value="'. htmlspecialchars($v) . '" />' . "\n"; + echo '<input type="hidden" name="'.$k.'" value="'.htmlspecialchars($v).'" />'."\n"; } if (!empty($this->data['available.timeres'])) { echo '<select onchange="submit();" name="res">'; foreach ($this->data['available.timeres'] as $key => $timeresname) { if ($key == $this->data['selected.timeres']) { - echo '<option selected="selected" value="' . $key . '">' . $timeresname . '</option>'; + echo '<option selected="selected" value="'.$key.'">'.$timeresname.'</option>'; } else { - echo '<option value="' . $key . '">' . $timeresname . '</option>'; + echo '<option value="'.$key.'">'.$timeresname.'</option>'; } } echo '</select>'; @@ -103,16 +108,16 @@ echo '<td class="td_left">'; echo '<form action="#">'; foreach ($this->data['post_time'] as $k => $v) { - echo '<input type="hidden" name="' . $k . '" value="'. htmlspecialchars($v) . '" />' . "\n"; + echo '<input type="hidden" name="'.$k.'" value="'.htmlspecialchars($v).'" />'."\n"; } if (!empty($this->data['available.times'])) { echo '<select onchange="submit();" name="time">'; foreach ($this->data['available.times'] as $key => $timedescr) { if ($key == $this->data['selected.time']) { - echo '<option selected="selected" value="' . $key . '">' . $timedescr . '</option>'; + echo '<option selected="selected" value="'.$key.'">'.$timedescr.'</option>'; } else { - echo '<option value="' . $key . '">' . $timedescr . '</option>'; + echo '<option value="'.$key.'">'.$timedescr.'</option>'; } } echo '</select>'; @@ -120,14 +125,14 @@ if (!empty($this->data['available.times'])) { echo '</form></td>'; if (isset($this->data['available.times.next'])) { - echo '<td class="td_right td_next_right"><a href="' . $this->data['get_times_next'] . '">Next »</a></td>'; + echo '<td class="td_right td_next_right"><a href="'.$this->data['get_times_next'].'">Next »</a></td>'; } else { echo '<td class="td_right selecttime_link_grey td_next_right">Next »</td>'; } echo '</tr></table>'; echo '<div id="tabdiv">'; -if (!empty($this->data['results'])){ +if (!empty($this->data['results'])) { echo '<ul class="tabset_tabs"> <li><a href="#graph">Graph</a></li> <li><a href="#table">Summary table</a></li> @@ -137,22 +142,22 @@ if (!empty($this->data['results'])){ <div id="graph" class="tabset_content">'; - echo '<img src="' . htmlspecialchars($this->data['imgurl']) . '" alt="Graph" />'; + echo '<img src="'.htmlspecialchars($this->data['imgurl']).'" alt="Graph" />'; echo '<form action="#">'; echo '<p class="p_right">Compare with total from this dataset '; foreach ($this->data['post_rule2'] as $k => $v) { - echo '<input type="hidden" name="' . $k . '" value="'. htmlspecialchars($v) . '" />' . "\n"; + echo '<input type="hidden" name="'.$k.'" value="'.htmlspecialchars($v).'" />'."\n"; } echo '<select onchange="submit();" name="rule2">'; echo ' <option value="_">None</option>'; foreach ($this->data['available_rules'] as $key => $rule) { if ($key === $this->data['selected.rule2']) { - echo '<option selected="selected" value="' . $key . '">' . $rule['name'] . '</option>'; + echo '<option selected="selected" value="'.$key.'">'.$rule['name'].'</option>'; } else { - echo '<option value="' . $key . '">' . $rule['name'] . '</option>'; + echo '<option value="'.$key.'">'.$rule['name'].'</option>'; } } echo '</select></p></form>'; @@ -160,13 +165,14 @@ if (!empty($this->data['results'])){ echo '</div>'; // end graph content. /** - * Handle table view - - - - - - + * Handle table view - - - - - - */ - $classint = array('odd', 'even'); $i = 0; + $classint = array('odd', 'even'); + $i = 0; echo '<div id="table" class="tabset_content">'; if (isset($this->data['pieimgurl'])) { - echo '<img src="' . $this->data['pieimgurl'] . '" alt="Pie chart" />'; + echo '<img src="'.$this->data['pieimgurl'].'" alt="Pie chart" />'; } echo '<table class="tableview"><tr><th class="value">Value</th><th class="category">Data range</th></tr>'; @@ -179,14 +185,16 @@ if (!empty($this->data['results'])){ } if ($key === '_') { - echo '<tr class="total ' . $clint . '"><td class="value">' . $value . '</td><td class="category">' . $keyName . '</td></tr>'; + echo '<tr class="total '.$clint.'"><td class="value">'. + $value.'</td><td class="category">'.$keyName.'</td></tr>'; } else { - echo '<tr class="' . $clint . '"><td class="value">' . $value . '</td><td class="category">' . $keyName . '</td></tr>'; + echo '<tr class="'.$clint.'"><td class="value">'.$value. + '</td><td class="category">'.$keyName.'</td></tr>'; } } echo '</table></div>'; - // - - - - - - - End table view - - - - - - - + // - - - - - - - End table view - - - - - - - echo '<div id="debug" >'; echo '<table class="timeseries">'; @@ -196,19 +204,19 @@ if (!empty($this->data['results'])){ if (array_key_exists($key, $this->data['delimiterPresentation'])) { $keyName = $this->data['delimiterPresentation'][$key]; } - echo'<th>' . $keyName . '</th>'; + echo'<th>'.$keyName.'</th>'; } echo '</tr>'; $i = 0; foreach ($this->data['debugdata'] as $slot => $dd) { - echo '<tr class="' . ((++$i % 2) == 0 ? 'odd' : 'even') . '">'; - echo '<td>' . $dd[0] . '</td>'; - echo '<td class="datacontent">' . $dd[1] . '</td>'; + echo '<tr class="'.((++$i % 2) == 0 ? 'odd' : 'even').'">'; + echo '<td>'.$dd[0].'</td>'; + echo '<td class="datacontent">'.$dd[1].'</td>'; foreach ($this->data['topdelimiters'] as $key) { - echo '<td class="datacontent">' . (array_key_exists($key, $this->data['results'][$slot]) ? - $this->data['results'][$slot][$key] : ' ') . '</td>'; + echo '<td class="datacontent">'.(array_key_exists($key, $this->data['results'][$slot]) ? + $this->data['results'][$slot][$key] : ' ').'</td>'; } echo '</tr>'; } diff --git a/modules/statistics/templates/statistics.twig b/modules/statistics/templates/statistics.twig index f3031f5c4cc8dead578cf072ae984582b21dd832..e9f8946f936271139fa4f7c11609439ff53c0c51 100644 --- a/modules/statistics/templates/statistics.twig +++ b/modules/statistics/templates/statistics.twig @@ -2,11 +2,11 @@ {% extends "base.twig" %} {% block preload %} - <link href="{{ baseurlpath }}assets/statistics.css" rel="stylesheet" /> + <link href="{{ baseurlpath }}assets/css/statistics.css" rel="stylesheet" /> {% endblock %} {% block postload %} -<script type="text/javascript" src="{{ baseurlpath }}assets/statistics.js"></script> +<script type="text/javascript" src="{{ baseurlpath }}assets/js/statistics.js"></script> {% endblock %} {% block content %} @@ -16,7 +16,7 @@ <table class="selecttime"> <tr> <td class="selecttime_icon"> - <img src="/{{ baseurlpath }}resources/icons/crystal_project/kchart.32x32.png" alt="Report settings" /> + <i class="fa fa-pie-chart"></i> </td> <td> <form action="#"> @@ -66,7 +66,7 @@ <table class="selecttime"> <tr> <td class="selecttime_icon"> - <img src="/{{ baseurlpath }}resources/icons/crystal_project/date.32x32.png" alt="Select date and time" /> + <i class="fa fa-calendar"></i> </td> {% if available_times_prev %} <td><a href="{{ get_times_prev }}">« Previous</a></td> @@ -154,7 +154,7 @@ <th class="category">Data range</th> </tr> {% for key, value in summaryDataset %} - {% if loop.index0 % 2 == 0 %} + {% if loop.index0 is even %} {% set class = 'even' %} {% else %} {% set class = 'odd' %} @@ -186,17 +186,16 @@ <th>Time</th> <th>Total</th> {% for key, value in topdelimiters %} - {% set keyName = key %} - {% if delimiterPresentation[key] is defined %} - {% set keyName = delimiterPresentation[key] %} + {% set keyName = value %} + {% if delimiterPresentation[value] is defined %} + {% set keyName = delimiterPresentation[value] %} {% endif %} <th>{{ keyName }}</th> {% endfor %} </tr> - {% set i = 0 %} {% for slot, dd in debugdata %} - {% if i % 2 == 0 %} + {% if loop.index0 is even %} {% set class = 'even' %} {% else %} {% set class = 'odd' %} @@ -206,8 +205,8 @@ <td>{{ dd[0] }}</td> <td class="datacontent">{{ dd[1] }}</td> {% for key, value in topdelimiters %} - {% if results.slot is defined %} - <td class="datacontent">{{ results.slot.key }}</td> + {% if results[slot] is defined %} + <td class="datacontent">{{ results[slot][value] }}</td> {% else %} <td class="datacontent"> </td> {% endif %} diff --git a/modules/statistics/templates/statmeta.tpl.php b/modules/statistics/templates/statmeta.tpl.php index 9af5a032ef3ce5b9caf74256de5bbb8c9ca6b885..324b4e0c5c2ad26a0abf5e3b3c2ee82d98ec3a0b 100644 --- a/modules/statistics/templates/statmeta.tpl.php +++ b/modules/statistics/templates/statmeta.tpl.php @@ -1,6 +1,7 @@ <?php $this->data['header'] = 'SimpleSAMLphp Statistics Metadata'; -$this->data['head'] = '<link rel="stylesheet" type="text/css" href="' . SimpleSAML\Module::getModuleURL("statistics/style.css") . '" />'; +$this->data['head'] = '<link rel="stylesheet" type="text/css" href="'. + SimpleSAML\Module::getModuleURL("statistics/assets/css/statistics.css").'" />'; $this->includeAtTemplateBase('includes/header.php'); echo '<table id="statmeta">' ; @@ -9,34 +10,33 @@ if (isset($this->data['metadata'])) { $metadata = $this->data['metadata']; if (isset($metadata['lastrun'])) { - echo '<tr><td>Aggregator last run at</td><td>' . $metadata['lastrun'] . '</td></tr>'; + echo '<tr><td>Aggregator last run at</td><td>'.$metadata['lastrun'].'</td></tr>'; } if (isset($metadata['notBefore'])) { - echo '<tr><td>Aggregated data until</td><td>' . $metadata['notBefore'] . '</td></tr>'; + echo '<tr><td>Aggregated data until</td><td>'.$metadata['notBefore'].'</td></tr>'; } if (isset($metadata['memory'])) { - echo '<tr><td>Memory usage</td><td>' . $metadata['memory'] . ' MB' . '</td></tr>'; + echo '<tr><td>Memory usage</td><td>'.$metadata['memory'].' MB'.'</td></tr>'; } if (isset($metadata['time'])) { - echo '<tr><td>Execution time</td><td>' . $metadata['time'] . ' seconds' . '</td></tr>'; + echo '<tr><td>Execution time</td><td>'.$metadata['time'].' seconds'.'</td></tr>'; } - if (isset($metadata['lastlinehash'] )) { - echo '<tr><td>SHA1 of last processed logline</td><td>' . $metadata['lastlinehash'] . '</td></tr>'; + if (isset($metadata['lastlinehash'])) { + echo '<tr><td>SHA1 of last processed logline</td><td>'.$metadata['lastlinehash'].'</td></tr>'; } - if (isset($metadata['lastline'] )) { - echo '<tr><td>Last processed logline</td><td>' . $metadata['lastline'] . '</td></tr>'; + if (isset($metadata['lastline'])) { + echo '<tr><td>Last processed logline</td><td>'.$metadata['lastline'].'</td></tr>'; } } else { echo '<tr><td>No metadata found</td></tr>'; } echo '</table>'; -echo '<p>[ <a href="' . SimpleSAML\Module::getModuleURL("statistics/showstats.php") . '">Show statistics</a> ] </p>'; +echo '<p>[ <a href="'.SimpleSAML\Module::getModuleURL("statistics/showstats.php").'">Show statistics</a> ] </p>'; $this->includeAtTemplateBase('includes/footer.php'); - diff --git a/modules/statistics/templates/statmeta.twig b/modules/statistics/templates/statmeta.twig index dd2c475c552376eb815c69729eef252f222ab9b4..09808e837a0d97818e143582d9915199cfe24d43 100644 --- a/modules/statistics/templates/statmeta.twig +++ b/modules/statistics/templates/statmeta.twig @@ -2,7 +2,7 @@ {% extends "base.twig" %} {% block preload %} - <link href="{{ baseurlpath }}style.css" rel="stylesheet" /> + <link href="{{ baseurlpath }}assets/css/statistics.css" rel="stylesheet" /> {% endblock %} {% block content %} diff --git a/modules/statistics/www/assets/css/statistics.css b/modules/statistics/www/assets/css/statistics.css new file mode 100644 index 0000000000000000000000000000000000000000..4d0d163d600681ffe26fa34cee7cd7cbd9505bc4 --- /dev/null +++ b/modules/statistics/www/assets/css/statistics.css @@ -0,0 +1,127 @@ +@media all { + div#content { + margin: .4em ! important; + } + + .tableview { + border-collapse: collapse; + border: 1px solid #ccc; + margin: 1em; + width: 80%; + } + + .tableview th, .tableview td { + border: 1px solid #ccc; + padding: 0px 5px; + } + + .tableview th { + background: #e5e5e5; + } + + .tableview tr.total td { + color: #500; font-weight: bold; + } + + .tableview tr.even td { + background: #f5f5f5; + border-top: 1px solid #e0e0e0; + border-bottom: 1px solid #e0e0e0; + } + + .tableview th.value, .tableview td.value { + text-align: right; + } + + table.timeseries tr.odd td { + background-color: #f4f4f4; + } + + table.timeseries td { + padding-right: 2em; border: 1px solid #ccc + } + + td.datacontent { + text-align: right; + } + + table.selecttime { + width: 100%; + border: 1px solid #ccc; + background: #eee; + margin: 1px 0px; padding: 0px; + } + + td.selecttime_icon { + width: 50px; + padding: 0px; + } + + td.selecttime_icon img { + margin: 0px; + } + + td.selecttime_link_grey { + color: #ccc; + } + + td.td_right { + text-align: right; + } + td.td_next_right { + padding-right: 4px; + } + td.td_left { + text-align: left; + } + + p.p_right { + text-align: right; + } + + form { + display: inline; + } + + table#statmeta { + width: 100%; + } + + ul.tabset_tabs { + margin: 0px; + padding: 0px; + list-style: none; + } + + ul.tabset_tabs li { + background: none; + color: #222; + display: inline-block; + padding: 10px 15px; + cursor: pointer; + } + + ul.tabset_tabs li.current { + background: #ededed; + color: #222; + } + + .tabset_content { + display: none; + background: #ededed; + padding: 15px; + } + + .tabset_content.current { + display: inherit; + } + + #graph img { + max-width: 77%; + height: auto; + } + #table img { + max-width: 77%; + height: auto; + } +} diff --git a/modules/statistics/www/assets/js/statistics.js b/modules/statistics/www/assets/js/statistics.js new file mode 100644 index 0000000000000000000000000000000000000000..54a72551d90bc1b501e5c2d01f0b83879af7efcc --- /dev/null +++ b/modules/statistics/www/assets/js/statistics.js @@ -0,0 +1,8 @@ +$(document).ready(function () { + $("#tabdiv").tabs(); + $('ul.tabset_tabs li').click( + function () { + $("html, body").animate({ scrollTop: 0 }, "slow"); + } + ) +}); diff --git a/modules/statistics/www/assets/statistics.js b/modules/statistics/www/assets/statistics.js index d7faf312f3381f85c80dce9ff96bdf2c9ddbc982..54a72551d90bc1b501e5c2d01f0b83879af7efcc 100644 --- a/modules/statistics/www/assets/statistics.js +++ b/modules/statistics/www/assets/statistics.js @@ -1,7 +1,7 @@ -$(document).ready(function() { +$(document).ready(function () { $("#tabdiv").tabs(); $('ul.tabset_tabs li').click( - function() { + function () { $("html, body").animate({ scrollTop: 0 }, "slow"); } ) diff --git a/modules/statistics/www/showstats.php b/modules/statistics/www/showstats.php index 4a38467cec9d475cae7eab87bf81aaff96443d00..ac59688242ba423aa112792b431320e1dcd7d3c0 100644 --- a/modules/statistics/www/showstats.php +++ b/modules/statistics/www/showstats.php @@ -51,7 +51,7 @@ $t->data['selected_rule'] = $rule; $t->data['selected_rule2'] = $preferRule2; $t->data['post_d'] = getBaseURL($t, 'post', 'd'); - + try { $dataset = $statrule->getDataset($preferTimeRes, $preferTime); $dataset->setDelimiter($delimiter); @@ -69,7 +69,6 @@ try { } exit; } - } catch (\Exception $e) { $t->data['error'] = "No data available"; $t->show(); diff --git a/modules/statistics/www/statmeta.php b/modules/statistics/www/statmeta.php index 442723d0bd8961c0ab94b85bc2db59167fed57a8..dd252bb26e1b66f21b21e5c63ca3b9067be4c8c3 100644 --- a/modules/statistics/www/statmeta.php +++ b/modules/statistics/www/statmeta.php @@ -25,4 +25,3 @@ if ($metadata !== null) { } $t->show(); - diff --git a/templates/_footer.twig b/templates/_footer.twig index 8b9e730222779f9a58f446997dee3a891c5e8283..432e1daef212cf028e84b84318bf77fe0a9f4dc5 100644 --- a/templates/_footer.twig +++ b/templates/_footer.twig @@ -2,8 +2,7 @@ <div class="wrap"> <div class="center copyrights dark-bg"> <br>Copyright © 2007-2018 - <br> - <i class="fa fa-github" aria-hidden="true"></i> <a href="https://github.com/simplesamlphp/simplesamlphp">SimpleSAMLphp</a> + <a href="https://simplesamlphp.org/">SimpleSAMLphp</a> </div> <div class="logo-footer-right"> <div class="logo-footer"> diff --git a/templates/_table.twig b/templates/_table.twig index 5d8d4aff6fc954ecbfe1d78978f958a739c55095..6af434995d808f3d2ca72ff0f279d6a94b91fcd5 100644 --- a/templates/_table.twig +++ b/templates/_table.twig @@ -1,5 +1,5 @@ -<table id="table_with_attributes" class="attributes pure-table pure-table-striped pure-table-attributes" summary="attribute overview"> +<table id="table_with_attributes" class="attributes pure-table pure-table-striped pure-table-attributes" summary="attribute overview"> {% for name, values in items %} <tr class="{{ cycle(['odd', 'even'], loop.index0) }}"> @@ -21,4 +21,4 @@ </td> </tr> {% endfor %} -</table><br> \ No newline at end of file +</table><br> diff --git a/templates/base.twig b/templates/base.twig index 02fdc60d3ee36f425bbf099c470092c9f282a638..e366f37522b22418abf8947615ba2f587e22dfa3 100644 --- a/templates/base.twig +++ b/templates/base.twig @@ -12,7 +12,7 @@ {% if jquery and jquery.css %} <link rel="stylesheet" media="screen" type="text/css" href="/{{ baseurlpath }}resources/uitheme1.8/jquery-ui.css" /> {% endif %} - {% if isRTL %}<link rel="stylesheet" type="text/css" href="/{{ baseurlpath }}assets/css/src/default-rtl.css" />{% endif %} + {%- if isRTL %}<link rel="stylesheet" type="text/css" href="/{{ baseurlpath }}assets/css/src/default-rtl.css" />{% endif -%} <meta name="robots" content="noindex, nofollow"> {% block preload %}{% endblock %} </head> diff --git a/templates/error.twig b/templates/error.twig index 0f42558804cc0988b999d9214322ea849dae8fad..311aa2925e979d05b9c89068b038a40019b9d79f 100644 --- a/templates/error.twig +++ b/templates/error.twig @@ -41,7 +41,6 @@ <p>{{ '{errors:report_text}' | trans }}</p> <label for="email">{{ '{errors:report_email}' | trans }}</label> <input type="email" name="email" id="email" class="edge" value="{{ email }}" /> - </p> <textarea class="text-area edge" name="text" rows="6" cols="50" placeholder="{{ '{errors:report_explain}' | trans }}" required></textarea> <p class="center"> diff --git a/templates/includes/attributes.php b/templates/includes/attributes.php index 3d80a035a50ac0e432ef1712ea6f05521e9d5d23..68230ce749193c4705b4b52eafab2741ae0546bd 100644 --- a/templates/includes/attributes.php +++ b/templates/includes/attributes.php @@ -78,7 +78,7 @@ function present_attributes(\SimpleSAML\XHTML\Template $t, $attributes, $namePar if ($nameraw !== $name) { $str .= htmlspecialchars($name).'<br/>'; } - $str .= '<tt>'.htmlspecialchars($nameraw).'</tt>'; + $str .= '<code>'.htmlspecialchars($nameraw).'</code>'; $str .= '</td><td class="attrvalue"><ul>'; foreach ($value as $listitem) { if ($nameraw === 'jpegPhoto') { @@ -93,7 +93,7 @@ function present_attributes(\SimpleSAML\XHTML\Template $t, $attributes, $namePar if ($nameraw !== $name) { $str .= htmlspecialchars($name).'<br/>'; } - $str .= '<tt>'.htmlspecialchars($nameraw).'</tt>'; + $str .= '<code>'.htmlspecialchars($nameraw).'</code>'; $str .= '</td>'; if ($nameraw === 'jpegPhoto') { $str .= '<td class="attrvalue"><img src="data:image/jpeg;base64,'.htmlspecialchars($value[0]). diff --git a/templates/includes/header.php b/templates/includes/header.php index d79b006e1b5c76aae12633d2e5bcef35d81e8faf..82c894fb9246bfd994e7f177a9499993eeccd1fd 100644 --- a/templates/includes/header.php +++ b/templates/includes/header.php @@ -1,7 +1,5 @@ <?php - - /** * Support the htmlinject hook, which allows modules to change header, pre and post body on all pages. */ @@ -11,7 +9,6 @@ $this->data['htmlinject'] = [ 'htmlContentHead' => [], ]; - $jquery = []; if (array_key_exists('jquery', $this->data)) { $jquery = $this->data['jquery']; @@ -68,23 +65,22 @@ if (!empty($jquery)) { if ($version == '1.8') { if (isset($jquery['core']) && $jquery['core']) { - echo('<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-1.8.js"></script>' . "\n"); + echo '<script type="text/javascript" src="/'.$this->data['baseurlpath'].'resources/jquery-1.8.js"></script>'."\n"; } if (isset($jquery['ui']) && $jquery['ui']) { - echo('<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-ui-1.8.js"></script>' . "\n"); + echo '<script type="text/javascript" src="/'.$this->data['baseurlpath'].'resources/jquery-ui-1.8.js"></script>'."\n"; } if (isset($jquery['css']) && $jquery['css']) { - echo('<link rel="stylesheet" media="screen" type="text/css" href="/' . $this->data['baseurlpath'] . - 'resources/uitheme1.8/jquery-ui.css" />' . "\n"); + echo '<link rel="stylesheet" media="screen" type="text/css" href="/'.$this->data['baseurlpath']. + 'resources/uitheme1.8/jquery-ui.css" />'."\n"; } } } if (isset($this->data['clipboard.js'])) { - echo '<script type="text/javascript" src="/' . $this->data['baseurlpath'] . - 'resources/clipboard.min.js"></script>' . "\n"; + echo '<script type="text/javascript" src="/'.$this->data['baseurlpath'].'resources/clipboard.min.js"></script>'."\n"; } if (!empty($this->data['htmlinject']['htmlContentHead'])) { @@ -93,37 +89,24 @@ if (!empty($this->data['htmlinject']['htmlContentHead'])) { } } - - - if ($this->isLanguageRTL()) { ?> <link rel="stylesheet" type="text/css" href="/<?php echo $this->data['baseurlpath']; ?>resources/default-rtl.css" /> <?php } ?> - - <meta name="robots" content="noindex, nofollow" /> - <?php if (array_key_exists('head', $this->data)) { - echo '<!-- head -->' . $this->data['head'] . '<!-- /head -->'; + echo '<!-- head -->'.$this->data['head'].'<!-- /head -->'; } ?> </head> <?php $onLoad = ''; if (array_key_exists('autofocus', $this->data)) { - $onLoad .= 'SimpleSAML_focus(\'' . $this->data['autofocus'] . '\');'; -} -if (isset($this->data['onLoad'])) { - $onLoad .= $this->data['onLoad']; -} - -if ($onLoad !== '') { - $onLoad = ' onload="' . $onLoad . '"'; + $onLoad .= ' onload="SimpleSAML_focus(\''.$this->data['autofocus'].'\');"'; } ?> <body<?php echo $onLoad; ?>> @@ -198,13 +181,12 @@ if ($onLoad !== '') { if ($current) { $textarray[] = $langnames[$lang]; } else { - $textarray[] = '<a href="' . htmlspecialchars( + $textarray[] = '<a href="'.htmlspecialchars( \SimpleSAML\Utils\HTTP::addURLParameters( \SimpleSAML\Utils\HTTP::getSelfURL(), [$this->getTranslator()->getLanguage()->getLanguageParameterName() => $lang] ) - ) . '">' . - $langnames[$lang] . '</a>'; + ).'">'.$langnames[$lang].'</a>'; } } echo join(' | ', $textarray); @@ -212,13 +194,9 @@ if ($onLoad !== '') { } } - - ?> <div id="content"> - - <?php if (!empty($this->data['htmlinject']['htmlContentPre'])) { diff --git a/templates/index.twig b/templates/index.twig index 6f6f0518063bf61bd837f9295fcf36af0761f21d..e80a9ad701acc62fb8dffc2c41a2e57e55119419 100644 --- a/templates/index.twig +++ b/templates/index.twig @@ -6,16 +6,17 @@ <li class="ui-state-default ui-corner-top"><a href="/{{ baseurlpath }}module.php/core/frontpage_auth.php">Authentication</a></li> <li class="ui-state-default ui-corner-top"><a href="/{{ baseurlpath }}module.php/core/frontpage_federation.php">Federation</a></li> </ul> + <a class='float-r' href='{{ logouturl }}'>{{ '{core:frontpage:logout}'|trans }}</a> <div id="portalcontent" class="ui-tabs-panel ui-widget-content ui-corner-bottom"> <div style="clear: both" class="enablebox mini"> <table> <tr class="disabled"><td>SAML 2.0 IdP</td> - <td><img src="/{{ baseurlpath }}resources/icons/silk/delete.png" alt="disabled" /></td></tr> + <td><i class="fa fa-ban"></i></td></tr> <tr class="disabled"><td>Shib 1.3 IdP</td> - <td><img src="/{{ baseurlpath }}resources/icons/silk/delete.png" alt="disabled" /></td></tr> + <td><i class="fa fa-ban"></i></td></tr> </table> </div> diff --git a/templates/selectidp-dropdown.twig b/templates/selectidp-dropdown.twig new file mode 100644 index 0000000000000000000000000000000000000000..48f042d0ca057d1dd85a0ad585ca187182893124 --- /dev/null +++ b/templates/selectidp-dropdown.twig @@ -0,0 +1,27 @@ +{% set pagetitle = "Select your identity provider"|trans %} +{% extends "base.twig" %} + +{% block content %} + <h2>{{ pagetitle }}</h2> + + <p>{{ "Please select the identity provider where you want to authenticate:" | trans }}</p> + <form method="get" action="{{ urlpattern }}"> + <input type="hidden" name="entityID" value="{{ entityID }}"> + <input type="hidden" name="return" value="{{ return }}"> + <input type="hidden" name="returnIDParam" value="{{ returnIDParam }}"> + <select id="dropdownlist" name="idpentityid" autofocus> + {% for idpentry in idplist %} + <option value="{{ idpentry.entityid }}" + {% if idpentry.entityid == preferredidp %} + selected + {% endif %} + >{{ idpentry.name }}</option> + {% endfor %} + </select> + <button class="btn" type="submit">{{ 'Select' | trans }}</button> + {% if rememberenabled %} + <br/><input type="checkbox" name="remember" id="remember" value="1"> + <label for="remember">{{ 'Remember my choice' | trans }}</label> + {% endif %} + </form> +{% endblock %} diff --git a/templates/selectidp-links.twig b/templates/selectidp-links.twig new file mode 100644 index 0000000000000000000000000000000000000000..a7bf1103fdfe0b210988767bc99f69736edf4c26 --- /dev/null +++ b/templates/selectidp-links.twig @@ -0,0 +1,45 @@ +{% set pagetitle = "Select your identity provider"|trans %} +{% extends "base.twig" %} + +{% block content %} + <h2>{{ pagetitle }}</h2> + + <p>{{ "Please select the identity provider where you want to authenticate:" | trans }}</p> + <form method="get" action="{{ urlpattern }}"> + <input type="hidden" name="entityID" value="{{ entityID }}"> + <input type="hidden" name="return" value="{{ return }}"> + <input type="hidden" name="returnIDParam" value="{{ returnIDParam }}"> + {% if rememberenabled %} + <p><input type="checkbox" name="remember" id="remember" value="1"> + <label for="remember">{{ 'Remember my choice' | trans }}</label></p> + {% endif %} + + {% for idpentry in idplist %} + {% if idpentry.entityid == preferredidp %} + <div class="preferredidp"> + {% if idpentry.iconurl %} + <img class="float-l" src="{{ idpentry.iconurl }}"> + {% endif %} + <h3><i class="fa fa-star"></i> {{ idpentry.name }}</h3> + {% if idpentry.description %} + <p>{{ idpentry.description }}</p> + {% endif %} + <button type="submit" class="btn" name="idp_{{ idpentry.entityid }}">{{'Select'|trans}}</button> + </div> + {% endif %} + {% endfor %} + + {% for idpentry in idplist %} + {% if idpentry.entityid != preferredidp %} + {% if idpentry.iconurl %} + <img class="float-l" src="{{ idpentry.iconurl }}"> + {% endif %} + <h3>{{ idpentry.name }}</h3> + {% if idpentry.description %} + <p>{{ idpentry.description }}</p> + {% endif %} + <button type="submit" class="btn" name="idp_{{ idpentry.entityid }}">{{'Select'|trans}}</button> + {% endif %} + {% endfor %} + </form> +{% endblock %} diff --git a/tests/lib/SimpleSAML/ConfigurationTest.php b/tests/lib/SimpleSAML/ConfigurationTest.php index ea421b952d4ce7803c18836c39c013616fda8177..7df69174158d530c28f2d5a6125c5e2ccf72716b 100644 --- a/tests/lib/SimpleSAML/ConfigurationTest.php +++ b/tests/lib/SimpleSAML/ConfigurationTest.php @@ -109,47 +109,6 @@ class Test_Configuration extends SimpleSAML\Test\Utils\ClearStateTestCase $this->assertEquals($c->hasValueOneOf(array('missing', 'exists_true')), true); } - /** - * Test \SimpleSAML\Configuration::getBaseURL() - */ - public function testGetBaseURL() - { - // Need to set a default configuration because the SSP Logger attempts to use it. - Configuration::loadFromArray(array(), '[ARRAY]', 'simplesaml'); - $c = Configuration::loadFromArray(array()); - $this->assertEquals($c->getBaseURL(), 'simplesaml/'); - - $c = Configuration::loadFromArray(array('baseurlpath' => 'simplesaml/')); - $this->assertEquals($c->getBaseURL(), 'simplesaml/'); - - $c = Configuration::loadFromArray(array('baseurlpath' => '/simplesaml/')); - $this->assertEquals($c->getBaseURL(), 'simplesaml/'); - - $c = Configuration::loadFromArray(array('baseurlpath' => 'path/to/simplesaml/')); - $this->assertEquals($c->getBaseURL(), 'path/to/simplesaml/'); - - $c = Configuration::loadFromArray(array('baseurlpath' => '/path/to/simplesaml/')); - $this->assertEquals($c->getBaseURL(), 'path/to/simplesaml/'); - - $c = Configuration::loadFromArray(array('baseurlpath' => 'https://example.org/ssp/')); - $this->assertEquals($c->getBaseURL(), 'ssp/'); - - $c = Configuration::loadFromArray(array('baseurlpath' => 'https://example.org/')); - $this->assertEquals($c->getBaseURL(), ''); - - $c = Configuration::loadFromArray(array('baseurlpath' => 'http://example.org/ssp/')); - $this->assertEquals($c->getBaseURL(), 'ssp/'); - - $c = Configuration::loadFromArray(array('baseurlpath' => '')); - $this->assertEquals($c->getBaseURL(), ''); - - $c = Configuration::loadFromArray(array('baseurlpath' => '/')); - $this->assertEquals($c->getBaseURL(), ''); - - $c = Configuration::loadFromArray(array('baseurlpath' => 'simplesaml')); - $this->assertEquals($c->getBaseURL(), 'simplesaml/'); - } - /** * Test \SimpleSAML\Configuration::getBasePath() */ diff --git a/tests/lib/SimpleSAML/ModuleTest.php b/tests/lib/SimpleSAML/ModuleTest.php index 8cb330896613f2ac69410072e5155007b871d6d2..b706a43703c877b5c41eb602b98b2881289a9053 100644 --- a/tests/lib/SimpleSAML/ModuleTest.php +++ b/tests/lib/SimpleSAML/ModuleTest.php @@ -107,10 +107,13 @@ class ModuleTest extends TestCase $this->assertEquals('sspmod_core_ACL', Module::resolveClass('core:ACL', '')); // test for the $type parameter correctly translated into a path - $this->assertEquals('sspmod_core_Auth_Process_PHP', Module::resolveClass('core:PHP', 'Auth_Process')); + $this->assertEquals( + '\SimpleSAML\Module\core\Auth\Process\PHP', + Module::resolveClass('core:PHP', 'Auth_Process') + ); // test for valid subclasses - $this->assertEquals('sspmod_core_Auth_Process_PHP', Module::resolveClass( + $this->assertEquals('\SimpleSAML\Module\core\Auth\Process\PHP', Module::resolveClass( 'core:PHP', 'Auth\Process', '\SimpleSAML\Auth\ProcessingFilter' diff --git a/tests/lib/SimpleSAML/Utils/SystemTest.php b/tests/lib/SimpleSAML/Utils/SystemTest.php index e39370e941d4a5b41154fb5fbc559d0c43509be6..07424e3594f79290898de7c579616361b6b5f0e8 100644 --- a/tests/lib/SimpleSAML/Utils/SystemTest.php +++ b/tests/lib/SimpleSAML/Utils/SystemTest.php @@ -214,6 +214,10 @@ class SystemTest extends TestCase */ public function testGetTempDirBadOwner() { + if (!function_exists('posix_getuid')) { + static::markTestSkipped('POSIX-functions not available; skipping!'); + } + $bad_uid = posix_getuid() + 1; $tempdir = $this->root_directory . DIRECTORY_SEPARATOR . self::DEFAULTTEMPDIR; diff --git a/tests/modules/consent/lib/Auth/Process/ConsentTest.php b/tests/modules/consent/lib/Auth/Process/ConsentTest.php index 1e06862d3e8684deca263d92e8879e07c8d736fd..c74696d7cc873de35a8c726bed747744c108cba5 100644 --- a/tests/modules/consent/lib/Auth/Process/ConsentTest.php +++ b/tests/modules/consent/lib/Auth/Process/ConsentTest.php @@ -15,7 +15,8 @@ class ConsentTest extends TestCase { public function setUp() { - $this->config = Configuration::loadFromArray(array(), '[ARRAY]', 'simplesaml'); + $this->config = Configuration::loadFromArray(array('module.enable' => array('consent' => true)), '[ARRAY]', 'simplesaml'); + \SimpleSAML_Configuration::setPreLoadedConfig($this->config, 'config.php'); } /** @@ -185,7 +186,7 @@ class ConsentTest extends TestCase $reflection = new \ReflectionClass('\SimpleSAML\Module\consent\Auth\Process\Consent'); foreach (array( - '_includeValues', '_checked', '_focus', '_hiddenAttributes', '_noconsentattributes', '_showNoConsentAboutService' + 'includeValues', 'checked', 'focus', 'hiddenAttributes', 'noconsentattributes', 'showNoConsentAboutService' ) as $v) { $instanceVars[$v] = $reflection->getProperty($v); $instanceVars[$v]->setAccessible(true); @@ -203,15 +204,15 @@ class ConsentTest extends TestCase $testcase = $reflection->newInstance($config, null); - $this->assertEquals($instanceVars['_includeValues']->getValue($testcase), $config['includeValues']); - $this->assertEquals($instanceVars['_checked']->getValue($testcase), $config['checked']); - $this->assertEquals($instanceVars['_focus']->getValue($testcase), $config['focus']); - $this->assertEquals($instanceVars['_hiddenAttributes']->getValue($testcase), $config['hiddenAttributes']); - $this->assertEquals($instanceVars['_noconsentattributes']->getValue($testcase), $config['attributes.exclude']); - $this->assertEquals($instanceVars['_showNoConsentAboutService']->getValue($testcase), $config['showNoConsentAboutService']); + $this->assertEquals($instanceVars['includeValues']->getValue($testcase), $config['includeValues']); + $this->assertEquals($instanceVars['checked']->getValue($testcase), $config['checked']); + $this->assertEquals($instanceVars['focus']->getValue($testcase), $config['focus']); + $this->assertEquals($instanceVars['hiddenAttributes']->getValue($testcase), $config['hiddenAttributes']); + $this->assertEquals($instanceVars['noconsentattributes']->getValue($testcase), $config['attributes.exclude']); + $this->assertEquals($instanceVars['showNoConsentAboutService']->getValue($testcase), $config['showNoConsentAboutService']); $deprecated = $reflection->newInstance(array('noconsentattributes' => $config['attributes.exclude'],), null); - $this->assertEquals($instanceVars['_noconsentattributes']->getValue($deprecated), $config['attributes.exclude']); + $this->assertEquals($instanceVars['noconsentattributes']->getValue($deprecated), $config['attributes.exclude']); } } diff --git a/tests/www/TemplateTest.php b/tests/www/TemplateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dda326a62788f6639985dfe2fca869f6a3155589 --- /dev/null +++ b/tests/www/TemplateTest.php @@ -0,0 +1,66 @@ +<?php +/** + * Simple test for syntax-checking Twig-templates. + * + * @author Tim van Dijen <tvdijen@gmail.com> + * @package SimpleSAMLphp + */ + +namespace SimpleSAML\Test\Web; + +use PHPUnit\Framework\TestCase; + +use \SimpleSAML\Configuration; +use \SimpleSAML\XHTML\Template; +use \SimpleSAML\Module; + +class TemplateTest extends TestCase +{ + public function testSyntax() + { + $config = Configuration::loadFromArray([ + 'language.i18n.backend' => 'gettext/gettext', + 'module.enable' => array_fill_keys(Module::getModules(), true), + ]); + Configuration::setPreLoadedConfig($config); + + $basedir = dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'templates'; + + // Base templates + $files = array_diff(scandir($basedir), array('.', '..')); + foreach ($files as $file) { + if (preg_match('/.twig$/', $file)) { + $t = new Template($config, $file); + ob_start(); + try { + $t->show(); + $this->addToAssertionCount(1); + } catch (\Twig_Error_Syntax $e) { + $this->fail($e->getMessage().' in '.$e->getFile().':'.$e->getLine()); + } + ob_end_clean(); + } + } + + // Module templates + foreach (Module::getModules() as $module) { + $basedir = Module::getModuleDir($module).DIRECTORY_SEPARATOR.'templates'; + if (file_exists($basedir)) { + $files = array_diff(scandir($basedir), array('.', '..')); + foreach ($files as $file) { + if (preg_match('/.twig$/', $file)) { + $t = new Template($config, $module.':'.$file); + ob_start(); + try { + $t->show(); + $this->addToAssertionCount(1); + } catch (\Twig_Error_Syntax $e) { + $this->fail($e->getMessage().' in '.$e->getFile().':'.$e->getLine()); + } + ob_end_clean(); + } + } + } + } + } +} diff --git a/www/admin/index.php b/www/admin/index.php index 28bec413bc6c1e4bb85438eca84abd68b9ad4054..ca17976f222ffac5f04761ec42bd114b5711d82b 100644 --- a/www/admin/index.php +++ b/www/admin/index.php @@ -16,12 +16,14 @@ $adminpages = array( 'sandbox.php' => 'Sandbox for testing changes to layout and css', ); +$logouturl = \SimpleSAML\Utils\Auth::getAdminLogoutURL(); + $template = new \SimpleSAML\XHTML\Template($config, 'index.php'); $template->data['pagetitle'] = 'Admin'; $template->data['adminpages'] = $adminpages; $template->data['remaining'] = $session->getAuthData('admin', 'Expire') - time(); $template->data['valid'] = 'na'; -$template->data['logout'] = null; +$template->data['logouturl'] = $logouturl; $template->show(); diff --git a/www/assets/css/src/default.css b/www/assets/css/src/default.css index ae1ae6ef379cbd42cd41f8bc18b64a98ac591569..f1721e22eb9089b4e717a7177bfd0c38dc3d94f7 100644 --- a/www/assets/css/src/default.css +++ b/www/assets/css/src/default.css @@ -233,6 +233,13 @@ This styles the menu heading. color: #fff; margin: 0; } +.frontpage-menu .pure-menu-item { + border-bottom: 1px solid lightgrey; +} +.frontpage-menu .pure-menu-selected { + border-bottom: 1px solid black; + font-weight: bold; +} /* -- Dynamic Button For Responsive Menu -------------------------------------*/ @@ -362,12 +369,6 @@ CONTENT margin-top: 2em; width: 35%; } -.pure-menu-item { - border-bottom: 1px solid lightgrey; -} -.pure-menu-item:last-child { - border-bottom: none; -} .code-box{ border:1px solid #ccc; margin-bottom: 1em; @@ -652,3 +653,8 @@ dt { .entity-expired { color: #500; } +div.preferredidp { + border: 1px dashed #ccc; + background: #eee; + padding: 2px 2em 2px 2em; +} diff --git a/www/errorreport.php b/www/errorreport.php index 4ffe52452765c566be4f4422d3da2bec0e804046..303c978772087168e80c609dcf958fce6978a637 100644 --- a/www/errorreport.php +++ b/www/errorreport.php @@ -69,11 +69,11 @@ $message = <<<MESSAGE <p>Track ID:</p> <pre>%s</pre> -<p>Version: <tt>%s</tt></p> +<p>Version: <code>%s</code></p> -<p>Report ID: <tt>%s</tt></p> +<p>Report ID: <code>%s</code></p> -<p>Referer: <tt>%s</tt></p> +<p>Referer: <code>%s</code></p> <hr /> <div class="footer"> diff --git a/www/saml2/idp/ArtifactResolutionService.php b/www/saml2/idp/ArtifactResolutionService.php index 975e8d8260d2a5851cd37d8afef44d59679cf772..16a99dc62e1285bb179ff4d8cd46ba8c44c26410 100644 --- a/www/saml2/idp/ArtifactResolutionService.php +++ b/www/saml2/idp/ArtifactResolutionService.php @@ -47,7 +47,7 @@ if (!($request instanceof \SAML2\ArtifactResolve)) { } $issuer = $request->getIssuer(); -$spMetadata = $metadata->getMetadataConfig($issuer, 'saml20-sp-remote'); +$spMetadata = $metadata->getMetaDataConfig($issuer, 'saml20-sp-remote'); $artifact = $request->getArtifact(); diff --git a/yarn.lock b/yarn.lock index 2a21e9b3d830371a608dd0625e37d500fea2651d..1cbf92fed61b4dd0485ad90bf63e12791efecf7e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,415 +2,147 @@ # yarn lockfile v1 -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - ansicolors@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" + integrity sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8= -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - -are-we-there-yet@~1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -async@0.2.x: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - -bindings@1.2.x: - version "1.2.1" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11" - -bl@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.1.tgz#cac328f7bee45730d404b692203fcb590e172d5e" +async@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" + integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ== dependencies: - readable-stream "^2.0.5" + lodash "^4.17.10" -cardinal@0.4.x: - version "0.4.4" - resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-0.4.4.tgz#ca5bb68a5b511b90fe93b9acea49bdee5c32bfe2" +cardinal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9" + integrity sha1-UOIcGwqjdyn5N33vGWtanOyTLuk= dependencies: ansicolors "~0.2.1" - redeyed "~0.4.0" - -chownr@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + redeyed "~1.0.0" -clipboard@^1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-1.7.1.tgz#360d6d6946e99a7a1fef395e42ba92b5e9b5a16b" +clipboard@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.1.tgz#a12481e1c13d8a50f5f036b0560fe5d16d74e46a" + integrity sha512-7yhQBmtN+uYZmfRjjVjKa0dZdWuabzpSKGtyQZN+9C8xlC788SSJjOHWh7tzurfwTqTD5UDYAhIv5fRJg3sHjQ== dependencies: good-listener "^1.2.2" select "^1.1.2" tiny-emitter "^2.0.0" -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -csv-parse@^1.1.7: - version "1.3.3" - resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-1.3.3.tgz#d1cfd8743c2f849a0abb2fd544db56695d19a490" - -deep-extend@~0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" +csv-parse@^2.0.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-2.5.0.tgz#65748997ecc3719c594622db1b9ea0e2eb7d56bb" + integrity sha512-4OcjOJQByI0YDU5COYw9HAqjo8/MOLLmT9EKyMCXUzgvh30vS1SlMK+Ho84IH5exN44cSnrYecw/7Zpu2m4lkA== delegate@^3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.1.3.tgz#9a8251a777d7025faa55737bc3b071742127a9fd" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + version "3.2.0" + resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" + integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206" - dependencies: - once "^1.4.0" - -esprima@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad" - -expand-template@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-1.1.0.tgz#e09efba977bf98f9ee0ed25abd0c692e02aec3fc" +esprima@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" + integrity sha1-U88kes2ncxPlUcOqLnM0LT+099k= font-awesome@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -github-from-package@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM= good-listener@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" + integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA= dependencies: delegate "^3.1.2" -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -humanize@0.0.x: +humanize@^0.0.9: version "0.0.9" resolved "https://registry.yarnpkg.com/humanize/-/humanize-0.0.9.tgz#1994ffaecdfe9c441ed2bdac7452b7bb4c9e41a4" + integrity sha1-GZT/rs3+nEQe0r2sdFK3u0yeQaQ= -inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" +jquery-ui@^1.12.1: + version "1.12.1" + resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.12.1.tgz#bcb4045c8dd0539c134bc1488cdd3e768a7a9e51" + integrity sha1-vLQEXI3QU5wTS8FIjN0+dop6nlE= -ini@~1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" +jquery@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca" + integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg== -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -jquery-ui@^1.10.4: - version "1.10.4" - resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.10.4.tgz#a096fe5f4e0f2ab69a0585cf10455877f57506bd" - -jquery@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.2.1.tgz#5c4d9de652af6cd0a770154a631bba12b015c787" +lodash@^4.17.10: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== microplugin@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/microplugin/-/microplugin-0.0.3.tgz#1fc2e1bb7c9e19e82bd84bba9137bbe71250d8cd" - -microtime@^2.1.0: - version "2.1.6" - resolved "https://registry.yarnpkg.com/microtime/-/microtime-2.1.6.tgz#76047a03f91ced5abb2e5367e5f1df2ede756bae" - dependencies: - bindings "1.2.x" - nan "2.6.x" - prebuild-install "^2.1.0" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-H8Lhu3yeGegr2Eu6kTe75xJQ2M0= minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -nan@2.6.x: - version "2.6.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" - -node-abi@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.1.1.tgz#c9cda256ec8aa99bcab2f6446db38af143338b2a" - -noop-logger@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" - -npmlog@^4.0.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" +nan@2.9.x: + version "2.9.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.9.2.tgz#f564d75f5f8f36a6d9456cca7a6c4fe488ab7866" + integrity sha512-ltW65co7f3PQWBDbqVvaU1WtFJUsNW7sWWm4HINhbMQIyVyzIeyZ8toX5TC5eeooE6piZoaEh4cZkueSKG3KYw== -object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -optimist@0.6.x: +optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= dependencies: minimist "~0.0.1" wordwrap "~0.0.2" -os-homedir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - -prebuild-install@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-2.3.0.tgz#19481247df728b854ab57b187ce234211311b485" - dependencies: - expand-template "^1.0.2" - github-from-package "0.0.0" - minimist "^1.2.0" - mkdirp "^0.5.1" - node-abi "^2.1.1" - noop-logger "^0.1.1" - npmlog "^4.0.1" - os-homedir "^1.0.1" - pump "^1.0.1" - rc "^1.1.6" - simple-get "^1.4.2" - tar-fs "^1.13.0" - tunnel-agent "^0.6.0" - xtend "4.0.1" - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -pump@^1.0.0, pump@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.2.tgz#3b3ee6512f94f0e575538c17995f9f16990a5d51" - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - purecss@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/purecss/-/purecss-1.0.0.tgz#3dbcd9e2a7592448a69acb705cce16311bf4b785" + integrity sha512-gfC78WCOWNnfkzulx9aoWwcl+0JflhwKeJ+k9s/ZyIawfYNA4bqBmt0DtfgtQK9iuYMtGfbdE8R2AQMjSWR2VQ== -rc@^1.1.6: - version "1.2.2" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.2.tgz#d8ce9cb57e8d64d9c7badd9876c7c34cbe3c7077" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.0.6: - version "2.3.3" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - -redeyed@~0.4.0: - version "0.4.4" - resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-0.4.4.tgz#37e990a6f2b21b2a11c2e6a48fd4135698cba97f" +redeyed@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" + integrity sha1-6WwZO0DAgWsArshCaY5hGF5VSYo= dependencies: - esprima "~1.0.4" - -safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + esprima "~3.0.0" select@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" + integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= -selectize@^0.12.4: - version "0.12.4" - resolved "https://registry.yarnpkg.com/selectize/-/selectize-0.12.4.tgz#50c697526b609dea11da153cf7252b98948f4c0e" +selectize@^0.12.6: + version "0.12.6" + resolved "https://registry.yarnpkg.com/selectize/-/selectize-0.12.6.tgz#c2cf08cbaa4cb06c5e99bb452919d71b080690d6" + integrity sha512-bWO5A7G+I8+QXyjLfQUgh31VI4WKYagUZQxAXlDyUmDDNrFxrASV0W9hxCOl0XJ/XQ1dZEu3G9HjXV4Wj0yb6w== dependencies: microplugin "0.0.3" sifter "^0.5.1" -set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - sifter@^0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/sifter/-/sifter-0.5.2.tgz#4702e3cee3036903da1f194b29e6dc7a4fb59abe" + version "0.5.3" + resolved "https://registry.yarnpkg.com/sifter/-/sifter-0.5.3.tgz#5e6507fe8c114b2b28d90b6bf4e5b636e611e48b" + integrity sha1-XmUH/owRSyso2Qtr9OW2NuYR5Is= dependencies: - async "0.2.x" - cardinal "0.4.x" - csv-parse "^1.1.7" - humanize "0.0.x" - optimist "0.6.x" - optionalDependencies: - microtime "^2.1.0" - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -simple-get@^1.4.2: - version "1.4.3" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-1.4.3.tgz#e9755eda407e96da40c5e5158c9ea37b33becbeb" - dependencies: - once "^1.3.1" - unzip-response "^1.0.0" - xtend "^4.0.0" - -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -tar-fs@^1.13.0: - version "1.16.0" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.0.tgz#e877a25acbcc51d8c790da1c57c9cf439817b896" - dependencies: - chownr "^1.0.1" - mkdirp "^0.5.1" - pump "^1.0.0" - tar-stream "^1.1.2" - -tar-stream@^1.1.2: - version "1.5.4" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.5.4.tgz#36549cf04ed1aee9b2a30c0143252238daf94016" - dependencies: - bl "^1.0.0" - end-of-stream "^1.0.0" - readable-stream "^2.0.0" - xtend "^4.0.0" + async "^2.6.0" + cardinal "^1.0.0" + csv-parse "^2.0.0" + humanize "^0.0.9" + optimist "^0.6.1" tiny-emitter@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.0.2.tgz#82d27468aca5ade8e5fd1e6d22b57dd43ebdfb7c" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - dependencies: - safe-buffer "^5.0.1" - -unzip-response@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -wide-align@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" - dependencies: - string-width "^1.0.2" + integrity sha512-2NM0auVBGft5tee/OxP4PI3d8WItkDM+fPnaRAVo6xTDI2knbz9eC5ArWGqtGlYqiH3RU5yMpdyTTO7MguC4ow== wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -xtend@4.0.1, xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc=