diff --git a/.travis.yml b/.travis.yml index e89dadf..3c0445b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ jobs: dist: jammy - php: '8.2' dist: jammy + - php: '8.3' + dist: jammy before_script: composer install script: diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 577c9de..0000000 --- a/CHANGELOG +++ /dev/null @@ -1,9 +0,0 @@ -20131210 Steve Moitozo - - Resolved security issue (defect #9 - identified by alanabarrett0). - - Expanded the use of the salted hash to ensure that an attacker cannot change the uid of the authenticated Drupal user by manipulating the value of a cookie. - - Modified files: - drupal_module/drupalauth4ssp/drupalauth4ssp.module - concatenate uid with salt before hashing - lib/Auth/Source/External.php - concatenate uid with salt before hashing and minor adjustments diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4b4b33a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +See the main [README.md](./README.md#branch-and-version-naming) for the details about version naming. + + +## [Unreleased] + + +## [2.10.0] +### Fixed +- Restored SimpleSAMLphp exception handler (#29, #35) +- Bootstrap Drupal correctly from inside SimpleSAMLphp (#75, #98) + + +## [2.10.0-rc.1] diff --git a/composer.json b/composer.json index 95b3153..a6d58b6 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,10 @@ }, "config": { "allow-plugins": { - "simplesamlphp/composer-module-installer": true + "simplesamlphp/composer-module-installer": true, + "composer/installers": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "simplesamlphp/composer-xmlprovider-installer": true } } } diff --git a/src/DrupalHelper.php b/src/DrupalHelper.php index 8488c55..a704637 100644 --- a/src/DrupalHelper.php +++ b/src/DrupalHelper.php @@ -3,7 +3,9 @@ namespace SimpleSAML\Module\drupalauth; use Drupal\Core\DrupalKernel; +use Drupal\Core\Routing\RouteObjectInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Route; class DrupalHelper { @@ -13,6 +15,8 @@ class DrupalHelper * Boot Drupal. * * @param string $drupalRoot Path to Drupal root. + * + * @see \Drupal\Core\Test\FunctionalTestSetupTrait::initKernel() */ public function bootDrupal(string $drupalRoot) { @@ -22,8 +26,12 @@ public function bootDrupal(string $drupalRoot) chdir($drupalRoot); $kernel = DrupalKernel::createFromRequest($request, $autoloader, 'prod', true, $drupalRoot); $kernel->boot(); - $kernel->loadLegacyIncludes(); + $request->attributes->set(RouteObjectInterface::ROUTE_OBJECT, new Route('')); + $request->attributes->set(RouteObjectInterface::ROUTE_NAME, ''); + $kernel->preHandle($request); chdir($originalDir); + \restore_exception_handler(); + \restore_error_handler(); } /**