passbolt-browser-extension 5.3.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/CHANGELOG.md +82 -1
  2. package/Gruntfile.js +1 -1
  3. package/RELEASE_NOTES.md +59 -48
  4. package/crowdin.yml +1 -0
  5. package/package.json +7 -6
  6. package/src/all/_locales/cs/messages.json +10 -0
  7. package/src/all/background_page/controller/InformMenuController/InformMenuController.js +3 -3
  8. package/src/all/background_page/controller/auth/redirectPostLoginController.js +57 -0
  9. package/src/all/background_page/controller/auth/redirectPostLoginController.test.js +82 -0
  10. package/src/all/background_page/controller/auth/redirectToAdminWorkspaceController.js +50 -0
  11. package/src/all/background_page/controller/auth/redirectToAdminWorkspaceController.test.js +45 -0
  12. package/src/all/background_page/controller/clipboard/cancelClipboardContentFlushController.js +51 -0
  13. package/src/all/background_page/controller/clipboard/cancelClipboardContentFlushController.test.js +46 -0
  14. package/src/all/background_page/controller/clipboard/copyTemporarilyToClipboardController.js +53 -0
  15. package/src/all/background_page/controller/clipboard/copyTemporarilyToClipboardController.test.js +47 -0
  16. package/src/all/background_page/controller/clipboard/{clipboardController.js → copyToClipboardController.js} +8 -8
  17. package/src/all/background_page/controller/clipboard/copyToClipboardController.test.js +47 -0
  18. package/src/all/background_page/controller/comment/createCommentController.js +3 -3
  19. package/src/all/background_page/controller/comment/createCommentController.test.js +5 -5
  20. package/src/all/background_page/controller/comment/deleteCommentController.js +3 -3
  21. package/src/all/background_page/controller/comment/deleteCommentController.test.js +3 -3
  22. package/src/all/background_page/controller/comment/getCommentsByRessourceIdController.js +3 -3
  23. package/src/all/background_page/controller/comment/getCommentsByRessourceidController.test.js +2 -2
  24. package/src/all/background_page/controller/extension/getExtensionVersionController.test.js +1 -1
  25. package/src/all/background_page/controller/import/importResourcesFileController.test.js +23 -23
  26. package/src/all/background_page/controller/metadata/enableEncryptedMetadataForExistingInstanceController.js +54 -0
  27. package/src/all/background_page/controller/metadata/enableEncryptedMetadataForExistingInstanceController.test.js +54 -0
  28. package/src/all/background_page/controller/metadata/enableMetadataSetupSettingsController.js +54 -0
  29. package/src/all/background_page/controller/metadata/enableMetadataSetupSettingsController.test.js +64 -0
  30. package/src/all/background_page/controller/metadata/findAllNonDeletedMetadataKeysController.js +2 -3
  31. package/src/all/background_page/controller/metadata/findMetadataGettingStartedSettingsController.js +50 -0
  32. package/src/all/background_page/controller/metadata/findMetadataGettingStartedSettingsController.test.js +33 -0
  33. package/src/all/background_page/controller/metadata/findMetadataSetupSettingsController.js +50 -0
  34. package/src/all/background_page/controller/metadata/findMetadataSetupSettingsController.test.js +42 -0
  35. package/src/all/background_page/controller/metadata/getOrFindMetadataKeysSettingsController.js +53 -0
  36. package/src/all/background_page/controller/metadata/getOrFindMetadataKeysSettingsController.test.js +106 -0
  37. package/src/all/background_page/controller/metadata/keepCleartextMetadataForExistingInstanceController.js +51 -0
  38. package/src/all/background_page/controller/metadata/keepCleartextMetadataForExistingInstanceController.test.js +47 -0
  39. package/src/all/background_page/controller/permission/FindAcoPermissionsForDisplayController.js +1 -0
  40. package/src/all/background_page/controller/quickaccess/consumeInProgressCreationResourceController.js +53 -0
  41. package/src/all/background_page/controller/quickaccess/consumeInProgressCreationResourceController.test.js +40 -0
  42. package/src/all/background_page/controller/quickaccess/prepareResourceController.js +64 -0
  43. package/src/all/background_page/controller/quickaccess/prepareResourceController.test.js +73 -0
  44. package/src/all/background_page/controller/resource/resourceDeleteController.js +67 -0
  45. package/src/all/background_page/controller/resource/resourceDeleteController.test.js +114 -0
  46. package/src/all/background_page/controller/resourceLocalStorage/resourceUpdateLocalStorageController.js +1 -1
  47. package/src/all/background_page/controller/resourceLocalStorage/resourceUpdateLocalStorageController.test.js +5 -1
  48. package/src/all/background_page/controller/setup/signInSetupController.js +0 -10
  49. package/src/all/background_page/controller/setup/signInSetupController.test.js +11 -12
  50. package/src/all/background_page/controller/sso/saveSsoSettingsAsDraftController.test.data.js +1 -0
  51. package/src/all/background_page/controller/user/deleteDryRunUserController.js +73 -0
  52. package/src/all/background_page/controller/user/deleteDryRunUserController.test.js +129 -0
  53. package/src/all/background_page/controller/user/deleteUserController.js +76 -0
  54. package/src/all/background_page/controller/user/deleteUserController.test.js +141 -0
  55. package/src/all/background_page/controller/webIntegration/webIntegrationController.js +1 -1
  56. package/src/all/background_page/event/actionLogEvents.js +5 -12
  57. package/src/all/background_page/event/appEvents.js +80 -0
  58. package/src/all/background_page/event/authEvents.js +4 -8
  59. package/src/all/background_page/event/findAllForActionLogController.js +58 -0
  60. package/src/all/background_page/event/findAllForActionLogController.test.js +43 -0
  61. package/src/all/background_page/event/informMenuEvents.js +31 -0
  62. package/src/all/background_page/event/quickAccessEvents.js +50 -23
  63. package/src/all/background_page/event/recoverEvents.js +12 -0
  64. package/src/all/background_page/event/resourceEvents.js +4 -11
  65. package/src/all/background_page/event/setupEvents.js +55 -0
  66. package/src/all/background_page/event/userEvents.js +7 -20
  67. package/src/all/background_page/event/webIntegrationEvents.js +11 -0
  68. package/src/all/background_page/model/actionLog/{actionLogModel.js → findActionLogService.js} +25 -5
  69. package/src/all/background_page/model/actionLog/findActionLogService.test.js +61 -0
  70. package/src/all/background_page/model/comment/{commentModel.js → commentService.js} +11 -7
  71. package/src/all/background_page/model/comment/commentService.test.js +98 -0
  72. package/src/all/background_page/model/entity/actionLog/actionLogsCollection.js +3 -3
  73. package/src/all/background_page/model/entity/actionLog/actionLogsCollection.test.data.js +18 -0
  74. package/src/all/background_page/model/entity/actionLog/defaultActionLogEntity.test.data.js +34 -0
  75. package/src/all/background_page/model/entity/actionLog/permissionsUpdatedActionLogEntity.js +4 -0
  76. package/src/all/background_page/model/entity/import/importResourcesFileEntity.test.data.js +3 -3
  77. package/src/all/background_page/model/entity/organizationSettings/organizationSettingsEntity.test.data.js +4 -0
  78. package/src/all/background_page/model/entity/permission/actionLog/updatedPermissionEntity.test.data.js +23 -0
  79. package/src/all/background_page/model/entity/permission/actionLog/updatedPermissionEntity.test.js +18 -33
  80. package/src/all/background_page/model/entity/permission/actionLog/updatedPermissionsCollection.js +71 -2
  81. package/src/all/background_page/model/entity/permission/actionLog/updatedPermissionsCollection.test.js +204 -0
  82. package/src/all/background_page/model/entity/permission/permissionsCollection.js +78 -0
  83. package/src/all/background_page/model/entity/permission/permissionsCollection.test.js +139 -7
  84. package/src/all/background_page/model/entity/plaintext/plaintextEntity.js +9 -0
  85. package/src/all/background_page/model/entity/resource/external/externalResourceEntity.js +65 -8
  86. package/src/all/background_page/model/entity/resource/external/externalResourceEntity.test.data.js +5 -4
  87. package/src/all/background_page/model/entity/resource/external/externalResourceEntity.test.js +72 -16
  88. package/src/all/background_page/model/entity/resource/external/externalResourcesCollection.test.js +2 -1
  89. package/src/all/background_page/model/entity/totp/externalTotpEntity.js +2 -2
  90. package/src/all/background_page/model/entity/totp/totpEntity.test.js +1 -1
  91. package/src/all/background_page/model/export/resources/csvRowComposer/csv1PasswordRowComposer.test.js +2 -2
  92. package/src/all/background_page/model/export/resources/csvRowComposer/csv1passwordRowComposer.js +5 -1
  93. package/src/all/background_page/model/export/resources/csvRowComposer/csvBitWardenRowComposer.js +9 -1
  94. package/src/all/background_page/model/export/resources/csvRowComposer/csvBitWardenRowComposer.test.js +6 -4
  95. package/src/all/background_page/model/export/resources/csvRowComposer/csvChromiumRowComposer.js +5 -1
  96. package/src/all/background_page/model/export/resources/csvRowComposer/csvChromiumRowComposer.test.js +3 -2
  97. package/src/all/background_page/model/export/resources/csvRowComposer/csvDashlaneRowComposer.js +5 -1
  98. package/src/all/background_page/model/export/resources/csvRowComposer/csvDashlaneRowComposer.test.js +2 -3
  99. package/src/all/background_page/model/export/resources/csvRowComposer/csvKdbxRowComposer.js +3 -1
  100. package/src/all/background_page/model/export/resources/csvRowComposer/csvKdbxRowComposer.test.js +6 -4
  101. package/src/all/background_page/model/export/resources/csvRowComposer/csvLastPassRowComposer.js +5 -1
  102. package/src/all/background_page/model/export/resources/csvRowComposer/csvLastPassRowComposer.test.js +2 -3
  103. package/src/all/background_page/model/export/resources/csvRowComposer/csvLogMeOnceRowComposer.js +5 -1
  104. package/src/all/background_page/model/export/resources/csvRowComposer/csvLogMeOnceRowComposer.test.js +2 -3
  105. package/src/all/background_page/model/export/resources/csvRowComposer/csvMozillaPlatformRowComposer.js +6 -2
  106. package/src/all/background_page/model/export/resources/csvRowComposer/csvMozillaPlatformRowComposer.test.js +2 -2
  107. package/src/all/background_page/model/export/resources/csvRowComposer/csvNordpassRowComposer.js +5 -1
  108. package/src/all/background_page/model/export/resources/csvRowComposer/csvNordpassRowComposer.test.js +2 -2
  109. package/src/all/background_page/model/export/resources/csvRowComposer/csvSafariRowComposer.js +5 -1
  110. package/src/all/background_page/model/export/resources/csvRowComposer/csvSafariRowComposer.test.js +2 -2
  111. package/src/all/background_page/model/export/resources/resourcesKdbxExporter.js +44 -2
  112. package/src/all/background_page/model/export/resources/resourcesKdbxExporter.test.js +24 -3
  113. package/src/all/background_page/model/import/resources/csvRowParser/abstractCsvRowParser.js +1 -1
  114. package/src/all/background_page/model/import/resources/csvRowParser/csv1PasswordRowParser.js +5 -3
  115. package/src/all/background_page/model/import/resources/csvRowParser/csv1PasswordRowParser.test.js +3 -2
  116. package/src/all/background_page/model/import/resources/csvRowParser/csvBitWardenRowParser.js +22 -3
  117. package/src/all/background_page/model/import/resources/csvRowParser/csvBitWardenRowParser.test.js +92 -4
  118. package/src/all/background_page/model/import/resources/csvRowParser/csvChromiumRowParser.js +4 -2
  119. package/src/all/background_page/model/import/resources/csvRowParser/csvChromiumRowParser.test.js +2 -2
  120. package/src/all/background_page/model/import/resources/csvRowParser/csvDashlaneRowParser.js +4 -2
  121. package/src/all/background_page/model/import/resources/csvRowParser/csvDashlaneRowParser.test.js +3 -2
  122. package/src/all/background_page/model/import/resources/csvRowParser/csvKdbxRowParser.js +5 -3
  123. package/src/all/background_page/model/import/resources/csvRowParser/csvKdbxRowParser.test.js +4 -4
  124. package/src/all/background_page/model/import/resources/csvRowParser/csvLastPassRowParser.js +4 -2
  125. package/src/all/background_page/model/import/resources/csvRowParser/csvLastPassRowParser.test.js +2 -2
  126. package/src/all/background_page/model/import/resources/csvRowParser/csvLogMeOnceRowParser.js +5 -2
  127. package/src/all/background_page/model/import/resources/csvRowParser/csvLogMeOnceRowParser.test.js +2 -2
  128. package/src/all/background_page/model/import/resources/csvRowParser/csvMozillaPlatformRowParser.js +5 -3
  129. package/src/all/background_page/model/import/resources/csvRowParser/csvMozillaPlatformRowParser.test.js +2 -2
  130. package/src/all/background_page/model/import/resources/csvRowParser/csvNordpassRowParser.js +4 -2
  131. package/src/all/background_page/model/import/resources/csvRowParser/csvNordpassRowParser.test.js +2 -2
  132. package/src/all/background_page/model/import/resources/csvRowParser/csvSafariRowParser.js +4 -2
  133. package/src/all/background_page/model/import/resources/csvRowParser/csvSafariRowParser.test.js +2 -2
  134. package/src/all/background_page/model/import/resources/kdbx/kdbx-custom-fields-with-uris.kdbx +0 -0
  135. package/src/all/background_page/model/import/resources/kdbx/kdbx-multiple-uris-with-33-entries.kdbx +0 -0
  136. package/src/all/background_page/model/import/resources/kdbx/kdbx-multiple-uris.kdbx +0 -0
  137. package/src/all/background_page/model/import/resources/kdbx/kdbx-with-protected-custom-fields.kdbx +0 -0
  138. package/src/all/background_page/model/import/resources/resourcesCsvImportParser.test.js +1 -1
  139. package/src/all/background_page/model/import/resources/resourcesKdbxImportParser.js +124 -41
  140. package/src/all/background_page/model/import/resources/resourcesKdbxImportParser.test.js +133 -2
  141. package/src/all/background_page/model/import/resourcesImportParser.test.js +0 -1
  142. package/src/all/background_page/model/resource/resourceModel.js +0 -68
  143. package/src/all/background_page/model/user/userModel.js +0 -60
  144. package/src/all/background_page/pagemod/appPagemod.js +0 -2
  145. package/src/all/background_page/pagemod/appPagemod.test.js +2 -6
  146. package/src/all/background_page/service/alarm/globalAlarmService.js +2 -0
  147. package/src/all/background_page/service/api/actionLog/{actionLogService.js → actionLogApiService.js} +5 -4
  148. package/src/all/background_page/service/api/actionLog/actionLogApiService.test.js +55 -0
  149. package/src/all/background_page/service/api/comment/{commentService.js → commentApiService.js} +6 -7
  150. package/src/all/background_page/service/api/comment/commentApiService.test.js +122 -0
  151. package/src/all/background_page/service/api/metadata/metadataSetupSettingsApiService.js +40 -0
  152. package/src/all/background_page/service/api/metadata/metadataSetupSettingsApiService.test.js +54 -0
  153. package/src/all/background_page/service/api/setup/setupService.js +2 -2
  154. package/src/all/background_page/service/api/setup/setupService.test.js +132 -0
  155. package/src/all/background_page/service/auth/postLogoutService.js +2 -0
  156. package/src/all/background_page/service/auth/postLogoutService.test.js +4 -1
  157. package/src/all/background_page/service/browser/browserService.js +22 -0
  158. package/src/all/background_page/service/clipboard/clipboardProviderService.js +40 -0
  159. package/src/all/background_page/service/clipboard/clipboardProviderService.test.js +61 -0
  160. package/src/all/background_page/service/clipboard/copyToClipboardService.js +123 -0
  161. package/src/all/background_page/service/clipboard/copyToClipboardService.test.js +174 -0
  162. package/src/all/background_page/service/local_storage/resourceLocalStorage.js +25 -1
  163. package/src/all/background_page/service/local_storage/resourceLocalStorage.test.js +54 -0
  164. package/src/all/background_page/service/metadata/configureMetadataSettingsService.js +100 -0
  165. package/src/all/background_page/service/metadata/configureMetadataSettingsService.test.js +265 -0
  166. package/src/all/background_page/service/metadata/createMetadataKeyService.js +1 -1
  167. package/src/all/background_page/service/metadata/decryptMetadataPrivateKeysService.js +3 -19
  168. package/src/all/background_page/service/metadata/decryptMetadataService.js +5 -3
  169. package/src/all/background_page/service/metadata/decryptMetadataService.test.js +31 -24
  170. package/src/all/background_page/service/metadata/encryptMetadataService.js +2 -18
  171. package/src/all/background_page/service/metadata/findAndUpdateMetadataKeysSessionStorageService.js +5 -2
  172. package/src/all/background_page/service/metadata/findAndUpdateMetadataKeysSessionStorageService.test.js +4 -6
  173. package/src/all/background_page/service/metadata/findMetadataKeysService.js +8 -12
  174. package/src/all/background_page/service/metadata/findMetadataKeysService.test.js +21 -47
  175. package/src/all/background_page/service/metadata/findMetadataSetupSettingsService.js +45 -0
  176. package/src/all/background_page/service/metadata/findMetadataSetupSettingsService.test.js +68 -0
  177. package/src/all/background_page/service/metadata/generateMetadataKeyService.js +1 -1
  178. package/src/all/background_page/service/metadata/verifyOrTrustMetadataKeyService.test.js +16 -0
  179. package/src/all/background_page/service/passphrase/getPassphraseService.js +13 -0
  180. package/src/all/background_page/service/permission/findPermissionsService.js +3 -1
  181. package/src/all/background_page/service/resource/delete/deleteResourceService.js +60 -0
  182. package/src/all/background_page/service/resource/delete/deleteResourceService.test.js +75 -0
  183. package/src/all/background_page/service/resource/export/exportResourcesService.js +22 -0
  184. package/src/all/background_page/service/resource/export/exportResourcesService.test.js +48 -1
  185. package/src/all/background_page/service/resource/import/ImportResourcesService.js +34 -3
  186. package/src/all/background_page/service/resource/import/ImportResourcesService.test.js +55 -13
  187. package/src/all/background_page/service/sessionKey/decryptSessionKeysBundlesService.js +2 -18
  188. package/src/all/background_page/service/sessionKey/encryptSessionKeysBundlesService.js +1 -17
  189. package/src/all/background_page/service/user/deleteUserService.js +97 -0
  190. package/src/all/background_page/service/user/deleteUserService.test.js +178 -0
  191. package/src/all/locales/cs-CZ/common.json +130 -0
  192. package/src/all/locales/de-DE/common.json +11 -5
  193. package/src/all/locales/en-UK/common.json +6 -0
  194. package/src/all/locales/es-ES/common.json +6 -0
  195. package/src/all/locales/fr-FR/common.json +6 -0
  196. package/src/all/locales/it-IT/common.json +6 -0
  197. package/src/all/locales/ja-JP/common.json +6 -0
  198. package/src/all/locales/ko-KR/common.json +6 -0
  199. package/src/all/locales/lt-LT/common.json +6 -0
  200. package/src/all/locales/nl-NL/common.json +6 -0
  201. package/src/all/locales/pl-PL/common.json +6 -0
  202. package/src/all/locales/pt-BR/common.json +6 -0
  203. package/src/all/locales/ro-RO/common.json +6 -0
  204. package/src/all/locales/ru-RU/common.json +6 -0
  205. package/src/all/locales/sl-SI/common.json +6 -0
  206. package/src/all/locales/sv-SE/common.json +6 -0
  207. package/src/all/locales/uk-UA/common.json +6 -0
  208. package/src/chrome/manifest.json +1 -1
  209. package/src/chrome/polyfill/clipboard/edgeBackgroundPageClipboardService.js +31 -0
  210. package/src/chrome/polyfill/clipboard/edgeBackgroundPageClipboardService.test.js +51 -0
  211. package/src/chrome-mv3/index.js +3 -3
  212. package/src/chrome-mv3/manifest.json +1 -1
  213. package/src/chrome-mv3/offscreens/{fetch.html → offscreen.html} +1 -1
  214. package/src/chrome-mv3/offscreens/{fetch.js → offscreen.js} +2 -2
  215. package/src/chrome-mv3/offscreens/service/clipboard/writeClipobardOffscreenService.js +54 -0
  216. package/src/chrome-mv3/offscreens/service/clipboard/writeClipobardOffscreenService.test.js +56 -0
  217. package/src/chrome-mv3/offscreens/service/network/fetchOffscreenService.js +36 -44
  218. package/src/chrome-mv3/offscreens/service/network/fetchOffscreenService.test.data.js +0 -1
  219. package/src/chrome-mv3/offscreens/service/network/fetchOffscreenService.test.js +90 -120
  220. package/src/chrome-mv3/offscreens/service/offscreen/handleOffscreenRequestService.js +85 -0
  221. package/src/chrome-mv3/offscreens/service/offscreen/handleOffscreenRequestService.test.js +99 -0
  222. package/src/chrome-mv3/polyfill/clipboardOffscreenPolyfill.js +19 -0
  223. package/src/chrome-mv3/serviceWorker/service/clipboard/requestClipboardOffscreenService.js +51 -0
  224. package/src/chrome-mv3/serviceWorker/service/clipboard/requestClipboardOffscreenService.test.js +70 -0
  225. package/src/chrome-mv3/serviceWorker/service/clipboard/responseClipboardOffscreenService.js +25 -0
  226. package/src/chrome-mv3/serviceWorker/service/clipboard/responseClipboardOffscreenService.test.data.js +21 -0
  227. package/src/chrome-mv3/serviceWorker/service/clipboard/responseClipboardOffscreenService.test.js +33 -0
  228. package/src/chrome-mv3/serviceWorker/service/network/requestFetchOffscreenService.js +25 -50
  229. package/src/chrome-mv3/serviceWorker/service/network/requestFetchOffscreenService.test.js +16 -39
  230. package/src/chrome-mv3/serviceWorker/service/network/responseFetchOffscreenService.js +14 -45
  231. package/src/chrome-mv3/serviceWorker/service/network/responseFetchOffscreenService.test.js +5 -37
  232. package/src/chrome-mv3/serviceWorker/service/offscreen/createOffscreenDocumentService.js +43 -0
  233. package/src/chrome-mv3/serviceWorker/service/offscreen/createOffscreenDocumentService.test.js +48 -0
  234. package/src/chrome-mv3/serviceWorker/service/offscreen/handleOffscreenResponseService.js +119 -0
  235. package/src/chrome-mv3/serviceWorker/service/offscreen/handleOffscreenResponseService.test.js +159 -0
  236. package/src/firefox/manifest.json +1 -1
  237. package/src/safari/manifest.json +1 -1
  238. package/test/jest.setup.js +4 -0
  239. package/test/mocks/mockNavigatorClipboard.js +40 -0
  240. package/test/mocks/mockWebExtensionPolyfill.js +2 -1
  241. package/{webpack-offscreens.fetch.config.js → webpack-offscreens.config.js} +1 -1
  242. package/webpack.service-worker.config.js +1 -0
  243. package/src/all/background_page/controller/clipboard/clipboardController.test.js +0 -68
  244. package/src/all/background_page/event/clipboardEvents.js +0 -28
