passbolt-browser-extension 5.16.1 → 5.17.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 (180) hide show
  1. package/CHANGELOG.md +105 -1
  2. package/RELEASE_NOTES.md +94 -4
  3. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager/AppDelegate.swift +3 -3
  4. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager/ViewController.swift +10 -10
  5. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/SafariWebExtensionHandler.swift +5 -5
  6. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/controllers/AbstractController.swift +5 -5
  7. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/controllers/ErrorController.swift +2 -2
  8. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/controllers/FetchController.swift +3 -3
  9. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/controllers/OpenSafariSettingsController.swift +1 -1
  10. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/controllers/SaveFileController.swift +2 -2
  11. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/controllers/WriteClipboardController.swift +3 -3
  12. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/services/fetch/SecureProfileSessionManager.swift +36 -30
  13. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/services/fetch/fetchService.swift +24 -24
  14. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/services/file/SaveFileService.swift +15 -15
  15. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/utils/ErrorSerializer.swift +13 -13
  16. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Extension/utils/LocatedError.swift +3 -3
  17. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/SafariWebExtensionHandlerTests.swift +3 -3
  18. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/controllers/AbstractControllerTests.swift +2 -2
  19. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/controllers/ErrorControllerTests.swift +1 -1
  20. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/controllers/FetchControllerTests.swift +1 -1
  21. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/controllers/OpenSafariSettingsControllerTests.swift +1 -1
  22. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/controllers/SaveFileControllerTests.swift +1 -1
  23. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/controllers/WriteClipboardControllerTests.swift +1 -1
  24. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/services/fetch/FetchServiceTests.swift +1 -1
  25. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/services/fetch/SecureProfileSessionManagerTests.swift +7 -7
  26. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/utils/ErrorSerializerTests.swift +17 -17
  27. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager Tests/utils/LocatedErrorTests.swift +12 -12
  28. package/build-safari-extension/Passbolt-Safari-Extension/Passbolt - password manager.xcodeproj/project.pbxproj +2 -4
  29. package/package.json +10 -7
  30. package/src/all/background_page/controller/accountRecovery/recoverAccountController.js +4 -0
  31. package/src/all/background_page/controller/accountRecovery/recoverAccountController.test.js +5 -1
  32. package/src/all/background_page/controller/informCallToActionController/informCallToActionController.js +4 -2
  33. package/src/all/background_page/controller/informCallToActionController/informCallToActionController.test.js +4 -2
  34. package/src/all/background_page/controller/mfaPolicy/mfaGetMfaSettingsController.test.js +13 -0
  35. package/src/all/background_page/controller/mfaSetup/MfaSetupAbortWebauthnCeremonyController.js +52 -0
  36. package/src/all/background_page/controller/mfaSetup/MfaSetupAbortWebauthnCeremonyController.test.js +54 -0
  37. package/src/all/background_page/controller/mfaSetup/MfaSetupBeginWebauthnCeremonyController.js +52 -0
  38. package/src/all/background_page/controller/mfaSetup/MfaSetupBeginWebauthnCeremonyController.test.js +54 -0
  39. package/src/all/background_page/controller/mfaSetup/MfaSetupDeleteWebauthnCredentialController.js +55 -0
  40. package/src/all/background_page/controller/mfaSetup/MfaSetupDeleteWebauthnCredentialController.test.js +55 -0
  41. package/src/all/background_page/controller/mfaSetup/MfaSetupFinishWebauthnCeremonyController.js +54 -0
  42. package/src/all/background_page/controller/mfaSetup/MfaSetupFinishWebauthnCeremonyController.test.js +54 -0
  43. package/src/all/background_page/controller/mfaSetup/MfaSetupGetWebauthnCredentialsController.js +54 -0
  44. package/src/all/background_page/controller/mfaSetup/MfaSetupGetWebauthnCredentialsController.test.js +61 -0
  45. package/src/all/background_page/controller/mfaSetup/MfaSetupGetWebauthnSettingsController.js +53 -0
  46. package/src/all/background_page/controller/mfaSetup/MfaSetupGetWebauthnSettingsController.test.js +57 -0
  47. package/src/all/background_page/controller/mfaSetup/MfaSetupHandleWebauthnCeremonyResultController.js +55 -0
  48. package/src/all/background_page/controller/mfaSetup/MfaSetupHandleWebauthnCeremonyResultController.test.js +52 -0
  49. package/src/all/background_page/controller/move/moveFolderController.js +12 -12
  50. package/src/all/background_page/controller/move/moveFolderController.test.js +31 -1
  51. package/src/all/background_page/controller/move/moveResourcesController.js +18 -5
  52. package/src/all/background_page/controller/move/moveResourcesController.test.js +68 -7
  53. package/src/all/background_page/controller/recover/completeRecoverController.js +4 -0
  54. package/src/all/background_page/controller/recover/completeRecoverController.test.js +5 -1
  55. package/src/all/background_page/controller/setup/completeSetupController.js +4 -0
  56. package/src/all/background_page/controller/setup/completeSetupController.test.js +5 -1
  57. package/src/all/background_page/error/webauthnAlreadyRunningCeremonyError.js +24 -0
  58. package/src/all/background_page/error/webauthnAuthenticatorAlreadyRegisteredError.js +26 -0
  59. package/src/all/background_page/error/webauthnCeremonyAbortedError.js +26 -0
  60. package/src/all/background_page/error/webauthnCeremonyCancelledError.js +26 -0
  61. package/src/all/background_page/error/webauthnCeremonyError.js +26 -0
  62. package/src/all/background_page/error/webauthnCeremonyNotFoundError.js +26 -0
  63. package/src/all/background_page/error/webauthnTLSCertificateError.js +24 -0
  64. package/src/all/background_page/event/appBootstrapEvents.js +32 -0
  65. package/src/all/background_page/event/appBootstrapEvents.test.js +31 -0
  66. package/src/all/background_page/event/folderEvents.js +5 -4
  67. package/src/all/background_page/event/informCallToActionEvents.js +3 -2
  68. package/src/all/background_page/event/mfaEvents.js +38 -1
  69. package/src/all/background_page/event/resourceEvents.js +9 -5
  70. package/src/all/background_page/index.js +16 -0
  71. package/src/all/background_page/model/entity/folder/foldersCollection.js +13 -9
  72. package/src/all/background_page/model/entity/folder/foldersCollection.test.data.js +35 -0
  73. package/src/all/background_page/model/entity/folder/foldersCollection.test.js +60 -0
  74. package/src/all/background_page/model/entity/mfa/mfaEnabledProviderEntity.js +11 -0
  75. package/src/all/background_page/model/entity/mfa/mfaEnabledProviderEntity.test.js +13 -0
  76. package/src/all/background_page/model/entity/mfa/mfaWebauthnCredentialEntity.js +126 -0
  77. package/src/all/background_page/model/entity/mfa/mfaWebauthnCredentialEntity.test.data.js +26 -0
  78. package/src/all/background_page/model/entity/mfa/mfaWebauthnCredentialEntity.test.js +105 -0
  79. package/src/all/background_page/model/entity/mfa/mfaWebauthnCredentialsCollection.js +52 -0
  80. package/src/all/background_page/model/entity/mfa/mfaWebauthnCredentialsCollection.test.data.js +22 -0
  81. package/src/all/background_page/model/entity/mfa/mfaWebauthnCredentialsCollection.test.js +60 -0
  82. package/src/all/background_page/model/entity/mfa/mfaWebauthnSettingsEntity.js +45 -0
  83. package/src/all/background_page/model/entity/mfa/mfaWebauthnSettingsEntity.test.data.js +17 -0
  84. package/src/all/background_page/model/entity/mfa/mfaWebauthnSettingsEntity.test.js +48 -0
  85. package/src/all/background_page/model/entity/mfa/webauthnCredentialCreationOptionsEntity.js +235 -0
  86. package/src/all/background_page/model/entity/mfa/webauthnCredentialCreationOptionsEntity.test.data.js +42 -0
  87. package/src/all/background_page/model/entity/mfa/webauthnCredentialCreationOptionsEntity.test.js +152 -0
  88. package/src/all/background_page/model/entity/mfa/webauthnRegistrationResponseEntity.js +72 -0
  89. package/src/all/background_page/model/entity/mfa/webauthnRegistrationResponseEntity.test.data.js +26 -0
  90. package/src/all/background_page/model/entity/mfa/webauthnRegistrationResponseEntity.test.js +83 -0
  91. package/src/all/background_page/model/entity/mfa/webauthnSetupCeremonyEntity.js +121 -0
  92. package/src/all/background_page/model/entity/mfa/webauthnSetupCeremonyEntity.test.data.js +36 -0
  93. package/src/all/background_page/model/entity/mfa/webauthnSetupCeremonyEntity.test.js +100 -0
  94. package/src/all/background_page/model/entity/permission/change/permissionChangesCollection.js +0 -59
  95. package/src/all/background_page/model/entity/permission/change/permissionChangesCollection.test.js +0 -333
  96. package/src/all/background_page/model/entity/userAndGroupSearchResultEntity/userAndGroupSearchResultEntity.js +1 -1
  97. package/src/all/background_page/model/entity/userAndGroupSearchResultEntity/userAndGroupSearchResultEntity.test.js +19 -1
  98. package/src/all/background_page/pagemod/accountRecoveryBootstrapPagemod.test.js +1 -1
  99. package/src/all/background_page/pagemod/appBootstrapPagemod.js +2 -1
  100. package/src/all/background_page/pagemod/appBootstrapPagemod.test.js +8 -8
  101. package/src/all/background_page/pagemod/authBootstrapPagemod.test.js +1 -1
  102. package/src/all/background_page/pagemod/pagemod.js +3 -1
  103. package/src/all/background_page/pagemod/pagemod.test.js +1 -1
  104. package/src/all/background_page/pagemod/publicWebsiteSignInPagemod.test.js +1 -1
  105. package/src/all/background_page/pagemod/recoverBootstrapPagemod.test.js +1 -1
  106. package/src/all/background_page/pagemod/setupBootstrapPagemod.test.js +1 -1
  107. package/src/all/background_page/pagemod/webIntegrationPagemod.test.js +1 -1
  108. package/src/all/background_page/sdk/port/portManager.js +13 -1
  109. package/src/all/background_page/sdk/port/portManager.test.js +98 -0
  110. package/src/all/background_page/service/api/mfa/webauthnApiService.js +76 -0
  111. package/src/all/background_page/service/api/mfa/webauthnApiService.test.js +119 -0
  112. package/src/all/background_page/service/api/mfa/webauthnSettingsApiService.js +44 -0
  113. package/src/all/background_page/service/api/mfa/webauthnSettingsApiService.test.js +56 -0
  114. package/src/all/background_page/service/auth/postLoginService.js +2 -1
  115. package/src/all/background_page/service/auth/postLoginService.test.js +1 -1
  116. package/src/all/background_page/service/auth/postLogoutService.js +2 -1
  117. package/src/all/background_page/service/auth/postLogoutService.test.js +24 -1
  118. package/src/all/background_page/service/extension/onExtensionUpdateAvailableService.test.js +2 -6
  119. package/src/all/background_page/service/group/groupUpdateSecretsCryptoService.js +1 -1
  120. package/src/all/background_page/service/group/groupUpdateService.js +1 -1
  121. package/src/all/background_page/service/group/groupUpdateService.test.js +3 -3
  122. package/src/all/background_page/service/localStorage/localStorageService.js +2 -0
  123. package/src/all/background_page/service/localStorage/localStorageService.test.js +3 -2
  124. package/src/all/background_page/service/mfa/validateWebauthnCreationOptionsService.js +41 -0
  125. package/src/all/background_page/service/mfa/validateWebauthnCreationOptionsService.test.js +52 -0
  126. package/src/all/background_page/service/mfa/webauthnSetupCeremonyService.js +266 -0
  127. package/src/all/background_page/service/mfa/webauthnSetupCeremonyService.test.js +437 -0
  128. package/src/all/background_page/service/move/deserializeConfirmedMovePermissions.js +41 -0
  129. package/src/all/background_page/service/move/deserializeConfirmedMovePermissions.test.js +80 -0
  130. package/src/all/background_page/service/move/moveOneFolderService.js +88 -135
  131. package/src/all/background_page/service/move/moveOneFolderService.test.js +774 -5237
  132. package/src/all/background_page/service/move/moveResourcesService.js +68 -40
  133. package/src/all/background_page/service/move/moveResourcesService.test.data.js +53 -0
  134. package/src/all/background_page/service/move/moveResourcesService.test.js +559 -2090
  135. package/src/all/background_page/service/offline/getOrFindOfflineSettingsService.js +2 -1
  136. package/src/all/background_page/service/offline/getOrFindOfflineSettingsService.test.js +23 -0
  137. package/src/all/background_page/service/permission/calculatePermissionsChangesService.js +172 -0
  138. package/src/all/background_page/service/permission/calculatePermissionsChangesService.test.js +370 -0
  139. package/src/all/background_page/service/rbac/getOrFindRbacService.js +2 -1
  140. package/src/all/background_page/service/resourceType/getOrFindResourceTypesService.js +2 -1
  141. package/src/all/background_page/service/resourceType/getOrFindResourceTypesService.test.js +19 -0
  142. package/src/all/background_page/service/sessionStorage/webauthnSetupCeremonySessionStorageService.js +62 -0
  143. package/src/all/background_page/service/sessionStorage/webauthnSetupCeremonySessionStorageService.test.js +60 -0
  144. package/src/all/background_page/service/sessionStorage/workersSessionStorage.js +30 -0
  145. package/src/all/background_page/service/sessionStorage/workersSessionStorage.test.js +55 -0
  146. package/src/all/background_page/service/share/shareFoldersService.js +20 -36
  147. package/src/all/background_page/service/share/shareFoldersService.test.js +236 -0
  148. package/src/all/background_page/service/tab/tabService.js +3 -2
  149. package/src/all/background_page/service/toolbar/toolbarService.js +13 -5
  150. package/src/all/background_page/service/ui/browserTab.service.js +6 -4
  151. package/src/all/background_page/service/ui/browserTab.service.test.js +19 -6
  152. package/src/all/background_page/service/user/getOrFindMeService.js +2 -1
  153. package/src/all/background_page/service/user/getOrFindMeService.test.js +17 -0
  154. package/src/all/background_page/service/worker/workerService.js +42 -11
  155. package/src/all/background_page/service/worker/workerService.test.js +70 -2
  156. package/src/all/contentScripts/js/app/App.js +2 -0
  157. package/src/all/contentScripts/js/controller/abortWebauthnSetupCeremonyContentScriptController.js +62 -0
  158. package/src/all/contentScripts/js/controller/abortWebauthnSetupCeremonyContentScriptController.test.js +44 -0
  159. package/src/all/contentScripts/js/controller/runWebauthnSetupCeremonyContentScriptController.js +65 -0
  160. package/src/all/contentScripts/js/controller/runWebauthnSetupCeremonyContentScriptController.test.js +70 -0
  161. package/src/all/contentScripts/js/event/webauthnSetupCeremonyEvents.js +33 -0
  162. package/src/all/contentScripts/js/service/webauthnSetupCeremonyContentScriptService.js +154 -0
  163. package/src/all/contentScripts/js/service/webauthnSetupCeremonyContentScriptService.test.js +252 -0
  164. package/src/all/locales/en-UK/common.json +0 -1
  165. package/src/all/webAccessibleResources/js/lib/port.js +106 -10
  166. package/src/all/webAccessibleResources/js/lib/port.test.js +174 -1
  167. package/src/chrome/manifest.json +2 -3
  168. package/src/chrome-mv3/index.js +6 -0
  169. package/src/chrome-mv3/manifest.json +3 -4
  170. package/src/firefox/manifest.json +2 -3
  171. package/src/safari/background_page/index.js +2 -1
  172. package/src/safari/background_page/service/cookies/cookiesService.js +9 -3
  173. package/src/safari/background_page/service/cookies/cookiesService.test.js +28 -1
  174. package/src/safari/manifest.json +2 -3
  175. package/test/mocks/mockWebExtensionPolyfill.js +2 -4
  176. package/src/all/background_page/service/move/calculatePermissionsChangesForMoveService.js +0 -113
  177. package/src/all/background_page/service/move/calculatePermissionsChangesForMoveService.test.js +0 -158
  178. package/src/all/background_page/service/move/confirmMoveStrategyService.js +0 -42
  179. package/src/all/background_page/service/move/confirmMoveStrategyService.test.js +0 -67
  180. /package/src/all/background_page/service/{move/calculatePermissionsChangesForMoveService.test.data.js → permission/calculatePermissionsChangesService.test.data.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,107 @@ All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
  ## [Unreleased]
6
+ ## [5.17.0] - 2026-10-15
7
+ ### Added
8
+ PB-53327 Include group membership changes in the permission drift calculation before saving
9
+ PB-53450 AUTOFILL - WP 2.0 - Create the orphanDictionary for the DOM extraction
10
+ PB-53451 Add OrphanFieldPredicates class to check wether an element is a button
11
+ PB-53452 AUTOFILL - WP 2.2 - Create the FieldVisibilityService to avoid detection of hidden inputs
12
+ PB-53460 Add FormExtractionService to gather forms with viewable text fields
13
+ PB-53461 AUTOFILL - WP 2.4 - Create the OrphanFieldsExtractionService to extract build the orphan forms
14
+ PB-53462 Create NestedFormExtractionService
15
+ PB-53464 Rework InFormCredentialsFormField
16
+ PB-53465 AUTOFILL - WP 2.8 - Update the InFormManager to use the new extraction logic
17
+ PB-53466 AUTOFILL - WP 3.0 - Create the TextNormalizer as an helper to infer on extracted text
18
+ PB-53480 AUTOFILL - WP 3.1 - Create the ScrapingDictionary to handle scraping constants
19
+ PB-53482 AUTOFILL - WP 3.2 - Create the ScrapingIdentity to support identifier after scraping
20
+ PB-53483 AUTOFILL - WP 3.3 - Create the ScrapingCache object
21
+ PB-53484 AUTOFILL - WP 3.4 - Create the PageScraperHelpers to group helpers used for scraping
22
+ PB-53485 AUTOFILL - WP 3.5 - Create the LabelScraper to handle the label logic extraction
23
+ PB-53486 AUTOFILL - WP 3.6 - Create the FieldScraper to handle the field extraction
24
+ PB-53487 AUTOFILL - WP 3.7 - Create the FormScraper to extract information from form
25
+ PB-53488 AUTOFILL - WP 3.8 - Create the FieldQualifier to detect the type of field scraped
26
+ PB-53489 AUTOFILL - WP 3.9 - Create the PageScraper
27
+ PB-53980 PCD - improve PCD on move operations
28
+ PB-54162 AUTOFILL - WP 4.0 Create keywordsDictionary for classification
29
+ PB-54163 AUTOFILL - WP 4.1 Create taximony for classification
30
+ PB-54165 AUTOFILL - WP 4.2 Create KeywordMatchingService
31
+ PB-54167 AUTOFILL - WP 4.3 Create FieldFeatureService
32
+ PB-54168 AUTOFILL - WP 4.4 Create FormClassificationService
33
+ PB-54171 AUTOFILL - WP 4.5 Create SawfClassificationService
34
+ PB-54172 AUTOFILL - WP 4.6 Create PasswordRoleResolutionService
35
+ PB-54173 AUTOFILL - WP 4.7 Create FieldsRationalizationService
36
+ PB-54184 AUTOFILL - WP 4.8 Create SegmentedOtpResolutionService
37
+ PB-54185 AUTOFILL - WP 4.9 Create ClassificationService
38
+ PB-54336 AUTOFILL - WP 4.10 Create PageClassificationService
39
+ PB-54337 AUTOFILL - WP 4.11 Connect the new service to the fill plan
40
+ PB-54346 AUTOFILL - Fill not working on modal when z index is high
41
+ PB-54374 AUTOFILL - Call-to-action missing on first focus for shadow-DOM fields
42
+ PB-54344 AUTOFILL - Autocomplete should not block when it not valid
43
+ PB-54500 Quick access: list PIN code resources
44
+ PB-54502 Quick access: display PIN code in the resource view page
45
+ PB-54530 AUTOFILL is not working for input length attribute
46
+ PB-54571 Add the Passkeys provider toggle to the MFA administration page
47
+ PB-54596 Implement the restartable WebAuthn setup ceremony
48
+ PB-54608 OFM - PIN Code as offline available resource
49
+ PB-54706 Show the Passkeys card in the user MFA provider overview
50
+ PB-54707 Add the passkey authenticator icon set and AAGUID mapping to the styleguide
51
+ PB-54709 Add the passkey registration flow to the Passkeys settings page
52
+ PB-54710 Implement the WebAuthn MFA verification page as a styleguide React application
53
+ PB-54759 BEST - WP 1.1 - Implement ScimEntity for Healthcheck
54
+ PB-54760 BEST - WP 1.2 - Update HealthcheckEntity to handle the new ScimEntity
55
+ PB-54761 BEST - WP 1.3 - Update DisplayScimSettingsAdministration to handle the new expiry behaviour
56
+ PB-55047 Prune fields nested in forms deeper than the one evaluated
57
+ PB-55050 False positive on first name and inform menu blinking
58
+ PB-55099 Fix add user to group progress dialog for offscreen
59
+ PB-55115 Implement the delegated WebAuthn MFA verification page for the mobile applications
60
+
61
+ ### Fixed
62
+ PB-53265 Autocomplete fails in share dialog when custom email validator is on
63
+ PB-54103 Fix null reference on storage change event
64
+ PB-54531 Editing resources in a group-view doesn't update the grid
65
+ PB-54764 OFM button not presented to eligible authenticated user with mfa required and API unavailable
66
+ PB-54790 Prevent potential issue with TOTP autofill
67
+ PB-54818 Offline mode plane icon stroke width should be 1.5px instead of 2px
68
+ PB-54841 Fix quickaccess tab not opening when an account is not configured
69
+ PB-54976 AUTOFILL - Plex CTA is blinking
70
+ PB-55046 AUTOFILL - agoda email is not fillable
71
+ PB-55048 AUTOFILL - Focus on a input should keep the CTA
72
+ PB-55136 AUTOFILL - confirm password should be filled on a form
73
+ PB-55155 AUTOFILL - Fix ant design search input is not working
74
+
75
+ ### Security
76
+ PB-52830 restrict retrieved cookie on Safari to what a browser would normally get back
77
+ PB-52831 Ensures Safari does not accept unexepected redirection to avoid cookie leakage
78
+ PB-52832 Fix parameter name in sanitizeUrl function
79
+ PB-53545 Major upgrade for yargs (Low)
80
+ PB-53942 Fix image-size GHSA-5p2g-fcmc-qvqq - HIGH CVSS4.0
81
+ PB-54648 Fix adm-zip GHSA-vwc7-r8mq-g2x9 - CVSS4.0 MEDIUM
82
+ PB-54751 Major upgrade for @noble/hashes (Low) - passbolt-styleguide
83
+ PB-55262 Fix undici multiple CVEs - CVSS3.1 HIGH
84
+ PB-55264 Fix axios multiple CVEs - CVSS3.1 HGH
85
+ PB-55267 Fix braces-expansion multiple CVEs - CVSS3.1 HIGH
86
+ PB-55268 Fix braces GHSA-vfj7-8cjw-p6xm - CVSS3.1 HIGH
87
+ PB-55274 Fix shell-quote GHSA-pqg4-j6r4-53mv - CVSS4.0 CRITICAL
88
+ PB-55276 Fix fast-uri multiple CVEs - CVSS3.1 HIGH
89
+ PB-55277 Fix source-map-js GHSA-68fv-2mgg-jv7q - CVSS4.0 HIGH
90
+ PB-55279 Fix i18next-http-backend GHSA-xvq9-wjp8-hwqf - CVSS3.1 LOW
91
+ PB-55293 Fix joi multiple CVEs - CVSS4.0 HIGH
92
+ PB-55295 Fix probe-image-size GHSA-gjj5-9665-rwrc - CVSS3.1 HIGH
93
+ PB-54842 clipboard auto-clear bypass via untrusted copy/cut DOM event
94
+
95
+ ### Maintenance
96
+ PB-49117 optimise tab retrieval by id
97
+ PB-52127 SAF - Reactivate avatar handling from client
98
+ PB-54525 Product naming convention for Group Manager instead of Group Admin
99
+
100
+ ## [5.16.2] - 2026-09-10
101
+ ### Added
102
+ - PB-55198 - EDGE - WP1.1 - Create emitOnWorker in workerService
103
+ - PB-55199 - EDGE - WP1.2 - Improve postLogoutService
104
+ - PB-55200 - EDGE - WP1.3 - Update postLoginService
105
+ - PB-55201 - EDGE - WP1.4 - Update ResourceCreatePage to handle Edge new tab page
106
+
6
107
  ## [5.16.1] - 2026-08-17
7
108
  ### Fixed
8
109
  - PB-53792 - Copy/pasting issues on Safari
@@ -3134,7 +3235,10 @@ self registration settings option in the left-side bar
3134
3235
  - AP: User with plugin installed
3135
3236
  - LU: Logged in user
3136
3237
 
3137
- [Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.16.0...HEAD
3238
+ [Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.17.0...HEAD
3239
+ [5.17.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.16.2...v5.17.0
3240
+ [5.16.2]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.16.1...v5.16.2
3241
+ [5.16.1]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.16.0...v5.16.1
3138
3242
  [5.16.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.15.1...v5.16.0
3139
3243
  [5.15.1]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.15.0...v5.15.1
3140
3244
  [5.15.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.14.4...v5.15.0
package/RELEASE_NOTES.md CHANGED
@@ -1,8 +1,98 @@
1
- Release song - https://www.youtube.com/watch?v=gI6fQ2IXMjE
1
+ Release song - TBD
2
2
 
3
- # v5.16.1
4
- Passbolt 5.16.1 fixes an issue on Safari where copy and paste could stop working due to conflicts with other extensions.
3
+ # v5.17.0
4
+ Passbolt 5.17.0 provides authentication via passkeys as MFA, permission confirmation dialog on the move operations, autofill improvments and pin code resource type in quickaccess
5
5
 
6
6
  ## Changelogs
7
+ ### Added
8
+ PB-53327 Include group membership changes in the permission drift calculation before saving
9
+ PB-53450 AUTOFILL - WP 2.0 - Create the orphanDictionary for the DOM extraction
10
+ PB-53451 Add OrphanFieldPredicates class to check wether an element is a button
11
+ PB-53452 AUTOFILL - WP 2.2 - Create the FieldVisibilityService to avoid detection of hidden inputs
12
+ PB-53460 Add FormExtractionService to gather forms with viewable text fields
13
+ PB-53461 AUTOFILL - WP 2.4 - Create the OrphanFieldsExtractionService to extract build the orphan forms
14
+ PB-53462 Create NestedFormExtractionService
15
+ PB-53464 Rework InFormCredentialsFormField
16
+ PB-53465 AUTOFILL - WP 2.8 - Update the InFormManager to use the new extraction logic
17
+ PB-53466 AUTOFILL - WP 3.0 - Create the TextNormalizer as an helper to infer on extracted text
18
+ PB-53480 AUTOFILL - WP 3.1 - Create the ScrapingDictionary to handle scraping constants
19
+ PB-53482 AUTOFILL - WP 3.2 - Create the ScrapingIdentity to support identifier after scraping
20
+ PB-53483 AUTOFILL - WP 3.3 - Create the ScrapingCache object
21
+ PB-53484 AUTOFILL - WP 3.4 - Create the PageScraperHelpers to group helpers used for scraping
22
+ PB-53485 AUTOFILL - WP 3.5 - Create the LabelScraper to handle the label logic extraction
23
+ PB-53486 AUTOFILL - WP 3.6 - Create the FieldScraper to handle the field extraction
24
+ PB-53487 AUTOFILL - WP 3.7 - Create the FormScraper to extract information from form
25
+ PB-53488 AUTOFILL - WP 3.8 - Create the FieldQualifier to detect the type of field scraped
26
+ PB-53489 AUTOFILL - WP 3.9 - Create the PageScraper
27
+ PB-53980 PCD - improve PCD on move operations
28
+ PB-54162 AUTOFILL - WP 4.0 Create keywordsDictionary for classification
29
+ PB-54163 AUTOFILL - WP 4.1 Create taximony for classification
30
+ PB-54165 AUTOFILL - WP 4.2 Create KeywordMatchingService
31
+ PB-54167 AUTOFILL - WP 4.3 Create FieldFeatureService
32
+ PB-54168 AUTOFILL - WP 4.4 Create FormClassificationService
33
+ PB-54171 AUTOFILL - WP 4.5 Create SawfClassificationService
34
+ PB-54172 AUTOFILL - WP 4.6 Create PasswordRoleResolutionService
35
+ PB-54173 AUTOFILL - WP 4.7 Create FieldsRationalizationService
36
+ PB-54184 AUTOFILL - WP 4.8 Create SegmentedOtpResolutionService
37
+ PB-54185 AUTOFILL - WP 4.9 Create ClassificationService
38
+ PB-54336 AUTOFILL - WP 4.10 Create PageClassificationService
39
+ PB-54337 AUTOFILL - WP 4.11 Connect the new service to the fill plan
40
+ PB-54346 AUTOFILL - Fill not working on modal when z index is high
41
+ PB-54374 AUTOFILL - Call-to-action missing on first focus for shadow-DOM fields
42
+ PB-54344 AUTOFILL - Autocomplete should not block when it not valid
43
+ PB-54500 Quick access: list PIN code resources
44
+ PB-54502 Quick access: display PIN code in the resource view page
45
+ PB-54530 AUTOFILL is not working for input length attribute
46
+ PB-54571 Add the Passkeys provider toggle to the MFA administration page
47
+ PB-54596 Implement the restartable WebAuthn setup ceremony
48
+ PB-54608 OFM - PIN Code as offline available resource
49
+ PB-54706 Show the Passkeys card in the user MFA provider overview
50
+ PB-54707 Add the passkey authenticator icon set and AAGUID mapping to the styleguide
51
+ PB-54709 Add the passkey registration flow to the Passkeys settings page
52
+ PB-54710 Implement the WebAuthn MFA verification page as a styleguide React application
53
+ PB-54759 BEST - WP 1.1 - Implement ScimEntity for Healthcheck
54
+ PB-54760 BEST - WP 1.2 - Update HealthcheckEntity to handle the new ScimEntity
55
+ PB-54761 BEST - WP 1.3 - Update DisplayScimSettingsAdministration to handle the new expiry behaviour
56
+ PB-55047 Prune fields nested in forms deeper than the one evaluated
57
+ PB-55050 False positive on first name and inform menu blinking
58
+ PB-55099 Fix add user to group progress dialog for offscreen
59
+ PB-55115 Implement the delegated WebAuthn MFA verification page for the mobile applications
60
+
7
61
  ### Fixed
8
- - PB-53792 - Copy/pasting issues on Safari
62
+ PB-53265 Autocomplete fails in share dialog when custom email validator is on
63
+ PB-54103 Fix null reference on storage change event
64
+ PB-54531 Editing resources in a group-view doesn't update the grid
65
+ PB-54764 OFM button not presented to eligible authenticated user with mfa required and API unavailable
66
+ PB-54790 Prevent potential issue with TOTP autofill
67
+ PB-54818 Offline mode plane icon stroke width should be 1.5px instead of 2px
68
+ PB-54841 Fix quickaccess tab not opening when an account is not configured
69
+ PB-54976 AUTOFILL - Plex CTA is blinking
70
+ PB-55046 AUTOFILL - agoda email is not fillable
71
+ PB-55048 AUTOFILL - Focus on a input should keep the CTA
72
+ PB-55136 AUTOFILL - confirm password should be filled on a form
73
+ PB-55155 AUTOFILL - Fix ant design search input is not working
74
+
75
+ ### Security
76
+ PB-52830 restrict retrieved cookie on Safari to what a browser would normally get back
77
+ PB-52831 Ensures Safari does not accept unexepected redirection to avoid cookie leakage
78
+ PB-52832 Fix parameter name in sanitizeUrl function
79
+ PB-53545 Major upgrade for yargs (Low)
80
+ PB-53942 Fix image-size GHSA-5p2g-fcmc-qvqq - HIGH CVSS4.0
81
+ PB-54648 Fix adm-zip GHSA-vwc7-r8mq-g2x9 - CVSS4.0 MEDIUM
82
+ PB-54751 Major upgrade for @noble/hashes (Low) - passbolt-styleguide
83
+ PB-55262 Fix undici multiple CVEs - CVSS3.1 HIGH
84
+ PB-55264 Fix axios multiple CVEs - CVSS3.1 HGH
85
+ PB-55267 Fix braces-expansion multiple CVEs - CVSS3.1 HIGH
86
+ PB-55268 Fix braces GHSA-vfj7-8cjw-p6xm - CVSS3.1 HIGH
87
+ PB-55274 Fix shell-quote GHSA-pqg4-j6r4-53mv - CVSS4.0 CRITICAL
88
+ PB-55276 Fix fast-uri multiple CVEs - CVSS3.1 HIGH
89
+ PB-55277 Fix source-map-js GHSA-68fv-2mgg-jv7q - CVSS4.0 HIGH
90
+ PB-55279 Fix i18next-http-backend GHSA-xvq9-wjp8-hwqf - CVSS3.1 LOW
91
+ PB-55293 Fix joi multiple CVEs - CVSS4.0 HIGH
92
+ PB-55295 Fix probe-image-size GHSA-gjj5-9665-rwrc - CVSS3.1 HIGH
93
+ PB-54842 clipboard auto-clear bypass via untrusted copy/cut DOM event
94
+
95
+ ### Maintenance
96
+ PB-49117 optimise tab retrieval by id
97
+ PB-52127 SAF - Reactivate avatar handling from client
98
+ PB-54525 Product naming convention for Group Manager instead of Group Admin
@@ -25,13 +25,13 @@ import Cocoa
25
25
 
26
26
  @main
27
27
  class AppDelegate: NSObject, NSApplicationDelegate {
28
-
28
+
29
29
  func applicationDidFinishLaunching(_ notification: Notification) {
30
30
  // Override point for customization after application launch.
31
31
  }
32
-
32
+
33
33
  func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
34
34
  return true
35
35
  }
36
-
36
+
37
37
  }
@@ -28,26 +28,26 @@ import WebKit
28
28
  let extensionBundleIdentifier = "com.passbolt.safari.Extension"
29
29
 
30
30
  class ViewController: NSViewController, WKNavigationDelegate, WKScriptMessageHandler {
31
-
31
+
32
32
  @IBOutlet var webView: WKWebView!
33
-
33
+
34
34
  override func viewDidLoad() {
35
35
  super.viewDidLoad()
36
-
36
+
37
37
  self.webView.navigationDelegate = self
38
-
38
+
39
39
  self.webView.configuration.userContentController.add(self, name: "controller")
40
-
40
+
41
41
  self.webView.loadFileURL(Bundle.main.url(forResource: "Main", withExtension: "html")!, allowingReadAccessTo: Bundle.main.resourceURL!)
42
42
  }
43
-
43
+
44
44
  func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
45
45
  SFSafariExtensionManager.getStateOfSafariExtension(withIdentifier: extensionBundleIdentifier) { (state, error) in
46
46
  guard let state = state, error == nil else {
47
47
  // Insert code to inform the user that something went wrong.
48
48
  return
49
49
  }
50
-
50
+
51
51
  DispatchQueue.main.async {
52
52
  if #available(macOS 13, *) {
53
53
  webView.evaluateJavaScript("show(\(state.isEnabled), true)")
@@ -57,17 +57,17 @@ class ViewController: NSViewController, WKNavigationDelegate, WKScriptMessageHan
57
57
  }
58
58
  }
59
59
  }
60
-
60
+
61
61
  func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
62
62
  guard let body = message.body as? String, body == "open-preferences" else {
63
63
  return
64
64
  }
65
-
65
+
66
66
  SFSafariApplication.showPreferencesForExtension(withIdentifier: extensionBundleIdentifier) { error in
67
67
  DispatchQueue.main.async {
68
68
  NSApplication.shared.terminate(nil)
69
69
  }
70
70
  }
71
71
  }
72
-
72
+
73
73
  }
@@ -41,7 +41,7 @@ let routes: [String: AbstractController.Type] = [
41
41
  // It is mainly used to handle request from the extension
42
42
  final class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
43
43
  private let errorController = ErrorController()
44
-
44
+
45
45
  // Handles request coming form the extension using `chrome.runtime.sendNativeMessage`
46
46
  func beginRequest(with context: NSExtensionContext) {
47
47
  guard
@@ -56,7 +56,7 @@ final class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
56
56
  errorController.run(context, ["error": ErrorSerializer.serialize(error)], profileUUID: "unknown")
57
57
  return
58
58
  }
59
-
59
+
60
60
  // SECURITY: Extract profile UUID for session isolation
61
61
  // SFExtensionProfileKey provides the Safari profile identifier (macOS 14+)
62
62
  let profileUUID: String
@@ -67,7 +67,7 @@ final class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
67
67
  } else {
68
68
  profileUUID = "default"
69
69
  }
70
-
70
+
71
71
  guard let action = payload["action"] as? String else {
72
72
  let error = locatedNSError(
73
73
  domain: "SafariExtension",
@@ -77,7 +77,7 @@ final class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
77
77
  errorController.run(context, ["error": ErrorSerializer.serialize(error)], profileUUID: profileUUID)
78
78
  return
79
79
  }
80
-
80
+
81
81
  if let controllerType = routes[action] {
82
82
  do {
83
83
  let controller = controllerType.init()
@@ -87,7 +87,7 @@ final class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
87
87
  }
88
88
  return
89
89
  }
90
-
90
+
91
91
  let error = locatedNSError(
92
92
  domain: "SafariExtension",
93
93
  code: SafariExtensionError.unsupportedAction.rawValue,
@@ -41,14 +41,14 @@ extension AbstractController {
41
41
  var body: [String: Any] = [
42
42
  "success": true,
43
43
  ]
44
-
44
+
45
45
  if (responseBody != nil) {
46
46
  body["returnedValue"] = responseBody
47
47
  }
48
-
48
+
49
49
  self.respond(context, body)
50
50
  }
51
-
51
+
52
52
  // Respond to the extension with an error
53
53
  // This should be used after aborting the request from the extension
54
54
  func respondAsError(_ context: NSExtensionContext, _ error: Error) {
@@ -56,10 +56,10 @@ extension AbstractController {
56
56
  "success": false,
57
57
  "error": ErrorSerializer.serialize(error)
58
58
  ]
59
-
59
+
60
60
  self.respond(context, body)
61
61
  }
62
-
62
+
63
63
  // Sends the response to the extension
64
64
  internal func respond(_ context: NSExtensionContext, _ responseBody: [String: Any] = [:]) {
65
65
  let reply = NSExtensionItem()
@@ -25,7 +25,7 @@ import Foundation
25
25
 
26
26
  class ErrorController: AbstractController {
27
27
  required init() {}
28
-
28
+
29
29
  func run(_ context: NSExtensionContext, _ payload: [String: Any], profileUUID: String) -> Void {
30
30
  guard let errorDict = payload["error"] as? [String: Any] else {
31
31
  let fallbackError = NSError(
@@ -36,7 +36,7 @@ class ErrorController: AbstractController {
36
36
  self.respondAsError(context, fallbackError)
37
37
  return
38
38
  }
39
-
39
+
40
40
  let body: [String: Any] = [
41
41
  "success": false,
42
42
  "error": errorDict
@@ -26,7 +26,7 @@ import Foundation
26
26
  @available(macOSApplicationExtension 12.0, *)
27
27
  class FetchController: AbstractController {
28
28
  required init() {}
29
-
29
+
30
30
  func run(_ context: NSExtensionContext, _ payload: [String: Any], profileUUID: String) throws -> Void {
31
31
  guard let urlString = payload["resource"] as? String else {
32
32
  return self.respondAsError(context, locatedNSError(
@@ -35,7 +35,7 @@ class FetchController: AbstractController {
35
35
  description: "Missing required 'resource' parameter"
36
36
  ))
37
37
  }
38
-
38
+
39
39
  guard let url = URL(string: urlString) else {
40
40
  return self.respondAsError(context, locatedNSError(
41
41
  domain: "FetchController",
@@ -44,7 +44,7 @@ class FetchController: AbstractController {
44
44
  ))
45
45
  }
46
46
  let options = payload["options"] as? [String: Any] ?? [:]
47
-
47
+
48
48
  Task {
49
49
  do {
50
50
  let httpResponse = try await FetchService.fetch(url: url, options: options, profileUUID: profileUUID)
@@ -26,7 +26,7 @@ import SafariServices
26
26
 
27
27
  class OpenSafariSettingsController: AbstractController {
28
28
  required init() {}
29
-
29
+
30
30
  func run(_ context: NSExtensionContext, _ payload: [String: Any], profileUUID: String) throws -> Void {
31
31
  SFSafariApplication.showPreferencesForExtension(withIdentifier: "com.passbolt.safari.Extension") { error in
32
32
  if let error = error {
@@ -25,9 +25,9 @@ import Foundation
25
25
 
26
26
  class SaveFileController: AbstractController {
27
27
  required init() {}
28
-
28
+
29
29
  func run(_ context: NSExtensionContext, _ payload: [String: Any], profileUUID: String) throws -> Void {
30
30
  let destinationPath = try SaveFileService.saveFile(payload)
31
31
  self.respondAsSuccess(context, ["path": destinationPath])
32
32
  }
33
- }
33
+ }
@@ -35,7 +35,7 @@ extension NSPasteboard.PasteboardType {
35
35
  // background page never has when it processes a port request, hence the delegation to the app.
36
36
  class WriteClipboardController: AbstractController {
37
37
  required init() {}
38
-
38
+
39
39
  func run(_ context: NSExtensionContext, _ payload: [String: Any], profileUUID: String) -> Void {
40
40
  guard let data = payload["data"] as? String else {
41
41
  self.respondAsError(context, locatedNSError(
@@ -45,11 +45,11 @@ class WriteClipboardController: AbstractController {
45
45
  ))
46
46
  return
47
47
  }
48
-
48
+
49
49
  let pasteboard = NSPasteboard.general
50
50
  // Host only keeps the secret out of the Universal Clipboard, it must not reach the other devices.
51
51
  pasteboard.prepareForNewContents(with: .currentHostOnly)
52
-
52
+
53
53
  if pasteboard.setString(data, forType: .string) {
54
54
  // Best effort hint, a refusal must not fail the copy itself.
55
55
  pasteboard.setString(data, forType: .concealed)
@@ -30,29 +30,29 @@ final class SecureProfileSessionManager {
30
30
  // Thread-safe storage for profile sessions
31
31
  private static var sessionCache: [String: CachedSession] = [:]
32
32
  private static let lock = NSLock()
33
-
33
+
34
34
  // Session TTL: 30 minutes of inactivity before cleanup
35
35
  private static let sessionTTL: TimeInterval = 30 * 60
36
-
36
+
37
37
  /// Wrapper to track session last access time for TTL-based cleanup
38
38
  private struct CachedSession {
39
39
  let session: URLSession
40
40
  var lastAccess: Date
41
-
41
+
42
42
  init(session: URLSession) {
43
43
  self.session = session
44
44
  self.lastAccess = Date()
45
45
  }
46
-
46
+
47
47
  mutating func touch() {
48
48
  self.lastAccess = Date()
49
49
  }
50
-
50
+
51
51
  func isExpired(ttl: TimeInterval) -> Bool {
52
52
  return Date().timeIntervalSince(lastAccess) > ttl
53
53
  }
54
54
  }
55
-
55
+
56
56
  /// Creates or returns a completely isolated URLSession for a specific profile.
57
57
  /// Each profile gets its own HTTPCookieStorage instance that is NOT
58
58
  /// connected to HTTPCookieStorage.shared.
@@ -62,20 +62,20 @@ final class SecureProfileSessionManager {
62
62
  static func session(forProfile profileUUID: String) -> URLSession {
63
63
  lock.lock()
64
64
  defer { lock.unlock() }
65
-
65
+
66
66
  // Cleanup expired sessions periodically
67
67
  cleanupExpiredSessionsLocked()
68
-
68
+
69
69
  // Return cached session if exists and update last access time
70
70
  if var cached = sessionCache[profileUUID] {
71
71
  cached.touch()
72
72
  sessionCache[profileUUID] = cached
73
73
  return cached.session
74
74
  }
75
-
75
+
76
76
  // Create profile-specific configuration
77
77
  let config = URLSessionConfiguration.default
78
-
78
+
79
79
  // CRITICAL: Disable URLSession's automatic cookie handling completely.
80
80
  // The extension manages cookies via chrome.cookies API which is profile-isolated.
81
81
  // We inject cookies manually via the Cookie header in the request.
@@ -83,32 +83,32 @@ final class SecureProfileSessionManager {
83
83
  config.httpCookieStorage = nil
84
84
  config.httpShouldSetCookies = false
85
85
  config.httpCookieAcceptPolicy = .never
86
-
86
+
87
87
  // SECURITY: Disable credential storage completely
88
88
  // Prevents auth tokens from persisting across sessions
89
89
  config.urlCredentialStorage = nil
90
-
90
+
91
91
  // SECURITY: No memory cache, no disk persistence
92
92
  config.urlCache = URLCache(
93
93
  memoryCapacity: 0, // No memory cache
94
94
  diskCapacity: 0, // NO disk cache
95
95
  diskPath: nil
96
96
  )
97
-
97
+
98
98
  // SECURITY: Prevent cached responses
99
99
  config.requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData
100
-
100
+
101
101
  // Create session with security delegate
102
102
  let session = URLSession(
103
103
  configuration: config,
104
104
  delegate: SecureSessionDelegate(profileUUID: profileUUID),
105
105
  delegateQueue: nil // Use URLSession's internal queue
106
106
  )
107
-
107
+
108
108
  sessionCache[profileUUID] = CachedSession(session: session)
109
109
  return session
110
110
  }
111
-
111
+
112
112
  /// Cleans up sessions that have exceeded their TTL.
113
113
  /// Must be called while holding the lock.
114
114
  private static func cleanupExpiredSessionsLocked() {
@@ -119,7 +119,7 @@ final class SecureProfileSessionManager {
119
119
  }
120
120
  }
121
121
  }
122
-
122
+
123
123
  /// Invalidates and removes a profile's session completely.
124
124
  /// Call this when a user logs out to ensure complete cleanup.
125
125
  /// Note: Cookie cleanup is handled by the extension via chrome.cookies API,
@@ -129,18 +129,18 @@ final class SecureProfileSessionManager {
129
129
  static func invalidateSession(forProfile profileUUID: String) {
130
130
  lock.lock()
131
131
  defer { lock.unlock() }
132
-
132
+
133
133
  if let cached = sessionCache.removeValue(forKey: profileUUID) {
134
134
  cached.session.invalidateAndCancel()
135
135
  }
136
136
  }
137
-
137
+
138
138
  /// Invalidates all cached sessions.
139
139
  /// Useful for complete cleanup on extension unload.
140
140
  static func invalidateAllSessions() {
141
141
  lock.lock()
142
142
  defer { lock.unlock() }
143
-
143
+
144
144
  for (_, cached) in sessionCache {
145
145
  cached.session.invalidateAndCancel()
146
146
  }
@@ -153,12 +153,12 @@ final class SecureProfileSessionManager {
153
153
  /// URLSession delegate that enforces security policies for profile-isolated sessions.
154
154
  private class SecureSessionDelegate: NSObject, URLSessionTaskDelegate {
155
155
  let profileUUID: String
156
-
156
+
157
157
  init(profileUUID: String) {
158
158
  self.profileUUID = profileUUID
159
159
  super.init()
160
160
  }
161
-
161
+
162
162
  /// SECURITY: Block cross-domain redirects to prevent cookie leakage.
163
163
  /// Only allows redirects within the same host.
164
164
  func urlSession(
@@ -168,13 +168,19 @@ private class SecureSessionDelegate: NSObject, URLSessionTaskDelegate {
168
168
  newRequest request: URLRequest,
169
169
  completionHandler: @escaping (URLRequest?) -> Void
170
170
  ) {
171
- guard let originalHost = task.originalRequest?.url?.host,
172
- let newHost = request.url?.host else {
173
- completionHandler(nil) // Block if hosts can't be determined
171
+ guard let originalUrl = task.originalRequest?.url,
172
+ let newUrl = request.url,
173
+ let originalHost = originalUrl.host?.lowercased(),
174
+ let newHost = newUrl.host?.lowercased() else {
175
+ completionHandler(nil)
174
176
  return
175
177
  }
176
-
177
- if originalHost.lowercased() == newHost.lowercased() {
178
+
179
+ if originalHost == newHost
180
+ && originalUrl.port == newUrl.port
181
+ && originalUrl.scheme == newUrl.scheme
182
+ && originalUrl.user() == newUrl.user()
183
+ && originalUrl.password() == newUrl.password() {
178
184
  completionHandler(request) // Allow same-host redirect
179
185
  } else {
180
186
  // SECURITY: Block cross-domain redirects
@@ -182,14 +188,14 @@ private class SecureSessionDelegate: NSObject, URLSessionTaskDelegate {
182
188
  completionHandler(nil)
183
189
  }
184
190
  }
185
-
191
+
186
192
  func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
187
193
  if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust,
188
194
  let serverTrust = challenge.protectionSpace.serverTrust {
189
- completionHandler(.useCredential, URLCredential(trust: serverTrust))
195
+ completionHandler(.useCredential, URLCredential(trust: serverTrust))
190
196
  } else {
191
197
  completionHandler(.performDefaultHandling, nil)
192
198
  }
193
199
  }
194
-
200
+
195
201
  }