@wireapp/core 43.7.1 → 43.8.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.
- package/lib/Account.d.ts +12 -3
- package/lib/Account.d.ts.map +1 -1
- package/lib/Account.js +3 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts +73 -104
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.js +13 -31
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.d.ts +2 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/schema.d.ts +3 -0
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/schema.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/schema.js +1 -0
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts +3 -9
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts +12 -7
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.js +57 -119
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.d.ts +4 -7
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.js +36 -27
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.d.ts +7 -10
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.js +3 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.types.d.ts +2 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/OidcChallenge.d.ts +13 -17
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/OidcChallenge.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/OidcChallenge.js +3 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.d.ts +4 -4
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.js +9 -10
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.js +2 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.d.ts +25 -25
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.js +3 -3
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +11 -2
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.js +36 -40
- package/package.json +5 -5
|
@@ -7,16 +7,19 @@ export declare const InitialDataSchema: z.ZodObject<{
|
|
|
7
7
|
displayName: z.ZodString;
|
|
8
8
|
handle: z.ZodString;
|
|
9
9
|
domain: z.ZodString;
|
|
10
|
+
teamId: z.ZodString;
|
|
10
11
|
}, "strip", z.ZodTypeAny, {
|
|
11
12
|
id: string;
|
|
12
13
|
domain: string;
|
|
13
14
|
handle: string;
|
|
14
15
|
displayName: string;
|
|
16
|
+
teamId: string;
|
|
15
17
|
}, {
|
|
16
18
|
id: string;
|
|
17
19
|
domain: string;
|
|
18
20
|
handle: string;
|
|
19
21
|
displayName: string;
|
|
22
|
+
teamId: string;
|
|
20
23
|
}>;
|
|
21
24
|
}, "strip", z.ZodTypeAny, {
|
|
22
25
|
user: {
|
|
@@ -24,6 +27,7 @@ export declare const InitialDataSchema: z.ZodObject<{
|
|
|
24
27
|
domain: string;
|
|
25
28
|
handle: string;
|
|
26
29
|
displayName: string;
|
|
30
|
+
teamId: string;
|
|
27
31
|
};
|
|
28
32
|
clientId: string;
|
|
29
33
|
discoveryUrl: string;
|
|
@@ -33,6 +37,7 @@ export declare const InitialDataSchema: z.ZodObject<{
|
|
|
33
37
|
domain: string;
|
|
34
38
|
handle: string;
|
|
35
39
|
displayName: string;
|
|
40
|
+
teamId: string;
|
|
36
41
|
};
|
|
37
42
|
clientId: string;
|
|
38
43
|
discoveryUrl: string;
|
|
@@ -40,9 +45,8 @@ export declare const InitialDataSchema: z.ZodObject<{
|
|
|
40
45
|
export type InitialData = z.infer<typeof InitialDataSchema>;
|
|
41
46
|
export declare const AuthDataSchema: z.ZodObject<{
|
|
42
47
|
authorization: z.ZodObject<{
|
|
43
|
-
identifier: z.ZodString;
|
|
44
48
|
keyauth: z.ZodString;
|
|
45
|
-
|
|
49
|
+
dpopChallenge: z.ZodObject<{
|
|
46
50
|
delegate: z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>;
|
|
47
51
|
url: z.ZodString;
|
|
48
52
|
target: z.ZodString;
|
|
@@ -54,8 +58,8 @@ export declare const AuthDataSchema: z.ZodObject<{
|
|
|
54
58
|
url: string;
|
|
55
59
|
target: string;
|
|
56
60
|
delegate: Uint8Array;
|
|
57
|
-
}
|
|
58
|
-
|
|
61
|
+
}>;
|
|
62
|
+
oidcChallenge: z.ZodObject<{
|
|
59
63
|
delegate: z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>;
|
|
60
64
|
url: z.ZodString;
|
|
61
65
|
target: z.ZodString;
|
|
@@ -67,66 +71,62 @@ export declare const AuthDataSchema: z.ZodObject<{
|
|
|
67
71
|
url: string;
|
|
68
72
|
target: string;
|
|
69
73
|
delegate: Uint8Array;
|
|
70
|
-
}
|
|
74
|
+
}>;
|
|
71
75
|
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
identifier: string;
|
|
73
76
|
keyauth: string;
|
|
74
|
-
|
|
77
|
+
dpopChallenge: {
|
|
75
78
|
url: string;
|
|
76
79
|
target: string;
|
|
77
80
|
delegate: Uint8Array;
|
|
78
|
-
}
|
|
79
|
-
|
|
81
|
+
};
|
|
82
|
+
oidcChallenge: {
|
|
80
83
|
url: string;
|
|
81
84
|
target: string;
|
|
82
85
|
delegate: Uint8Array;
|
|
83
|
-
}
|
|
86
|
+
};
|
|
84
87
|
}, {
|
|
85
|
-
identifier: string;
|
|
86
88
|
keyauth: string;
|
|
87
|
-
|
|
89
|
+
dpopChallenge: {
|
|
88
90
|
url: string;
|
|
89
91
|
target: string;
|
|
90
92
|
delegate: Uint8Array;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
+
};
|
|
94
|
+
oidcChallenge: {
|
|
93
95
|
url: string;
|
|
94
96
|
target: string;
|
|
95
97
|
delegate: Uint8Array;
|
|
96
|
-
}
|
|
98
|
+
};
|
|
97
99
|
}>;
|
|
98
100
|
nonce: z.ZodString;
|
|
99
101
|
}, "strip", z.ZodTypeAny, {
|
|
100
102
|
nonce: string;
|
|
101
103
|
authorization: {
|
|
102
|
-
identifier: string;
|
|
103
104
|
keyauth: string;
|
|
104
|
-
|
|
105
|
+
dpopChallenge: {
|
|
105
106
|
url: string;
|
|
106
107
|
target: string;
|
|
107
108
|
delegate: Uint8Array;
|
|
108
|
-
}
|
|
109
|
-
|
|
109
|
+
};
|
|
110
|
+
oidcChallenge: {
|
|
110
111
|
url: string;
|
|
111
112
|
target: string;
|
|
112
113
|
delegate: Uint8Array;
|
|
113
|
-
}
|
|
114
|
+
};
|
|
114
115
|
};
|
|
115
116
|
}, {
|
|
116
117
|
nonce: string;
|
|
117
118
|
authorization: {
|
|
118
|
-
identifier: string;
|
|
119
119
|
keyauth: string;
|
|
120
|
-
|
|
120
|
+
dpopChallenge: {
|
|
121
121
|
url: string;
|
|
122
122
|
target: string;
|
|
123
123
|
delegate: Uint8Array;
|
|
124
|
-
}
|
|
125
|
-
|
|
124
|
+
};
|
|
125
|
+
oidcChallenge: {
|
|
126
126
|
url: string;
|
|
127
127
|
target: string;
|
|
128
128
|
delegate: Uint8Array;
|
|
129
|
-
}
|
|
129
|
+
};
|
|
130
130
|
};
|
|
131
131
|
}>;
|
|
132
132
|
export type AuthData = z.infer<typeof AuthDataSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"E2EIStorage.schema.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"E2EIStorage.schema.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAU5D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,eAAe;;;;;;EAE1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -28,6 +28,7 @@ exports.InitialDataSchema = zod_1.z.object({
|
|
|
28
28
|
displayName: zod_1.z.string(),
|
|
29
29
|
handle: zod_1.z.string(),
|
|
30
30
|
domain: zod_1.z.string(),
|
|
31
|
+
teamId: zod_1.z.string(),
|
|
31
32
|
}),
|
|
32
33
|
});
|
|
33
34
|
const Uint8ArraySchema = zod_1.z.custom(value => value instanceof Uint8Array ? { success: true } : { success: false, message: 'Expected Uint8Array' });
|
|
@@ -38,10 +39,9 @@ const AcmeChallengeSchema = zod_1.z.object({
|
|
|
38
39
|
});
|
|
39
40
|
exports.AuthDataSchema = zod_1.z.object({
|
|
40
41
|
authorization: zod_1.z.object({
|
|
41
|
-
identifier: zod_1.z.string(),
|
|
42
42
|
keyauth: zod_1.z.string(),
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
dpopChallenge: AcmeChallengeSchema,
|
|
44
|
+
oidcChallenge: AcmeChallengeSchema,
|
|
45
45
|
}),
|
|
46
46
|
nonce: zod_1.z.string(),
|
|
47
47
|
});
|
|
@@ -10,9 +10,18 @@ import { MLSServiceConfig } from './MLSService.types';
|
|
|
10
10
|
import { KeyPackageClaimUser } from '../../../conversation';
|
|
11
11
|
import { CoreDatabase } from '../../../storage/CoreDB';
|
|
12
12
|
import { RecurringTaskScheduler } from '../../../util/RecurringTaskScheduler';
|
|
13
|
-
import {
|
|
13
|
+
import { AcmeChallenge, E2EIServiceExternal, User } from '../E2EIdentityService';
|
|
14
14
|
import { ClientId, CommitPendingProposalsParams, HandlePendingProposalsParams } from '../types';
|
|
15
15
|
export declare const optionalToUint8Array: (array: Uint8Array | []) => Uint8Array;
|
|
16
|
+
type EnrollmentProcessState = {
|
|
17
|
+
status: 'authentication';
|
|
18
|
+
authenticationChallenge: {
|
|
19
|
+
keyAuth: string;
|
|
20
|
+
challenge: AcmeChallenge;
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
status: 'successful';
|
|
24
|
+
};
|
|
16
25
|
interface LocalMLSServiceConfig extends MLSServiceConfig {
|
|
17
26
|
/**
|
|
18
27
|
* minimum number of key packages client should have available (configured to half of nbKeyPackages)
|
|
@@ -208,7 +217,7 @@ export declare class MLSService extends TypedEventEmitter<Events> {
|
|
|
208
217
|
* @param oAuthIdToken The OAuth id token if the user is already authenticated
|
|
209
218
|
* @returns AcmeChallenge if the user is not authenticated, true if the user is authenticated
|
|
210
219
|
*/
|
|
211
|
-
enrollE2EI(discoveryUrl: string, e2eiServiceExternal: E2EIServiceExternal, user: User, client: RegisteredClient, nbPrekeys: number, oAuthIdToken?: string): Promise<
|
|
220
|
+
enrollE2EI(discoveryUrl: string, e2eiServiceExternal: E2EIServiceExternal, user: User, client: RegisteredClient, nbPrekeys: number, oAuthIdToken?: string): Promise<EnrollmentProcessState>;
|
|
212
221
|
}
|
|
213
222
|
export {};
|
|
214
223
|
//# sourceMappingURL=MLSService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MLSService.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/MLSService.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAqB,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAC,sBAAsB,EAAE,kBAAkB,EAAC,MAAM,sCAAsC,CAAC;AAChG,OAAO,EAAC,8BAA8B,EAAE,2BAA2B,EAAC,MAAM,+BAA+B,CAAC;AAE1G,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAW,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACL,eAAe,EAIf,cAAc,EACd,UAAU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,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;IAY9F,wBAAwB,CACnC,KAAK,EAAE,8BAA8B,EACrC,yBAAyB,EAAE,CACzB,cAAc,EAAE,WAAW,EAC3B,iBAAiB,CAAC,EAAE,kBAAkB,KACnC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAgBrB,4BAA4B,CAAC,KAAK,EAAE,2BAA2B,EAAE,QAAQ,EAAE,MAAM;IAcjF,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE;IASjF;;;;;;;;OAQG;IACU,UAAU,CACrB,YAAY,EAAE,MAAM,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,gBAAgB,EACxB,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,sBAAsB,CAAC;CA+DnC"}
|
|
@@ -635,49 +635,45 @@ class MLSService extends commons_1.TypedEventEmitter {
|
|
|
635
635
|
// If we don't have an OAuth id token, we need to start the certificate process with Oauth
|
|
636
636
|
if (!oAuthIdToken) {
|
|
637
637
|
const data = await instance.startCertificateProcess(hasActiveCertificate);
|
|
638
|
-
|
|
639
|
-
|
|
638
|
+
const oidcChallenge = data.challenge;
|
|
639
|
+
if (!oidcChallenge) {
|
|
640
|
+
throw new Error('Not oidc challenge found');
|
|
640
641
|
}
|
|
641
|
-
|
|
642
|
+
return { status: 'authentication', authenticationChallenge: data };
|
|
642
643
|
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
// If we are not refreshing the active certificate, we need to continue the certificate process with Oauth
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
};
|
|
675
|
-
await this.uploadCommitBundle(groupIdAsBytes, newCommitBundle);
|
|
676
|
-
}
|
|
677
|
-
return true;
|
|
678
|
-
}
|
|
644
|
+
// If we have an OAuth id token, we can continue the certificate process / start a refresh
|
|
645
|
+
const rotateBundle = !hasActiveCertificate
|
|
646
|
+
? // If we are not refreshing the active certificate, we need to continue the certificate process with Oauth
|
|
647
|
+
await instance.continueCertificateProcess(oAuthIdToken)
|
|
648
|
+
: // If we are refreshing the active certificate, can start the refresh process
|
|
649
|
+
await instance.startRefreshCertficateFlow(oAuthIdToken, hasActiveCertificate);
|
|
650
|
+
if (rotateBundle === undefined) {
|
|
651
|
+
throw new Error('Could not get the rotate bundle');
|
|
652
|
+
}
|
|
653
|
+
// upload the clients public keys
|
|
654
|
+
if (!hasActiveCertificate) {
|
|
655
|
+
// we only upload public keys for the initial certification process. Renewals do not need to upload new public keys
|
|
656
|
+
await this.uploadMLSPublicKeys(client);
|
|
657
|
+
}
|
|
658
|
+
// Remove old key packages
|
|
659
|
+
await this.deleteMLSKeyPackages(client.id, rotateBundle.keyPackageRefsToRemove);
|
|
660
|
+
// Upload new key packages with x509 certificate
|
|
661
|
+
await this.uploadMLSKeyPackages(client.id, rotateBundle.newKeyPackages);
|
|
662
|
+
// Verify that we have enough key packages
|
|
663
|
+
await this.verifyRemoteMLSKeyPackagesAmount(client.id);
|
|
664
|
+
// Update keying material
|
|
665
|
+
for (const [groupId, commitBundle] of rotateBundle.commits) {
|
|
666
|
+
const groupIdAsBytes = bazinga64_1.Converter.hexStringToArrayBufferView(groupId);
|
|
667
|
+
// manual copy of the commit bundle data because of a problem while cloning it
|
|
668
|
+
const newCommitBundle = {
|
|
669
|
+
commit: commitBundle.commit,
|
|
670
|
+
// @ts-ignore
|
|
671
|
+
groupInfo: (commitBundle === null || commitBundle === void 0 ? void 0 : commitBundle.group_info) || commitBundle.groupInfo,
|
|
672
|
+
welcome: commitBundle === null || commitBundle === void 0 ? void 0 : commitBundle.welcome,
|
|
673
|
+
};
|
|
674
|
+
await this.uploadCommitBundle(groupIdAsBytes, newCommitBundle);
|
|
679
675
|
}
|
|
680
|
-
return
|
|
676
|
+
return { status: 'successful' };
|
|
681
677
|
}
|
|
682
678
|
catch (error) {
|
|
683
679
|
this.logger.error('E2EI - Failed to enroll', error);
|
package/package.json
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"./lib/cryptography/AssetCryptography/crypto.node": "./lib/cryptography/AssetCryptography/crypto.browser.js"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@wireapp/api-client": "^26.10.
|
|
14
|
+
"@wireapp/api-client": "^26.10.1",
|
|
15
15
|
"@wireapp/commons": "^5.2.4",
|
|
16
|
-
"@wireapp/core-crypto": "1.0.0-rc.
|
|
16
|
+
"@wireapp/core-crypto": "1.0.0-rc.31",
|
|
17
17
|
"@wireapp/cryptobox": "12.8.0",
|
|
18
18
|
"@wireapp/promise-queue": "^2.2.9",
|
|
19
19
|
"@wireapp/protocol-messaging": "1.44.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"fake-indexeddb": "^4.0.0",
|
|
45
45
|
"jest": "^29.2.1",
|
|
46
46
|
"jest-websocket-mock": "2.5.0",
|
|
47
|
-
"nock": "13.
|
|
47
|
+
"nock": "13.5.0",
|
|
48
48
|
"rimraf": "^3.0.2",
|
|
49
49
|
"typescript": "^5.0.4"
|
|
50
50
|
},
|
|
@@ -61,6 +61,6 @@
|
|
|
61
61
|
"test:coverage": "jest --coverage",
|
|
62
62
|
"watch": "tsc --watch"
|
|
63
63
|
},
|
|
64
|
-
"version": "43.
|
|
65
|
-
"gitHead": "
|
|
64
|
+
"version": "43.8.0",
|
|
65
|
+
"gitHead": "c24619095c1d32ef15fa05d1be7f56f5454406ce"
|
|
66
66
|
}
|