Skip to content

Commit 727e938

Browse files
committed
Merge branch 'release' into 'master'
v4.8.0 on master See merge request passbolt/passbolt-ce-api!289
2 parents 220a504 + 3b8f68f commit 727e938

File tree

113 files changed

+2323
-706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+2323
-706
lines changed

CHANGELOG.md

+54
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,60 @@
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+
## [4.8.0] - 2024-05-21
6+
### Added
7+
- PB-33071 As an administrator I can purge the action logs table with a dedicated command
8+
- PB-33231 As an administrator I want to know if a custom certificate is in use for SMTP
9+
- PB-32579 As an administrator I can view email_queue records via passbolt command
10+
11+
### Improved
12+
- PB-32888 As an admin I should not get a time-out on health checks on air-gapped network
13+
- PB-32983 Access email settings only when emails are sent
14+
15+
### Fixed
16+
- PB-33451 Fix 500 error on authentication when nonce is not a string
17+
- PB-33073 As a user logging in, invalid login operation should not be logged as success in the audit logs
18+
- PB-33234 The application should not throw an error if the JWT public key is not parsable
19+
20+
### Maintenance
21+
- PB-30314 Bump passbolt/passbolt-test-data to v4.8
22+
23+
## [4.8.0-rc.1] - 2024-05-17
24+
### Added
25+
- PB-33071 As an administrator I can purge the action logs table with a dedicated command
26+
- PB-33231 As an administrator I want to know if a custom certificate is in use for SMTP
27+
- PB-32579 As an administrator I can view email_queue records via passbolt command
28+
29+
### Improved
30+
- PB-32888 As an admin I should not get a time-out on health checks on air-gapped network
31+
- PB-32983 Access email settings only when emails are sent
32+
33+
### Fixed
34+
- PB-33451 Fix 500 error on authentication when nonce is not a string
35+
- PB-33073 As a user logging in, invalid login operation should not be logged as success in the audit logs
36+
- PB-33234 The application should not throw an error if the JWT public key is not parsable
37+
38+
### Maintenance
39+
- PB-30314 Bump passbolt/passbolt-test-data to v4.8
40+
41+
## [4.8.0-test.1] - 2024-05-16
42+
### Added
43+
- PB-33071 As an administrator I can purge the action logs table with a dedicated command
44+
- PB-33231 As an administrator I want to know if a custom certificate is in use for SMTP
45+
- PB-32579 As an administrator I can view email_queue records via passbolt command
46+
47+
### Improved
48+
- PB-32888 As an admin I should not get a time-out on health checks on air-gapped network
49+
- PB-32983 Access email settings only when emails are sent
50+
51+
### Fixed
52+
- PB-33451 Fix 500 error on authentication when nonce is not a string
53+
- PB-33073 As a user logging in, invalid login operation should not be logged as success in the audit logs
54+
- PB-33234 The application should not throw an error if the JWT public key is not parsable
55+
56+
### Maintenance
57+
- PB-30314 Bump passbolt/passbolt-test-data to v4.8
58+
559
## [4.7.0] - 2024-04-30
660
### Added
761
- PB-30330 Add HTTP HEAD method support to /healthcheck/status.json to support more uptime monitoring tools (GITHUB #507)

RELEASE_NOTES.md

+33-19
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,42 @@
1-
Release song: https://youtu.be/3L4YrGaR8E4
1+
Release song: https://youtu.be/hbe3CQamF8k
22

3-
Passbolt Community Edition v4.7 is a maintenance release that resolves multiple issues identified by the community. Furthermore, this release supports the commitment to improving customization options and integration features, making it easier for organizations to tailor the system to their specific needs.
3+
Passbolt v4.8.0 is a maintenance release focusing on the migration of the browser extension to the latest MV3
4+
architecture and adding tools for administrators to help them manage their instance.
45

5-
A key enhancement in this release is the ability to use custom SSL certificates for SMTP server connections. This long-awaited feature is particularly beneficial for organizations operating in air-gapped environments or those using their own root CAs, enabling passbolt to more securely integrate with internal tools.
6+
This release marks the introduction of the first version of the MV3 extension for Chrome. The transition to MV3 has been
7+
in progress since last year, with changes rolled out progressively until now. The base code between MV2 and MV3 is
8+
nearly identical, and both extensions will continue to be maintained in parallel. A detailed blog post explaining our
9+
migration process will be coming soon.
610

7-
## [4.7.0] - 2024-04-30
11+
A new feature allowing administrators to purge audit logs from the command line was added. This will help reclaim database
12+
space for logs that are no longer relevant, improving the performance of long-running instances while keeping necessary
13+
logs for forensic and audit activities.
14+
15+
A new command has also been added to help administrators debug issues with their SMTP server. Email functionality is
16+
crucial for Passbolt, and diagnosing connection problems is not always straightforward. This new command aims to simplify
17+
the process when connecting to a new SMTP server as well as understand errors that could occur on existing integration.
18+
19+
As passbolt moves towards supporting more content types this year, significant work has been done to enhance performance
20+
across the entire stack, from the database to the API and the browser extension. This release includes some of these
21+
improvements, with more enhancements on the way in the next coming release v4.9.0.
22+
23+
We hope these updates enhance your experience with Passbolt. Your feedback is always valuable to us.
24+
25+
26+
## [4.8.0] - 2024-05-21
827
### Added
9-
- PB-30330 Add HTTP HEAD method support to /healthcheck/status.json to support more uptime monitoring tools (GITHUB #507)
10-
- PB-26156 As an administrator I can configure SMTP to use TLS with a self-signed cert on my mail server (GITHUB #498)
28+
- PB-33071 As an administrator I can purge the action logs table with a dedicated command
29+
- PB-33231 As an administrator I want to know if a custom certificate is in use for SMTP
30+
- PB-32579 As an administrator I can view email_queue records via passbolt command
1131

12-
### Security
13-
- PB-30255 As an authenticated user I cannot access to the healthcheck endpoint when debug is on
32+
### Improved
33+
- PB-32888 As an admin I should not get a time-out on health checks on air-gapped network
34+
- PB-32983 Access email settings only when emails are sent
1435

1536
### Fixed
16-
- PB-30379 As an authenticating user I should not get a 500 if the gpg_auth is not an array
17-
- PB-32889 As an administrator I should not get an exception when running core healthcheck and the host cannot be resolved
18-
- PB-32928 As user I should see the accurate URL in the email footer when passbolt runs on multiple instances
19-
- PB-32566 As a user setting up my account I should not get an unexpected 500
20-
- PB-32903 Fix deprecation error on password expiry settings validation
37+
- PB-33451 Fix 500 error on authentication when nonce is not a string
38+
- PB-33073 As a user logging in, invalid login operation should not be logged as success in the audit logs
39+
- PB-33234 The application should not throw an error if the JWT public key is not parsable
2140

2241
### Maintenance
23-
- PB-29983 Refactor health check code domain for better maintenance
24-
- PB-30394 Moves code in ActionLogsModelListener into a dedicated service
25-
- PB-32881 Disable by default all plugins in integration tests
26-
- PB-32978 Use dependency proxy to reduce docker pull limit
27-
- PB-22605 Refactor ShareSearchControllerTest, SecretViewControllerTest and GroupsDeleteControllerTest with fixture factories
28-
- PB-32594 Add tests for SecretCreateService
42+
- PB-30314 Bump passbolt/passbolt-test-data to v4.8

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"phpunit/phpunit": "~9.5.2",
110110
"cakephp/cakephp-codesniffer": "^4.5",
111111
"passbolt/passbolt-selenium-api": "^4.5",
112-
"passbolt/passbolt-test-data": "^4.4",
112+
"passbolt/passbolt-test-data": "^4.8",
113113
"vierge-noire/cakephp-fixture-factories": "^v2.9.3",
114114
"cakephp/localized": "4.0.0",
115115
"vimeo/psalm": "^5.0.0",

composer.lock

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/version.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
return [
33
'passbolt' => [
4-
'version' => '4.7.0',
5-
'name' => 'Bulls On Parade',
4+
'version' => '4.8.0',
5+
'name' => 'Angel',
66
],
77
'php' => [
88
'minVersion' => '7.4',

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"jquery": "^3.5.1",
2525
"lockfile-lint": "^4.12.1",
2626
"openpgp": "5.2.1",
27-
"passbolt-styleguide": "^4.7.0"
27+
"passbolt-styleguide": "^4.8.0"
2828
},
2929
"scripts": {
3030
"lint": "npm run lint:lockfile",

plugins/PassboltCe/EmailDigest/tests/Factory/EmailQueueFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected function setDefaultTemplate(): void
5555

5656
return [
5757
'email' => $email,
58-
'subject' => $faker->word(),
58+
'subject' => $faker->sentence(3),
5959
'config' => 'default',
6060
'template' => 'test_email',
6161
'layout' => 'default',

plugins/PassboltCe/EmailNotificationSettings/src/Utility/EmailNotificationSettings.php

+20-36
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,13 @@ class EmailNotificationSettings
3232
{
3333
public const NAMESPACE = 'emailNotification';
3434

35-
/**
36-
* The settings.
37-
*
38-
* @var array|null
39-
*/
40-
private static $settings;
35+
private static ?array $settings = null;
4136

42-
/**
43-
* @var \Passbolt\EmailNotificationSettings\Utility\NotificationSettingsSource\ConfigEmailNotificationSettingsSource|null
44-
*/
45-
private static $configSettingsSource = null;
37+
private static ?ConfigEmailNotificationSettingsSource $configSettingsSource = null;
4638

47-
/**
48-
* @var \Passbolt\EmailNotificationSettings\Utility\NotificationSettingsSource\DbEmailNotificationSettingsSource|null
49-
*/
50-
private static $dbSettingsSource = null;
39+
private static ?DbEmailNotificationSettingsSource $dbSettingsSource = null;
5140

52-
/**
53-
* @var \Passbolt\EmailNotificationSettings\Utility\NotificationSettingsSource\DefaultEmailNotificationSettingsSource|null
54-
*/
55-
private static $defaultSettingsSource = null;
41+
private static ?DefaultEmailNotificationSettingsSource $defaultSettingsSource = null;
5642

5743
/**
5844
* Flush the cache version of the settings.
@@ -74,7 +60,7 @@ public static function flushCache()
7460
* 2. configuration file
7561
* 3. the defaults in this function
7662
*
77-
* @param string $key (optional) Key to lookup. If not provided, return all the settings.
63+
* @param ?string $key (optional) Key to lookup. If not provided, return all the settings.
7864
* @return mixed
7965
*/
8066
public static function get(?string $key = null)
@@ -100,21 +86,19 @@ public static function get(?string $key = null)
10086
*
10187
* @return array
10288
*/
103-
protected static function getSettings()
89+
protected static function getSettings(): array
10490
{
10591
$settings = static::getSettingsFromConfig();
10692
$settings['sources'] = [
10793
'database' => false,
10894
'file' => static::isDefaultSettingsAreOverridden(),
10995
];
11096

111-
if (static::getDbSettingsSource()->isAvailable()) {
112-
try {
113-
$dbSettings = static::getSettingsFromDb();
114-
$settings['sources']['database'] = true;
115-
$settings = array_replace_recursive($settings, $dbSettings);
116-
} catch (RecordNotFoundException $exception) {
117-
}
97+
try {
98+
$dbSettings = static::getSettingsFromDb();
99+
$settings['sources']['database'] = true;
100+
$settings = array_replace_recursive($settings, $dbSettings);
101+
} catch (RecordNotFoundException $exception) {
118102
}
119103

120104
return $settings;
@@ -125,7 +109,7 @@ protected static function getSettings()
125109
*
126110
* @return array
127111
*/
128-
protected static function getSettingsFromConfig()
112+
protected static function getSettingsFromConfig(): array
129113
{
130114
return static::sanitizeSettings(static::getConfigSettingsSource()->read());
131115
}
@@ -151,7 +135,7 @@ protected static function sanitizeSettings(array $settings)
151135
/**
152136
* @return \Passbolt\EmailNotificationSettings\Utility\NotificationSettingsSource\ConfigEmailNotificationSettingsSource
153137
*/
154-
protected static function getConfigSettingsSource()
138+
protected static function getConfigSettingsSource(): ConfigEmailNotificationSettingsSource
155139
{
156140
if (!isset(static::$configSettingsSource)) {
157141
static::$configSettingsSource = new ConfigEmailNotificationSettingsSource();
@@ -167,15 +151,15 @@ protected static function getConfigSettingsSource()
167151
* @throws \Cake\Datasource\Exception\RecordNotFoundException If a matching DB config doesn't exist
168152
* @throws \Cake\Http\Exception\InternalErrorException If the DB config is not valid json string
169153
*/
170-
protected static function getSettingsFromDb()
154+
protected static function getSettingsFromDb(): array
171155
{
172156
return static::sanitizeSettings(static::getDbSettingsSource()->read());
173157
}
174158

175159
/**
176160
* @return \Passbolt\EmailNotificationSettings\Utility\NotificationSettingsSource\DbEmailNotificationSettingsSource
177161
*/
178-
protected static function getDbSettingsSource()
162+
protected static function getDbSettingsSource(): DbEmailNotificationSettingsSource
179163
{
180164
if (!isset(self::$dbSettingsSource)) {
181165
self::$dbSettingsSource = new DbEmailNotificationSettingsSource();
@@ -189,15 +173,15 @@ protected static function getDbSettingsSource()
189173
*
190174
* @return array
191175
*/
192-
protected static function getSettingsFromDefault()
176+
protected static function getSettingsFromDefault(): array
193177
{
194178
return static::getDefaultSettingsSource()->read();
195179
}
196180

197181
/**
198182
* @return \Passbolt\EmailNotificationSettings\Utility\NotificationSettingsSource\DefaultEmailNotificationSettingsSource
199183
*/
200-
protected static function getDefaultSettingsSource()
184+
protected static function getDefaultSettingsSource(): DefaultEmailNotificationSettingsSource
201185
{
202186
if (!isset(static::$defaultSettingsSource)) {
203187
static::$defaultSettingsSource = DefaultEmailNotificationSettingsSource::fromCakeForm(
@@ -232,7 +216,7 @@ protected static function isDefaultSettingsAreOverridden(): bool
232216
* @param bool $force Force saving even if the key is invalid/not yet registered (useful for testing purposes)
233217
* @return void
234218
*/
235-
public static function save(array $configs, UserAccessControl $accessControl, bool $force = false)
219+
public static function save(array $configs, UserAccessControl $accessControl, bool $force = false): void
236220
{
237221
// strip all non notification keys
238222
if ($force === false) {
@@ -253,7 +237,7 @@ public static function save(array $configs, UserAccessControl $accessControl, bo
253237
* @param string $key The key to check.
254238
* @return bool
255239
*/
256-
public static function isConfigKeyValid(string $key)
240+
public static function isConfigKeyValid(string $key): bool
257241
{
258242
return Hash::check(static::getSettingsFromDefault(), static::underscoreToDottedFormat($key));
259243
}
@@ -264,7 +248,7 @@ public static function isConfigKeyValid(string $key)
264248
* @param string $key Key to normalize
265249
* @return string
266250
*/
267-
public static function underscoreToDottedFormat(string $key)
251+
public static function underscoreToDottedFormat(string $key): string
268252
{
269253
return str_replace('_', '.', $key);
270254
}

0 commit comments

Comments
 (0)