package/CHANGELOG.md CHANGED
@@ -4,6 +4,84 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [5.4.0] - 2025-08-13
8
+ ### Added
9
+ - PB-44201: E2EE The organisation settings offer now a simplified way to activate metadata encryption and the new resource types
10
+ - PB-42205: E2EE encrypted metadata and new resource types are activated by default after the first administrator setup
11
+ - PB-43255: Add support for multiple uri import export on kdbx files
12
+ - PB-43110: ZK - WP4.2 As a signed-in user I should not be allowed to upgrade resources with missing key situation
13
+ - PB-43712: Translate the application in Czech
14
+ - PB-43939: ZK - WP3.2 Add an app event to get or find the metadata keys settings
15
+ - PB-43980: Add support for custom field import export on kdbx files
16
+ - PB-44080: ZK - WP4.1 Create a dialog explaining the missing key situation
17
+ - PB-44081: ZK - WP4.3 As a signed-in user I should not be allowed to create resources with missing key situation in the resource workspace
18
+ - PB-44090: ZK - WP4.4 As a signed-in user I should not be allowed to edit resources with missing key situation
19
+ - PB-44091: ZK - WP4.5 As a signed-in user I should not be allowed to share resources with missing key situation
20
+ - PB-44094: ZK - WP4.6 As a signed-in user I should not be allowed to import resources with missing key situation
21
+ - PB-44095: ZK - WP4.7 As a signed-in user I should not be allowed to move resources with missing key situation
22
+ - PB-44096: ZK - WP4.8 As a signed-in user I should not be allowed to move folders with missing key situation
23
+ - PB-44097: ZK - WP4.9 Display a page explaining the missing key situation on the quick app
24
+ - PB-44098: ZK - WP4.10 As a signed-in user I should not be allowed to create resources with missing key situation in the quick app
25
+ - PB-44099: ZK - WP4.11 As a signed-in user I should not be allowed to generate password on the inform menu
26
+ - PB-44206: ZK - WP4.14 As administrators I cannot trigger the encrypted metadata migration if I have missing metadata keys
27
+ - PB-44211: ZK - WP3.5 Add MetadataKeysSettingsLocalStorageContextProvider to the App and the quick-app and the inform menu
28
+ - PB-44212: CU - WP5.2 Update ExternalResourceEntity buildDtoFromResourceEntityDto to support custom fields
29
+ - PB-44286: ZK - WP3.6 Add a quick app and inform menu event to get the metadata keys settings
30
+ - PB-44295: ZK - WP4.15 As a signed-in user with missing keys I should not be able to create resource if metadata shared key is enforced on the inform menu
31
+ - PB-44296: ZK - WP4.16 As a signed-in user I should not be allowed to move shared folders into personal folders with missing key situation
32
+ - PB-44327: Display sub-folders in breadcrumbs
33
+ - PB-44374: Extend notes v5 max length to 50_000
34
+
35
+ ### Fixed
36
+ - PB-43296: Displaying resource activities should not crash the application when a resource activity does not have related user or group
37
+ - PB-43652: The sentence to change the passphrase in the user settings workspace should have a space after.
38
+ - PB-43657: Resources loading became noticeably slower after migrating to encrypted
39
+ - PB-43667: Cancelling the user passphrase request should not trigger an error when sharing missing metadata key
40
+ - PB-43676: Cancelling the user passphrase should not freeze the create resource dialog
41
+ - PB-43719: After importing resources from Bitwarden the URIs are not separated correctly
42
+ - PB-43784: Display the progression of the encryption of metadata in the import dialog
43
+ - PB-43906: User should be notified of any errors while loading comments
44
+ - PB-44079: Update/Create a method in resourceLocalStorage.js to bulk delete resources
45
+ - PB-44161: As a user I should not see the resource description and note warning message if only one of them is concerned
46
+ - PB-44273: Activities are not loaded when new resource is clicked after load more activities of a previous resource
47
+
48
+ ### Maintenance
49
+ - PB-43585: Azure SSO login_hint settings can now be configured
50
+ - PB-43908: Move logic of commentModel file to a service and update assertions in controllers
51
+ - PB-44076: Create a Controller to handle Resource Delete
52
+ - PB-44077: Create a dedicated Service to handle resource deletion
53
+ - PB-44396: the endpoint complete/recover.json is now used instead of the legacy endpoint
54
+
55
+ ### Security
56
+ - PB-43730: Upgrade vulnerable library brace-expansion
57
+
58
+ ## [5.3.2] - 2025-07-17
59
+ ### Added
60
+ - PB-25265 Flush clipboard strategy
61
+ - PB-43095 Display the metadata issue in the HealthCheck served by the UI
62
+ - PB-43403 Search resources should take into account available custom fields information in the web application
63
+
64
+ ### Improved
65
+ - PB-43474 As LU I should be able to clear the search field with a button
66
+
67
+ ### Fixed
68
+ - PB-43916 Fix hitting the key enter on the search fields
69
+ - PB-43996 Users should access encrypted metadata section of the administration guide on the help site when clicking on the documentation CTA from the sidebar
70
+
71
+ ### Maintenance
72
+ - PB-43491 The resource activities should use a service worker service to request the service worker
73
+ - PB-43496 The user should be notified if an error occurs while displaying additional resource activities
74
+ - PB-43501 Cover ActionLogService API service and rename class as per naming convention
75
+ - PB-43502 Move logic of ActionLogModel into FindActionLogService
76
+ - PB-43506 Move logic of event passbolt.actionlogs.find-all-for into its dedicated Controller
77
+ - PB-43738 Create DeleteUserService to call the userService deleteDryRun
78
+ - PB-43739 Create DeleteDryRunUserController to call the DeleteUserService
79
+ - PB-43750 An unexpected error should be displayed on delete user
80
+ - PB-43904 Add a service to request or send data CommentsServiceWorkerService
81
+ - PB-43907 Add tests for commentService API service and rename the service class as per naming convention
82
+ - PB-43938 Create a GetOrFindMetadataKeysSettingsController to retrieve the metadata keys settings
83
+ - PB-43940 Create a MetadataKeysSettingsLocalStorageContextProvider to retrieve the metadata keys settings
84
+
7
85
  ## [5.3.0] - 2025-06-09
