passbolt-browser-extension 4.7.7 → 4.7.8

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@ 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
+ ## [4.7.8] - 2024-05-14
7
+ ### Fixed
8
+ - PB-33410 Fix Chrome Extension frozen and unusable after some period of inactivity
9
+
6
10
  ## [4.7.7] - 2024-05-10
7
11
  ### Maintenance
8
12
  - PB-33321 Fix local storage loading on extension update
@@ -1611,7 +1615,8 @@ self registration settings option in the left-side bar
1611
1615
  - AP: User with plugin installed
1612
1616
  - LU: Logged in user
1613
1617
 
1614
- [Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.7...HEAD
1618
+ [Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.8...HEAD
1619
+ [4.7.8]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.7...v4.7.8
1615
1620
  [4.7.7]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.6...v4.7.7
1616
1621
  [4.7.6]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.5...v4.7.6
1617
1622
  [4.7.5]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.4...v4.7.5
package/RELEASE_NOTES.md CHANGED
@@ -1,7 +1,7 @@
1
- Song: https://youtu.be/J87pJrxvJ5E?si=vGs8M6uyM6E7Lcps
1
+ Song: https://www.youtube.com/watch?v=YR5ApYxkU-U
2
2
 
3
- Passbolt v4.7.7 is a maintenance release focused on fixing problems linked to the extension update and preparing the transition to MV3.
3
+ Passbolt v4.7.8 is a maintenance release fixing issue introduces on v4.7.0 which might lead to unresponsive browser extension.
4
4
 
5
- ## [4.7.7] - 2024-05-10
6
- ### Maintenance
7
- - PB-33321 Fix local storage loading on extension update
5
+ ## [4.7.8] - 2024-05-14
6
+ ### Fixed
7
+ - PB-33410 Chrome Extension frozen and unusable after some period of inactivity
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "passbolt-browser-extension",
3
- "version": "4.7.7",
3
+ "version": "4.7.8",
4
4
  "license": "AGPL-3.0",
5
5
  "copyright": "Copyright 2022 Passbolt SA",
6
6
  "description": "Passbolt web extension for the open source password manager for teams",
@@ -16,13 +16,14 @@ import MfaAuthenticationRequiredError from "../error/mfaAuthenticationRequiredEr
16
16
  import NotFoundError from "../error/notFoundError";
17
17
  import {ApiClient} from "passbolt-styleguide/src/shared/lib/apiClient/apiClient";
18
18
  import {ApiClientOptions} from "passbolt-styleguide/src/shared/lib/apiClient/apiClientOptions";
19
+ import PassboltBadResponseError from "../error/passboltBadResponseError";
19
20
 
20
21
  const AUTH_RESOURCE_NAME = '/auth';
21
22
 
22
23
  class AuthenticationStatusService {
23
24
  /**
24
25
  * Check if the current user is authenticated.
25
- * @returns {Promise<bool>}
26
+ * @returns {Promise<boolean>}
26
27
  */
27
28
  static async isAuthenticated() {
28
29
  const apiClient = new ApiClient(this.apiClientOptions);
@@ -37,11 +38,19 @@ class AuthenticationStatusService {
37
38
  };
38
39
  const response = await apiClient.sendRequest('GET', url, null, fetchOptions);
39
40
 
41
+ let responseJson;
42
+ try {
43
+ //Get response on json format
44
+ responseJson = await response.json();
45
+ } catch (error) {
46
+ // If the response cannot be parsed, it's not a Passbolt API response. It can be a nginx error (504).
47
+ throw new PassboltBadResponseError();
48
+ }
49
+
40
50
  if (response.ok) {
41
51
  return true;
42
52
  }
43
53
 
44
- const responseJson = await response.json();
45
54
  // MFA required.
46
55
  if (/mfa\/verify\/error\.json$/.test(response.url)) {
47
56
  //Retrieve the message error details from json
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 2,
3
3
  "name": "__MSG_appName__",
4
4
  "short_name": "passbolt",
5
- "version": "4.7.7",
5
+ "version": "4.7.8",
6
6
  "description": "__MSG_appDescription__",
7
7
  "default_locale": "en",
8
8
  "externally_connectable": {},
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 3,
3
3
  "name": "__MSG_appName__",
4
4
  "short_name": "passbolt",
5
- "version": "4.7.7",
5
+ "version": "4.7.8",
6
6
  "description": "__MSG_appDescription__",
7
7
  "default_locale": "en",
8
8
  "externally_connectable": {
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 2,
3
3
  "name": "__MSG_appName__",
4
4
  "short_name": "passbolt",
5
- "version": "4.7.7",
5
+ "version": "4.7.8",
6
6
  "description": "__MSG_appDescription__",
7
7
  "default_locale": "en",
8
8
  "browser_specific_settings": {
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 3,
3
3
  "name": "__MSG_appName__",
4
4
  "short_name": "passbolt",
5
- "version": "4.7.7",
5
+ "version": "4.7.8",
6
6
  "description": "__MSG_appDescription__",
7
7
  "default_locale": "en",
8
8
  "externally_connectable": {},