Skip to content

Commit 857ad8c

Browse files
committed
Merge branch 'release' into 'master'
PB-43748 Merge release into master (v5.3.1) See merge request passbolt/passbolt-ce-api!408
2 parents 4b926e0 + 88d4f8f commit 857ad8c

File tree

7 files changed

+48
-42
lines changed

7 files changed

+48
-42
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [5.3.1] - 2025-07-09
6+
### Fixed
7+
- PB-43748 Users are unable to save a new standalone custom field resource
8+
59
## [5.3.0] - 2025-07-09
610
### Added
711
- PB-43066 As a developer I can setup my development environment using ddev

RELEASE_NOTES.md

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,9 @@
1-
Release song: https://www.youtube.com/watch?v=ubWL8VAPoYw
1+
Release song: https://www.youtube.com/watch?v=h7V36waLN0M
22

3-
Passbolt 5.3 adds custom fields, one of the five most‑requested features from the community.
4-
Built on top of encrypted‑metadata introduced earlier this year, custom fields let users attach
5-
additional key‑value pairs to a resource or as a standalone one.
6-
Typical use‑cases include centralising CI/CD job variables and storing environment‑specific
7-
configuration values that need more structure than a general note.
3+
This hot-fix resolves a regression introduced in v5.3.0 that blocked the creation of standalone Custom Fields content types. A validation error in the API prevented these resources from being saved. With v5.3.1, the validation logic has been corrected, so users can now create and test Custom Fields content types as intended.
84

9-
As part of our continuous performance work, this release concentrates on folder browsing.
10-
Loading folders and their resources is now faster and reduces the load on API and client,
11-
improving day-to-day usability for organizations having thousands of credentials under management.
12-
13-
Several bugs reported by the community have also been fixed. As always, thank you to everyone who
14-
took the time to file issues, test patches and suggest improvements.
15-
For a complete list of changes, consult the changelog.
16-
17-
## [5.3.0] - 2025-07-09
18-
### Added
19-
- PB-43066 As a developer I can setup my development environment using ddev
20-
- PB-43188 Adds Custom Fields Standalone resource type migration
21-
- PB-43383 Improves the performance of most paginated endpoints
22-
- PB-43659 Improve error handling when metadata key could not be saved due to unexpected reason
5+
Thank you to everyone in the community who spotted the issue so quickly and helped us verify the fix!
236

