From 49e637d244cf59afaace2cd3e1e8178fac4c411c Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 10 Nov 2022 11:36:56 +1300 Subject: [PATCH 1/2] MNT Explicitly test with blowfish --- tests/php/Security/SecurityDefaultAdminTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/php/Security/SecurityDefaultAdminTest.php b/tests/php/Security/SecurityDefaultAdminTest.php index ec691936b..082e7895b 100644 --- a/tests/php/Security/SecurityDefaultAdminTest.php +++ b/tests/php/Security/SecurityDefaultAdminTest.php @@ -7,6 +7,7 @@ use SilverStripe\Security\Member; use SilverStripe\Security\PasswordEncryptor; use SilverStripe\Security\Permission; use SilverStripe\Security\DefaultAdminService; +use SilverStripe\Security\Security; class SecurityDefaultAdminTest extends SapphireTest { @@ -35,6 +36,7 @@ class SecurityDefaultAdminTest extends SapphireTest $this->defaultUsername = null; $this->defaultPassword = null; } + Security::config()->set('password_encryption_algorithm', 'blowfish'); DefaultAdminService::setDefaultAdmin('admin', 'password'); Permission::reset(); } From 78b661dcf6fa931c8324b65672e00fdcc585b9c0 Mon Sep 17 00:00:00 2001 From: Lee Bradley Date: Wed, 9 Nov 2022 15:36:10 +0000 Subject: [PATCH 2/2] Prevent infinite loop when getting table name for ComponentID If the field isn't in the first 2 classes then would just continue to loop Fix means it will continue going to parent classes Can be seen in the UsedOnTable in `admin` module if you have injected a new `Image` class that extends the built in one --- src/ORM/RelatedData/StandardRelatedDataService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ORM/RelatedData/StandardRelatedDataService.php b/src/ORM/RelatedData/StandardRelatedDataService.php index 2c3eab624..04501fc23 100644 --- a/src/ORM/RelatedData/StandardRelatedDataService.php +++ b/src/ORM/RelatedData/StandardRelatedDataService.php @@ -162,7 +162,7 @@ class StandardRelatedDataService implements RelatedDataService $tableName = $this->dataObjectSchema->tableName($candidateClass); break; } - $candidateClass = get_parent_class($class ?? ''); + $candidateClass = get_parent_class($candidateClass ?? ''); } return $tableName; }