Skip to content

Commit 8091d7a

Browse files
committed
Merge remote-tracking branch 'pro/common' into develop
2 parents 4ca0553 + 9c09484 commit 8091d7a

File tree

245 files changed

+11419
-1760
lines changed

Some content is hidden

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

245 files changed

+11419
-1760
lines changed

.gitlab-ci/jobs/style_check.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
stage: unit-test
33
variables:
44
PHP_VERSION: "7.4"
5+
COMPOSER_ALLOW_SUPERUSER: 1
56
image: $CI_REGISTRY_IMAGE_TEST:$PHP_VERSION
67
allow_failure: false
78
script:
89
- composer config --global process-timeout 2000
9-
- composer install --dev --no-interaction
10+
- composer install --no-interaction
11+
- composer validate --check-lock --no-check-publish
1012
- composer cs-check
1113
- composer stan
1214
- composer psalm
@@ -20,3 +22,10 @@ static-analysis:
2022
when: on_success
2123
- if: '$TEST_DISABLED == null && $CI_COMMIT_BRANCH != "master"'
2224
when: on_success
25+
26+
static-analysis-js:
27+
stage: unit-test
28+
image: node:18
29+
script:
30+
- npm ci
31+
- npm run lint

.npmrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
; always amends --ignore-scripts on npm installs
2+
ignore-scripts=true
3+
; do not tag on npm version
4+
git-tag-version=false

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## Prerequisite
33
Make sure you have the developement dependencies install.
44
```
5-
composer install --dev
5+
composer install
66
```
77

88
## How do I run the unit tests

Gruntfile.js