7+
## [5.3.1] - 2025-07-09
248
### Fixed
25-
- PB-43382 As an administrator I should not get a connection error when running the healthcheck when the database is empty
26-
- PB-43007 Fixes emails not sent after v5 upgrade if SMTP credentials are stored in environment variables (GITHUB #545)
27-
- PB-43122 As an administrator retrieving users metadata key, I should not trigger a validation type issue on the missing metadata_keys_id in certain conditions
28-
- PB-43137 Fixes a potential settings conflict in user key policy where key of type rsa should not have a preferred curve
29-
- PB-42784 As an administrator I should not get a health check error when all email notifications are enabled
30-
- PB-43259 Fixes a record not found error on table `organization_settings` in healthcheck after v5 upgrade (GITHUB #548)
31-
- PB-42072 As a user sharing permissions, I should not get a 500 response if the payload is wrongly formatted
32-
- PB-42071 Fixes 500 errors on malformed UTF-8 character-based URLs when using the JsonTraceFormatter class
33-
- PB-43659 Improves the error catching on creation of organization metadata key
34-
35-
### Maintenance
36-
- PB-42177 Upgrades CakePHP version to 5.2.5
37-
- PB-43010 Replaces the use of static fixtures with fixture factories in multiple test cases
38-
- PB-41724 Map _cake_core_ cache config with _cake_translations_ in the bootstrap.php file
39-
- PB-42380 Adds the missing v5 resource types on data insertion in the passbolt-test-data vendor
40-
- PB-43658 Use FQN to load all vendor plugin
9+
- PB-43748 Users are unable to save a new standalone custom field resource

config/version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
return [
33
'passbolt' => [
4-
'version' => '5.3.0',
5-
'name' => 'Riders on the Storm',
4+
'version' => '5.3.1',
5+
'name' => 'Beautiful People',
66
],
77
'php' => [
88
'minVersion' => '8.2',

plugins/PassboltCe/Metadata/tests/TestCase/Controller/Resources/ResourcesAddControllerTest.php

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use App\Test\Factory\UserFactory;
2424
use App\Test\Lib\AppIntegrationTestCaseV5;
2525
use App\Test\Lib\Model\EmailQueueTrait;
26+
use App\Utility\UuidFactory;
2627
use Cake\Core\Configure;
2728
use Cake\Event\EventList;
2829
use Cake\Event\EventManager;
@@ -32,6 +33,7 @@
3233
use Passbolt\Metadata\Test\Factory\MetadataKeysSettingsFactory;
3334
use Passbolt\Metadata\Test\Factory\MetadataTypesSettingsFactory;
3435
use Passbolt\Metadata\Test\Utility\GpgMetadataKeysTestTrait;
36+
use Passbolt\ResourceTypes\Model\Entity\ResourceType;
3537
use Passbolt\ResourceTypes\ResourceTypesPlugin;
3638
use Passbolt\ResourceTypes\Test\Factory\ResourceTypeFactory;
3739

@@ -49,13 +51,35 @@ public function setUp(): void
4951
EventManager::instance()->setEventList(new EventList());
5052
}
5153

52-
public function testResourcesAddController_Success_SharedKeyType(): void
54+
public function v5ResourceTypesSlugProvider()
55+
{
56+
$resourceTypeSlugs = [];
57+
foreach (ResourceType::V5_RESOURCE_TYPE_SLUGS as $v5ResourceTypeSlug) {
58+
// simple password string isn't possible in v5
59+
if ($v5ResourceTypeSlug === ResourceType::SLUG_V5_PASSWORD_STRING) {
60+
continue;
61+
}
62+
63+
$resourceTypeSlugs[] = [$v5ResourceTypeSlug];
64+
}
65+
66+
return $resourceTypeSlugs;
67+
}
68+
69+
/**
70+
* @dataProvider v5ResourceTypesSlugProvider
71+
* @return void
72+
*/
73+
public function testResourcesAddController_Success_SharedKeyType(string $resourceTypeSlug): void
5374
{
5475
MetadataTypesSettingsFactory::make()->v5()->persist();
5576
$user = UserFactory::make()->user()->persist();
5677
$metadataKey = MetadataKeyFactory::make()->withCreatorAndModifier($user)->withServerPrivateKey()->persist();
5778
$v4ResourceTypeId = ResourceTypeFactory::make()->passwordString()->persist()->get('id');
58-
$resourceTypeId = ResourceTypeFactory::make()->v5Default()->persist()->get('id');
79+
$resourceTypeId = ResourceTypeFactory::make([
80+
'id' => UuidFactory::uuid('resource-types.id.' . $resourceTypeSlug),
81+
'slug' => $resourceTypeSlug,
82+
])->persist()->get('id');
5983
$metadataKeyId = $metadataKey->get('id');
6084
$dummyResourceData = $this->getDummyResourcesPostData([
6185
'resource_type_id' => $v4ResourceTypeId, // v4 here is intentional, needed for mapping

plugins/PassboltCe/Metadata/tests/TestCase/Service/Resources/MetadataResourcesAddServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function testMetadataResourceAddService_Error_ValidationResourceTypeNotV5
210210
$this->service->add($uac, new MetadataResourceDto($payload));
211211
} catch (ValidationException $exception) {
212212
$this->assertSame(
213-
'The resource type should be one of the following: v5-password-string, v5-default, v5-totp-standalone, v5-default-with-totp, v5-custom-fields-standalone.',
213+
'The resource type should be one of the following: v5-password-string, v5-default, v5-totp-standalone, v5-default-with-totp, v5-custom-fields.',
214214
$exception->getErrors()['resource_type_id']['inList']
215215
);
216216
}

plugins/PassboltCe/ResourceTypes/src/Model/Entity/ResourceType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ResourceType extends Entity
5353
public const SLUG_V5_DEFAULT = 'v5-default';
5454
public const SLUG_V5_TOTP_STANDALONE = 'v5-totp-standalone';
5555
public const SLUG_V5_DEFAULT_WITH_TOTP = 'v5-default-with-totp';
56-
public const SLUG_V5_CUSTOM_FIELD_STANDALONE = 'v5-custom-fields-standalone';
56+
public const SLUG_V5_CUSTOM_FIELD_STANDALONE = 'v5-custom-fields';
5757
public const V5_RESOURCE_TYPE_SLUGS = [
5858
self::SLUG_V5_PASSWORD_STRING,
5959
self::SLUG_V5_DEFAULT,
@@ -124,6 +124,7 @@ public static function getV5ResourceTypes(): array
124124
UuidFactory::uuid5('resource-types.id.' . ResourceType::SLUG_V5_DEFAULT),
125125
UuidFactory::uuid5('resource-types.id.' . ResourceType::SLUG_V5_TOTP_STANDALONE),
126126
UuidFactory::uuid5('resource-types.id.' . ResourceType::SLUG_V5_DEFAULT_WITH_TOTP),
127+
UuidFactory::uuid5('resource-types.id.' . ResourceType::SLUG_V5_CUSTOM_FIELD_STANDALONE),
127128
];
128129
}
129130
}

plugins/PassboltCe/ResourceTypes/tests/Factory/ResourceTypeFactory.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ public function v5DefaultWithTotp(): self
132132
]);
133133
}
134134

135+
public function v5CustomFieldsStandalone(): self
136+
{
137+
return $this->patchData([
138+
'id' => UuidFactory::uuid('resource-types.id.' . ResourceType::SLUG_V5_CUSTOM_FIELD_STANDALONE),
139+
'slug' => ResourceType::SLUG_V5_CUSTOM_FIELD_STANDALONE,
140+
]);
141+
}
142+
135143
public function deleted(?Date $deleted = null): self
136144
{
137145
if (is_null($deleted)) {

0 commit comments

Comments
 (0)