8
86
 
9
87
  ### Added
@@ -2278,7 +2356,10 @@ self registration settings option in the left-side bar
2278
2356
  - AP: User with plugin installed
2279
2357
  - LU: Logged in user
2280
2358
 
2281
- [Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.2.0...HEAD
2359
+ [Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.4.0...HEAD
2360
+ [5.4.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.3.3...v5.4.0
2361
+ [5.3.2]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.3.0...v5.3.2
2362
+ [5.3.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.2.0...v5.3.0
2282
2363
  [5.2.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.1.1...v5.2.0
2283
2364
  [5.1.1]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.1.0...v5.1.1
2284
2365
  [5.1.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.0.1...v5.1.0
package/Gruntfile.js CHANGED
@@ -119,7 +119,7 @@ module.exports = function (grunt) {
119
119
  service_worker: {
120
120
  files: [
121
121
  { expand: true, cwd: path.src_chrome_mv3, src: 'serviceWorker.js', dest: path.build + 'serviceWorker' },
122
- { expand: true, cwd: `${path.src_chrome_mv3}/offscreens`, src: 'fetch.html', dest: `${path.build}/offscreens` }
122
+ { expand: true, cwd: `${path.src_chrome_mv3}/offscreens`, src: 'offscreen.html', dest: `${path.build}/offscreens` },
123
123
  ]
124
124
  },
125
125
  web_accessible_resources: {
package/RELEASE_NOTES.md CHANGED
@@ -1,56 +1,67 @@
1
- Release song: https://www.youtube.com/watch?v=ubWL8VAPoYw
1
+ Release song: https://www.youtube.com/watch?v=kymdKYtkJbQ
2
2
 
3
- Passbolt 5.3 adds custom fields, one of the five most‑requested features from the community. Built on top of encrypted‑metadata introduced earlier this year, custom fields let users attach additional key‑value pairs to a resource or as a standalone one. Typical use‑cases include centralising CI/CD job variables and storing environment‑specific configuration values that need more structure than a general note.
3
+ Passbolt v5.4.0 ships with encrypted metadata and the accompanying new resource types promoted to stable. These capabilities have been battle-tested for months, and the last remaining edge cases have been smoothed out so they can now be enabled for everyone.
4
4
 
5
- Custom fields rely on encrypted metadata, therefore the feature is still in beta and is not yet available on Passbolt Cloud. A step‑by‑step guide on how to enable the encrypted metadata on a self‑hosted instance will be available in a blog post that will be published soon. The encrypted‑metadata feature is scheduled to be marked as stable in Passbolt 5.4, planned for August 2025.
5
+ Removing the beta label means that every new instance starts with encrypted metadata activated by default. As a result, features introduced in previous releases, such as icons, multiple URIs and custom fields, are available from day one without any action from end-users.
6
6
 
7
- As part of our continuous performance work, this release concentrates on folder browsing. Loading folders and their resources is now faster and reduces the load on API and client, improving day-to-day usability for organizations having thousands of credentials under management.
7
+ For existing instances, the activation process has been simplified: administrators can decide with a single click whether their organisation is ready or would prefer to postpone the launch. Once enabled, the instance immediately supports the new resource types and their extended capabilities. Because the change may disrupt external integrations, existing content is not migrated automatically; migration remains the responsibility of content owners or administrators. It can be performed item-by-item in the resource workspace or organisation-wide with the resource-metadata administration migration tool.
8
8
 
9
- Several bugs reported by the community have also been fixed. As always, thank you to everyone who took the time to file issues, test patches and suggest improvements. For a complete list of changes, consult the changelog.
9
+ Revisiting resource capabilities was also an opportunity to increase the maximum size of secret notes to 50 000 characters, leaving ample room for full certificate chains, keys of any flavour or any long text you need to keep encrypted.
10
+
11
+ This release further improves cryptographic performance by introducing elliptic-curve keys (Curve25519/Ed25519) for new users. These keys provide security comparable to RSA-3072 while significantly reducing processing time and payload size.
12
+
13
+ Performance has been tuned for large organisations that manage substantial numbers of users or resources. Among other improvements: Users' workspace now opens more quickly, and deleting multiple resources generates fewer I/O operations.
14
+
15
+ Czech joins the list of supported languages, allowing native speakers to use Passbolt entirely in their own words, vítejte!
16
+
17
+ Many thanks to everyone who reported issues and tested encrypted metadata over the past months. Your feedback made this release possible and brings these new features to all users today.
10
18
 
11
19
  ### Added
12
- - PB-43269 Create the entity CustomFieldEntity
13
- - PB-43271 Create the entity collection CustomFieldsCollection
14
- - PB-43273 Create the entity SecretDataV5StandaloneCustomFieldsCollection
15
- - PB-43275 Update the resource types schema definitions
16
- - PB-43277 Update the ResourceMetadataEntity
17
- - PB-43278 Update the ResourceFormEntity
18
- - PB-43279 Update the Secret Entities
19
- - PB-43283 Display a new entry the create/edit dialog to set custom fields on the left sidebar and the menu
20
- - PB-43284 Create the CustomFieldForm for the create/edit dialog
21
- - PB-43285 Handle the CustomFieldForm warnings and limitation
22
- - PB-43286 Update create/edit resource to select secret custom fields for a standalone custom fields
23
- - PB-43287 Display the Custom Fields section on the right sidebar
24
- - PB-43289 Display standalone custom fields in the component DisplayResourceCreationMenu
25
- - PB-43290 Display standalone custom fields in the component DisplayResourcesWorkspaceMainMenu
26
- - PB-43291 Display the URIs section in the right sidebar
27
- - PB-43374 Add validation on keys and values of each elements of custom fields for the resource form entity
28
- - PB-43377 Add set collection into entity v2
29
- - PB-43145 Find a list of resources based on IDs and that are suitable for local storage from the API
30
- - PB-43146 Find a list of resources based on a parent folder id and that are suitable for the local storage from the API
31
- - PB-43133 Display padding below tags in resource workspace left sidebar
32
- - PB-42185 The folder caret that expands or collapses folders in the tree should have a larger clickable area to make it easier to use
33
- - PB-43222 Improve the group dialog to match the new share dimensions
34
- - PB-43147 Find and update resources based on parent folder id for the local storage
35
- - PB-43148 Create a connector for finding resources based on a parent id for the styleguide to call it later
36
- - PB-43149 Create a ResourcesServiceWorkerService to call the service worker for resource related operations
37
- - PB-43150 Implement the optimised call in the Styleguide when filtering by a folder
38
- - PB-43151 Optimise the data retrieved from the API such that updates are not done if unnecessary
39
- - PB-43156 Clarify implications for backups and other devices before changing the passphrase in the user settings workspace
40
- - PB-43489 Display unexpected error if there is any issue during the secret decryption
20
+ - PB-44201: E2EE The organisation settings offer now a simplified way to activate metadata encryption and the new resource types
21
+ - PB-42205: E2EE encrypted metadata and new resource types are activated by default after the first administrator setup
22
+ - PB-43255: Add support for multiple uri import export on kdbx files
23
+ - PB-43110: ZK - WP4.2 As a signed-in user I should not be allowed to upgrade resources with missing key situation
24
+ - PB-43712: Translate the application in Czech
25
+ - PB-43939: ZK - WP3.2 Add an app event to get or find the metadata keys settings
26
+ - PB-43980: Add support for custom field import export on kdbx files
27
+ - PB-44080: ZK - WP4.1 Create a dialog explaining the missing key situation
28
+ - PB-44081: ZK - WP4.3 As a signed-in user I should not be allowed to create resources with missing key situation in the resource workspace
29
+ - PB-44090: ZK - WP4.4 As a signed-in user I should not be allowed to edit resources with missing key situation
30
+ - PB-44091: ZK - WP4.5 As a signed-in user I should not be allowed to share resources with missing key situation
31
+ - PB-44094: ZK - WP4.6 As a signed-in user I should not be allowed to import resources with missing key situation
32
+ - PB-44095: ZK - WP4.7 As a signed-in user I should not be allowed to move resources with missing key situation
33
+ - PB-44096: ZK - WP4.8 As a signed-in user I should not be allowed to move folders with missing key situation
34
+ - PB-44097: ZK - WP4.9 Display a page explaining the missing key situation on the quick app
35
+ - PB-44098: ZK - WP4.10 As a signed-in user I should not be allowed to create resources with missing key situation in the quick app
36
+ - PB-44099: ZK - WP4.11 As a signed-in user I should not be allowed to generate password on the inform menu
37
+ - PB-44206: ZK - WP4.14 As administrators I cannot trigger the encrypted metadata migration if I have missing metadata keys
38
+ - PB-44211: ZK - WP3.5 Add MetadataKeysSettingsLocalStorageContextProvider to the App and the quick-app and the inform menu
39
+ - PB-44212: CU - WP5.2 Update ExternalResourceEntity buildDtoFromResourceEntityDto to support custom fields
40
+ - PB-44286: ZK - WP3.6 Add a quick app and inform menu event to get the metadata keys settings
41
+ - PB-44295: ZK - WP4.15 As a signed-in user with missing keys I should not be able to create resource if metadata shared key is enforced on the inform menu
42
+ - PB-44296: ZK - WP4.16 As a signed-in user I should not be allowed to move shared folders into personal folders with missing key situation
43
+ - PB-44327: Display sub-folders in breadcrumbs
44
+ - PB-44374: Extend notes v5 max length to 50_000
41
45
 
42
46
  ### Fixed
43
- - PB-43109 Fix: from the sidebar when upgrade from v4 to v5 goes wrong the error message in the notification
44
- - PB-43118 Hide the "Share metadata keys" button in the users workspace action bar for the current signed-in user
45
- - PB-43215 Fix account recovery creator name
46
- - PB-43063 Fix group edit dialog double warning message has broken UI
47
- - PB-43117 Hide the "Share metadata keys" button in the users workspace action bar after sharing missing metadata keys with a user
48
- - PB-43064 Fix group edit dialog can show a mix of error and warning messages
49
- - PB-43150: fix folder not being reloaded
50
- - PB-43424 Clicking on the "open in a new tab” call to action in the quick application should open the resource url in a new tab
51
- - PB-43108 Display attention required icon on "metadata keys" label in the user details sidebar if the user is not having access to some metadata keys
52
- - PB-43217 The default icon stroke width is too thick in the grid and doesn't match the custom icons
53
- - PB-43220 Copy URL field action button lacks padding and is broken in the SSO settings
54
- - PB-43168 Align vertically resources workspace select check-boxes
55
- - PB-43211 The feedback message notifying the administrator when a metadata key has been shared with a user contains a typo
56
- - PB-43471 Center vertically the icon on the create and edit dialog
47
+ - PB-43296: Displaying resource activities should not crash the application when a resource activity does not have related user or group
48
+ - PB-43652: The sentence to change the passphrase in the user settings workspace should have a space after.
49
+ - PB-43657: Resources loading became noticeably slower after migrating to encrypted
50
+ - PB-43667: Cancelling the user passphrase request should not trigger an error when sharing missing metadata key
51
+ - PB-43676: Cancelling the user passphrase should not freeze the create resource dialog
52
+ - PB-43719: After importing resources from Bitwarden the URIs are not separated correctly
53
+ - PB-43784: Display the progression of the encryption of metadata in the import dialog
54
+ - PB-43906: User should be notified of any errors while loading comments
55
+ - PB-44079: Update/Create a method in resourceLocalStorage.js to bulk delete resources
56
+ - PB-44161: As a user I should not see the resource description and note warning message if only one of them is concerned
57
+ - PB-44273: Activities are not loaded when new resource is clicked after load more activities of a previous resource
58
+
59
+ ### Maintenance
60
+ - PB-43585: Azure SSO login_hint settings can now be configured
61
+ - PB-43908: Move logic of commentModel file to a service and update assertions in controllers
62
+ - PB-44076: Create a Controller to handle Resource Delete
63
+ - PB-44077: Create a dedicated Service to handle resource deletion
64
+ - PB-44396: the endpoint complete/recover.json is now used instead of the legacy endpoint
65
+
66
+ ### Security
67
+ - PB-43730: Upgrade vulnerable library brace-expansion
package/crowdin.yml CHANGED
@@ -20,4 +20,5 @@ export_languages:
20
20
  - sl
21
21
  - sv
22
22
  - uk
23
+ - cs
23
24
  commit_message: '[skip-ci]'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "passbolt-browser-extension",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "license": "AGPL-3.0",
5
5
  "copyright": "Copyright 2025 Passbolt SA",
6
6
  "description": "Passbolt web extension for the open source password manager for teams",
@@ -22,7 +22,7 @@
22
22
  "locutus": "~2.0.9",
23
23
  "openpgp": "^6.1.1",
24
24
  "papaparse": "^5.5.2",
25
- "passbolt-styleguide": "^5.3.1",
25
+ "passbolt-styleguide": "^5.4.3",
26
26
  "react": "17.0.2",
27
27
  "react-dom": "17.0.2",
28
28
  "secrets-passbolt": "github:passbolt/secrets.js#v2.0.1",
@@ -75,12 +75,13 @@
75
75
  "cheerio": {
76
76
  "undici": "6.21.2"
77
77
  }
78
- }
78
+ },
79
+ "brace-expansion": "^1.1.12"
79
80
  },
80
81
  "scripts": {
81
82
  "build": "npx grunt build",
82
83
  "build:background-page": "webpack --config webpack.background-page.config.js",
83
- "build:service-worker": "webpack --config webpack.service-worker.config.js; webpack --config webpack-offscreens.fetch.config.js",
84
+ "build:service-worker": "webpack --config webpack.service-worker.config.js; webpack --config webpack-offscreens.config.js",
84
85
  "build:content-scripts": "npm run build:content-scripts:app; npm run build:content-scripts:browser-integration; npm run build:content-scripts:public-website",
85
86
  "build:content-scripts:app": "webpack --config webpack-content-scripts.config.js",
86
87
  "build:content-scripts:browser-integration": "webpack --config webpack-content-scripts.browser-integration.config.js",
@@ -89,7 +90,7 @@
89
90
  "build:web-accessible-resources:app": "webpack --config webpack-data.config.js; webpack --config webpack-data.download.config.js",
90
91
  "build:web-accessible-resources:browser-integration": "webpack --config webpack-data.in-form-call-to-action.config.js; webpack --config webpack-data.in-form-menu.config.js",
91
92
  "dev:build:background-page": "webpack --env debug=true --config webpack.background-page.config.js",
92
- "dev:build:service-worker": "webpack --env debug=true --config webpack.service-worker.config.js; webpack --env debug=true --config webpack-offscreens.fetch.config.js",
93
+ "dev:build:service-worker": "webpack --env debug=true --config webpack.service-worker.config.js; webpack --env debug=true --config webpack-offscreens.config.js",
93
94
  "dev:build:content-scripts": "npm run dev:build:content-scripts:app; npm run dev:build:content-scripts:browser-integration; npm run dev:build:content-scripts:public-website",
94
95
  "dev:build:content-scripts:app": "webpack --env debug=true --config webpack-content-scripts.config.js",
95
96
  "dev:build:content-scripts:browser-integration": "webpack --env debug=true --config webpack-content-scripts.browser-integration.config.js",
@@ -112,7 +113,7 @@
112
113
  "lint:eslint-fix": "eslint -c .eslintrc.json --ext js --ext jsx --fix src",
113
114
  "i18n:externalize": "i18next -c ./i18next-parser.config.js",
114
115
  "test": "npm run test:unit",
115
- "test:unit": "jest --no-cache ./src/all/ ./src/chrome-mv3/",
116
+ "test:unit": "jest --no-cache ./src/all/ ./src/chrome-mv3/ ./src/chrome/",
116
117
  "test:coverage": "jest --no-cache ./src/all/ ./src/chrome-mv3/ --coverage",
117
118
  "test:ci:coverage": "npm run test:coverage -- --runInBand"
118
119
  }
@@ -0,0 +1,10 @@
1
+ {
2
+ "appName": {
3
+ "message": "Passbolt - Open source správce hesel",
4
+ "description": "The application name of the extension, displayed in the web store. 45 characters max."
5
+ },
6
+ "appDescription": {
7
+ "message": "Rozšíření Passbolt pro open source správce hesel pro týmy.",
8
+ "description": "The description of the extension, displayed in the web store. 85 characters max."
9
+ }
10
+ }
@@ -88,13 +88,13 @@ class InformMenuController {
88
88
  const webIntegrationWorker = await WorkerService.get('WebIntegration', this.worker.tab.id);
89
89
  const {username, password: secret_clear} = await webIntegrationWorker.port.request('passbolt.web-integration.get-credentials');
90
90
 
91
- // Retrieve resource name and uri from tab.
91
+ // Retrieve resource name and uris from tab.
92
92
  const tab = await BrowserTabService.getCurrent();
93
93
  const name = tab.title;
94
- const uri = tab.url.substr(0, ResourceMetadataEntity.URI_MAX_LENGTH);
94
+ const uris = [tab.url.substr(0, ResourceMetadataEntity.URI_MAX_LENGTH)];
95
95
 
96
96
  // Store the resource to save in cache.
97
- const resourceDto = {name: name, username: username, uri: uri, secret_clear: secret_clear};
97
+ const resourceDto = {name: name, username: username, uris: uris, secret_clear: secret_clear};
98
98
  const resource = new ExternalResourceEntity(resourceDto);
99
99
  await ResourceInProgressCacheService.set(resource);
100
100
 
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Passbolt ~ Open source password manager for teams
3
+ * Copyright (c) Passbolt SA (https://www.passbolt.com)
4
+ *
5
+ * Licensed under GNU Affero General Public License version 3 of the or any later version.
6
+ * For full copyright and license information, please see the LICENSE.txt
7
+ * Redistributions of files must retain the above copyright notice.
8
+ *
9
+ * @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
10
+ * @license https://opensource.org/licenses/AGPL-3.0 AGPL License
11
+ * @link https://www.passbolt.com Passbolt(tm)
12
+ * @since 5.4.0
13
+ */
14
+
15
+ export default class RedirectPostLoginController {
16
+ /**
17
+ * @constructor
18
+ * @param {Worker} worker
19
+ * @param {string} requestId
20
+ * @param {AbstractAccountEntity} apiClientOptions the api client options
21
+ */
22
+ constructor(worker, requestId, account) {
23
+ this.worker = worker;
24
+ this.requestId = requestId;
25
+ this.account = account;
26
+ }
27
+
28
+ /**
29
+ * Controller executor.
30
+ * @returns {Promise<void>}
31
+ */
32
+ async _exec() {
33
+ try {
34
+ await this.exec();
35
+ this.worker.port.emit(this.requestId, 'SUCCESS');
36
+ } catch (error) {
37
+ console.error(error);
38
+ this.worker.port.emit(this.requestId, 'ERROR', error);
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Redirects the user to the app main page
44
+ * or to the redirect url if a `redirect` parameter is given in the worker URL.
45
+ * @returns {Promise<void>}
46
+ */
47
+ async exec() {
48
+ const workerUrl = new URL(this.worker.tab.url);
49
+ const redirectTo = workerUrl.searchParams.get("redirect");
50
+
51
+ const url = /^\/[A-Za-z0-9\-\/]*$/.test(redirectTo)
52
+ ? `${this.account.domain}${redirectTo}`
53
+ : this.account.domain;
54
+
55
+ chrome.tabs.update(this.worker.tab.id, {url});
56
+ }
57
+ }
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Passbolt ~ Open source password manager for teams
3
+ * Copyright (c) Passbolt SA (https://www.passbolt.com)
4
+ *
5
+ * Licensed under GNU Affero General Public License version 3 of the or any later version.
6
+ * For full copyright and license information, please see the LICENSE.txt
7
+ * Redistributions of files must retain the above copyright notice.
8
+ *
9
+ * @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
10
+ * @license https://opensource.org/licenses/AGPL-3.0 AGPL License
11
+ * @link https://www.passbolt.com Passbolt(tm)
12
+ * @since 5.4.0
13
+ */
14
+
15
+ import AccountEntity from "../../model/entity/account/accountEntity";
16
+ import {defaultAccountDto} from "../../model/entity/account/accountEntity.test.data";
17
+ import RedirectPostLoginController from "./redirectPostLoginController";
18
+
19
+ beforeEach(() => {
20
+ jest.resetAllMocks();
21
+ });
22
+
23
+ describe("RedirectPostLoginController", () => {
24
+ describe("::exec", () => {
25
+ it("should redirect to the main entry point if no redirect is set", async() => {
26
+ expect.assertions(2);
27
+
28
+ const worker = {
29
+ tab: {
30
+ id: 42,
31
+ url: "https://www.passbolt.com/test",
32
+ },
33
+ };
34
+ const account = new AccountEntity(defaultAccountDto());
35
+ const controller = new RedirectPostLoginController(worker, null, account);
36
+ jest.spyOn(chrome.tabs, "update").mockImplementation(() => {});
37
+
38
+ await controller.exec();
39
+
40
+ expect(chrome.tabs.update).toHaveBeenCalledTimes(1);
41
+ expect(chrome.tabs.update).toHaveBeenCalledWith(worker.tab.id, {url: account.domain});
42
+ });
43
+
44
+ it("should redirect to the given URL if a redirect is set", async() => {
45
+ expect.assertions(2);
46
+
47
+ const worker = {
48
+ tab: {
49
+ id: 42,
50
+ url: "https://www.passbolt.com/test?redirect=/app/administration",
51
+ },
52
+ };
53
+ const account = new AccountEntity(defaultAccountDto());
54
+ const controller = new RedirectPostLoginController(worker, null, account);
55
+ jest.spyOn(chrome.tabs, "update").mockImplementation(() => {});
56
+
57
+ await controller.exec();
58
+
59
+ expect(chrome.tabs.update).toHaveBeenCalledTimes(1);
60
+ expect(chrome.tabs.update).toHaveBeenCalledWith(worker.tab.id, {url: `${account.domain}/app/administration`});
61
+ });
62
+
63
+ it("should not redirect to the given URL if it is not valid", async() => {
64
+ expect.assertions(2);
65
+
66
+ const worker = {
67
+ tab: {
68
+ id: 42,
69
+ url: "https://www.passbolt.com/test?redirect=https://localhost",
70
+ },
71
+ };
72
+ const account = new AccountEntity(defaultAccountDto());
73
+ const controller = new RedirectPostLoginController(worker, null, account);
74
+ jest.spyOn(chrome.tabs, "update").mockImplementation(() => {});
75
+
76
+ await controller.exec();
77
+
78
+ expect(chrome.tabs.update).toHaveBeenCalledTimes(1);
79
+ expect(chrome.tabs.update).toHaveBeenCalledWith(worker.tab.id, {url: account.domain});
80
+ });
81
+ });
82
+ });
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Passbolt ~ Open source password manager for teams
3
+ * Copyright (c) Passbolt SA (https://www.passbolt.com)
4
+ *
5
+ * Licensed under GNU Affero General Public License version 3 of the or any later version.
6
+ * For full copyright and license information, please see the LICENSE.txt
7
+ * Redistributions of files must retain the above copyright notice.
8
+ *
9
+ * @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
10
+ * @license https://opensource.org/licenses/AGPL-3.0 AGPL License
11
+ * @link https://www.passbolt.com Passbolt(tm)
12
+ * @since 5.4.0
13
+ */
14
+
15
+ export default class RedirectToAdminWorkspaceController {
16
+ /**
17
+ * @constructor
18
+ * @param {Worker} worker
19
+ * @param {string} requestId
20
+ * @param {AbstractAccountEntity} apiClientOptions the api client options
21
+ */
22
+ constructor(worker, requestId, account) {
23
+ this.worker = worker;
24
+ this.requestId = requestId;
25
+ this.account = account;
26
+ }
27
+
28
+ /**
29
+ * Controller executor.
30
+ * @returns {Promise<void>}
31
+ */
32
+ async _exec() {
33
+ try {
34
+ await this.exec();
35
+ this.worker.port.emit(this.requestId, 'SUCCESS');
36
+ } catch (error) {
37
+ console.error(error);
38
+ this.worker.port.emit(this.requestId, 'ERROR', error);
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Redirects the user to the admin workspace
44
+ * @returns {Promise<void>}
45
+ */
46
+ async exec() {
47
+ const url = `${this.account.domain}/app/administration`;
48
+ chrome.tabs.update(this.worker.tab.id, {url});
49
+ }
50
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Passbolt ~ Open source password manager for teams
3
+ * Copyright (c) Passbolt SA (https://www.passbolt.com)
4
+ *
5
+ * Licensed under GNU Affero General Public License version 3 of the or any later version.
6
+ * For full copyright and license information, please see the LICENSE.txt
7
+ * Redistributions of files must retain the above copyright notice.
8
+ *
9
+ * @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
10
+ * @license https://opensource.org/licenses/AGPL-3.0 AGPL License
11
+ * @link https://www.passbolt.com Passbolt(tm)
12
+ * @since 5.4.0
13
+ */
14
+
15
+ import AccountEntity from "../../model/entity/account/accountEntity";
16
+ import {defaultAccountDto} from "../../model/entity/account/accountEntity.test.data";
17
+ import RedirectToAdminWorkspaceController from "./redirectToAdminWorkspaceController";
18
+
19
+ beforeEach(() => {
20
+ jest.resetAllMocks();
21
+ });
22
+
23
+ describe("RedirectToAdminWorkspaceController", () => {
24
+ describe("::exec", () => {
25
+ it("should redirect to the administration workspace", async() => {
26
+ expect.assertions(2);
27
+
28
+ const worker = {
29
+ tab: {
30
+ id: 42,
31
+ },
32
+ };
33
+ const account = new AccountEntity(defaultAccountDto());
34
+ const expectedUrl = `${account.domain}/app/administration`;
35
+ console.log(expectedUrl);
36
+ const controller = new RedirectToAdminWorkspaceController(worker, null, account);
37
+ jest.spyOn(chrome.tabs, "update").mockImplementation(() => {});
38
+
39
+ await controller.exec();
40
+
41
+ expect(chrome.tabs.update).toHaveBeenCalledTimes(1);
42
+ expect(chrome.tabs.update).toHaveBeenCalledWith(worker.tab.id, {url: expectedUrl});
43
+ });
44
+ });
45
+ });
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Passbolt ~ Open source password manager for teams
3
+ * Copyright (c) Passbolt SA (https://www.passbolt.com)
4
+ *
5
+ * Licensed under GNU Affero General Public License version 3 of the or any later version.
6
+ * For full copyright and license information, please see the LICENSE.txt
7
+ * Redistributions of files must retain the above copyright notice.
8
+ *
9
+ * @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
10
+ * @license https://opensource.org/licenses/AGPL-3.0 AGPL License
11
+ * @link https://www.passbolt.com Passbolt(tm)
12
+ * @since 5.3.2
13
+ */
14
+
15
+ import CopyToClipboardService from "../../service/clipboard/copyToClipboardService";
16
+
17
+ export default class CancelClipboardContentFlushController {
18
+ /**
19
+ * CancelClipboardContentFlushController constructor
20
+ * @param {Worker} worker
21
+ * @param {string} requestId uuid
22
+ */
23
+ constructor(worker, requestId) {
24
+ this.worker = worker;
25
+ this.requestId = requestId;
26
+ this.copyToClipboardService = new CopyToClipboardService();
27
+ }
28
+
29
+ /**
30
+ * Wrapper of exec function to run it with worker.
31
+ * @return {Promise<void>}
32
+ */
33
+ async _exec() {
34
+ try {
35
+ await this.exec();
36
+ this.worker.port.emit(this.requestId, "SUCCESS");
37
+ } catch (error) {
38
+ console.error(error);
39
+ this.worker.port.emit(this.requestId, "ERROR", error);
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Cancel flushing of the clipboard content
45
+ *
46
+ * @return {Promise<void>}
47
+ */
48
+ async exec() {
49
+ await this.copyToClipboardService.clearAlarm();
50
+ }
51
+ }