+2
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ module.exports = function(grunt) {
144144
'third_party/sendgrid.svg',
145145
'third_party/sendinblue.svg',
146146
'third_party/zoho.svg',
147+
'third_party/outlook.svg',
148+
'third_party/office365.svg',
147149

148150
// Setup
149151
'illustrations/email.png',

composer.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,13 @@
103103
"cakephp/bake": "^2.3.0",
104104
"phpunit/phpunit": "~9.5.2",
105105
"cakephp/cakephp-codesniffer": "^4.5",
106-
"passbolt/passbolt-selenium-api": "^4.2",
106+
"passbolt/passbolt-selenium-api": "^4.5",
107107
"passbolt/passbolt-test-data": "^4.4",
108108
"vierge-noire/cakephp-fixture-factories": "^v2.9.0",
109109
"cakephp/localized": "4.0.0",
110110
"vimeo/psalm": "^5.0.0",
111-
"cakedc/cakephp-phpstan": "^2.0"
111+
"cakedc/cakephp-phpstan": "^2.0",
112+
"johnkary/phpunit-speedtrap": "^4.0"
112113
},
113114
"autoload": {
114115
"psr-4": {
@@ -128,6 +129,7 @@
128129
"Passbolt\\JwtAuthentication\\": "./plugins/PassboltCe/JwtAuthentication/src",
129130
"Passbolt\\Import\\": "./plugins/PassboltCe/Import/src",
130131
"Passbolt\\Export\\": "./plugins/PassboltCe/Export/src",
132+
"Passbolt\\PasswordExpiry\\": "./plugins/PassboltCe/PasswordExpiry/src",
131133
"Passbolt\\ResourceTypes\\": "./plugins/PassboltCe/ResourceTypes/src",
132134
"Passbolt\\SmtpSettings\\": "./plugins/PassboltCe/SmtpSettings/src",
133135
"Passbolt\\MultiFactorAuthentication\\": "./plugins/PassboltCe/MultiFactorAuthentication/src",
@@ -153,6 +155,7 @@
153155
"Passbolt\\Mobile\\Test\\": "./plugins/PassboltCe/Mobile/tests",
154156
"Passbolt\\JwtAuthentication\\Test\\": "./plugins/PassboltCe/JwtAuthentication/tests",
155157
"Passbolt\\MultiFactorAuthentication\\Test\\": "./plugins/PassboltCe/MultiFactorAuthentication/tests",
158+
"Passbolt\\PasswordExpiry\\Test\\": "./plugins/PassboltCe/PasswordExpiry/tests",
156159
"Passbolt\\SmtpSettings\\Test\\": "./plugins/PassboltCe/SmtpSettings/tests",
157160
"Passbolt\\SelfRegistration\\Test\\": "./plugins/PassboltCe/SelfRegistration/tests",
158161
"Passbolt\\ResourceTypes\\Test\\": "./plugins/PassboltCe/ResourceTypes/tests",
@@ -171,7 +174,7 @@
171174
"cs-check": "phpcs -d memory_limit=512M --colors -p --ignore=*.js,*/templates/* ./src ./tests ./plugins",
172175
"cs-fix": "phpcbf -d memory_limit=512M --colors --ignore=*.js,*/templates/* ./src ./tests ./plugins",
173176
"install-dev": [
174-
"@composer install --dev",
177+
"@composer install",
175178
"npm install",
176179
"./node_modules/.bin/grunt appjs-update",
177180
"./node_modules/.bin/grunt styleguide-update"

composer.lock

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

config/Migrations/20210125212543_V320TransferFileStorageToAvatars.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ public function up()
4242
// This line is required for Postgres support.
4343
$this->getAdapter()->commitTransaction();
4444

45-
(new AvatarsTransferService($AvatarsTable, $FileStorageTable))->transfer();
45+
try {
46+
(new AvatarsTransferService($AvatarsTable, $FileStorageTable))->transfer();
47+
} catch (\Throwable $e) {
48+
Log::error('There was an error in V320TransferFileStorageToAvatars');
49+
Log::error($e->getMessage());
50+
}
4651
}
4752

4853
public function down()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
/**
5+
* Passbolt ~ Open source password manager for teams
6+
* Copyright (c) Passbolt SA (https://www.passbolt.com)
7+
*
8+
* Licensed under GNU Affero General Public License version 3 of the or any later version.
9+
* For full copyright and license information, please see the LICENSE.txt
10+
* Redistributions of files must retain the above copyright notice.
11+
*
12+
* @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
13+
* @license https://opensource.org/licenses/AGPL-3.0 AGPL License
14+
* @link https://www.passbolt.com Passbolt(tm)
15+
* @since 4.5.0
16+
*/
17+
use Migrations\AbstractMigration;
18+
19+
class V450AddExpiredDateFieldToResources extends AbstractMigration
20+
{
21+
/**
22+
* Change Method.
23+
*
24+
* More information on this method is available here:
25+
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
26+
* @return void
27+
*/
28+
public function change(): void
29+
{
30+
$this
31+
->table('resources')
32+
->addColumn('expired', 'datetime', [
33+
'default' => null,
34+
'limit' => null,
35+
'null' => true,
36+
'after' => 'deleted'
37+
])
38+
->save();
39+
}
40+
}

config/default.php

+17-3
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
'share' => filter_var(env('PASSBOLT_EMAIL_SEND_PASSWORD_SHARE', true), FILTER_VALIDATE_BOOLEAN),
102102
'update' => filter_var(env('PASSBOLT_EMAIL_SEND_PASSWORD_UPDATE', true), FILTER_VALIDATE_BOOLEAN),
103103
'delete' => filter_var(env('PASSBOLT_EMAIL_SEND_PASSWORD_DELETE', true), FILTER_VALIDATE_BOOLEAN),
104+
'expire' => filter_var(env('PASSBOLT_EMAIL_SEND_PASSWORD_EXPIRE', true), FILTER_VALIDATE_BOOLEAN),
104105
],
105106
'user' => [
106107
// WARNING: disabling PASSBOLT_EMAIL_SEND_USER_CREATE and PASSBOLT_EMAIL_SEND_USER_RECOVER will prevent user from signing up.
@@ -153,7 +154,8 @@
153154
'manager' => [
154155
// Notify managers when group membership changes.
155156
'update' => filter_var(env('PASSBOLT_EMAIL_SEND_GROUP_MANAGER_UPDATE', true), FILTER_VALIDATE_BOOLEAN),
156-
]
157+
'requestAddUser' => filter_var(env('PASSBOLT_EMAIL_SEND_GROUP_MANAGER_REQUEST_ADD_USER', true), FILTER_VALIDATE_BOOLEAN),
158+
],
157159
],
158160
'folder' => [
159161
'create' => filter_var(env('PASSBOLT_EMAIL_SEND_FOLDER_CREATE', false), FILTER_VALIDATE_BOOLEAN),
@@ -242,6 +244,9 @@
242244
'previewPassword' => [
243245
'enabled' => filter_var(env('PASSBOLT_PLUGINS_PREVIEW_PASSWORD_ENABLED', true), FILTER_VALIDATE_BOOLEAN)
244246
],
247+
'passwordExpiry' => [
248+
'enabled' => filter_var(env('PASSBOLT_PLUGINS_PASSWORD_EXPIRY_ENABLED', true), FILTER_VALIDATE_BOOLEAN)
249+
],
245250
'resourceTypes' => [
246251
'enabled' => filter_var(env('PASSBOLT_PLUGINS_RESOURCE_TYPES_ENABLED', true), FILTER_VALIDATE_BOOLEAN)
247252
],
@@ -252,7 +257,7 @@
252257
'enabled' => filter_var(env('PASSBOLT_PLUGINS_MOBILE_ENABLED', true), FILTER_VALIDATE_BOOLEAN)
253258
],
254259
'desktop' => [
255-
'enabled' => filter_var(env('PASSBOLT_PLUGINS_DESKTOP_ENABLED', false), FILTER_VALIDATE_BOOLEAN)
260+
'enabled' => filter_var(env('PASSBOLT_PLUGINS_DESKTOP_ENABLED', true), FILTER_VALIDATE_BOOLEAN)
256261
],
257262
'jwtAuthentication' => [
258263
'enabled' => filter_var(env('PASSBOLT_PLUGINS_JWT_AUTHENTICATION_ENABLED', true), FILTER_VALIDATE_BOOLEAN)
@@ -338,6 +343,12 @@
338343
// This is disabled by default as it prevents legitimate users to know whether their accounts was disabled
339344
// as well as prevent open registration to work
340345
'preventEmailEnumeration' => filter_var(env('PASSBOLT_SECURITY_PREVENT_EMAIL_ENUMERATION', false), FILTER_VALIDATE_BOOLEAN),
346+
'email' => [
347+
'anonymiseAdministratorIdentity' => filter_var(
348+
env('PASSBOLT_SECURITY_EMAIL_ANONYMISE_ADMINISTRATOR_IDENTITY', false),
349+
FILTER_VALIDATE_BOOLEAN
350+
),
351+
],
341352
],
342353

343354
// Should the app be SSL / HTTPS only.
@@ -353,5 +364,8 @@
353364
// Override the Cake ExceptionRenderer.
354365
'Error' => [
355366
'exceptionRenderer' => 'App\Error\AppExceptionRenderer',
356-
]
367+
'skipLog' => [
368+
'Authentication\Authenticator\UnauthenticatedException',
369+
],
370+
],
357371
];

config/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
return [
33
'passbolt' => [
44
'version' => '4.4.2',
5-
'name' => 'Is It Because I\'m Black?',
5+
'name' => 'Is It Because I\'m Black',
66
],
77
'php' => [
88
'minVersion' => '7.4',

crowdin.yml

+1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ export_languages:
1414
- pl
1515
- pt-BR
1616
- ro
17+
- ru
1718
- sv
1819
commit_message: '[skip-ci]'

0 commit comments

Comments
 (0)