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 +6 -1
- package/RELEASE_NOTES.md +5 -5
- package/package.json +1 -1
- package/src/all/background_page/service/authenticationStatusService.js +11 -2
- package/src/chrome/manifest.json +1 -1
- package/src/chrome-mv3/manifest.json +1 -1
- package/src/firefox/manifest.json +1 -1
- package/src/safari/manifest.json +1 -1
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.
|
|
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://
|
|
1
|
+
Song: https://www.youtube.com/watch?v=YR5ApYxkU-U
|
|
2
2
|
|
|
3
|
-
Passbolt v4.7.
|
|
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.
|
|
6
|
-
###
|
|
7
|
-
- PB-
|
|
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
|
@@ -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<
|
|
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
|
package/src/chrome/manifest.json
CHANGED