Skip to content

Commit b370e1e

Browse files
shakyShanegithub-actions[bot]
authored andcommitted
Release build 9.0.0 [ci release]
1 parent fd0a479 commit b370e1e

File tree

13 files changed

+290
-35
lines changed

13 files changed

+290
-35
lines changed

CHANGELOG.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
- Scam Protection (#354)
2-
- Node 22.14 fix (#370)
1+
- Fixing implicit invalid certs (#363)

build/app/public/js/base.js

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11722,6 +11722,22 @@
1172211722
id: z3.number().optional(),
1172311723
options: z3.object({})
1172411724
});
11725+
var secKeyViewModelSchema = z3.object({
11726+
keyId: z3.string().optional().nullable(),
11727+
externalRepresentation: z3.string().optional().nullable(),
11728+
bitSize: z3.number().optional().nullable(),
11729+
blockSize: z3.number().optional().nullable(),
11730+
effectiveSize: z3.number().optional().nullable(),
11731+
canDecrypt: z3.boolean(),
11732+
canDerive: z3.boolean(),
11733+
canEncrypt: z3.boolean(),
11734+
canSign: z3.boolean(),
11735+
canUnwrap: z3.boolean(),
11736+
canVerify: z3.boolean(),
11737+
canWrap: z3.boolean(),
11738+
isPermanent: z3.boolean().optional().nullable(),
11739+
type: z3.union([z3.literal("RSA"), z3.literal("Elliptic Curve"), z3.literal("Elliptic Curve (Prime Random)")]).optional().nullable()
11740+
});
1172511741
var dataItemIdSchema = z3.union([wVVersionSchema, requestsSchema, featuresSchema, appVersionSchema, atbSchema, errorDescriptionsSchema, extensionVersionSchema, hTTPErrorCodesSchema, lastSentDaySchema, deviceSchema, osSchema, listVersionsSchema, reportFlowSchema, siteURLSchema, didOpenReportInfoSchema, toggleReportCounterSchema, openerContextSchema, userRefreshCountSchema, jSPerformanceSchema, localeSchema, descriptionSchema]);
1172611742
var incomingExtensionMessageSchema = z3.union([incomingResponseSchema, incomingToggleReportSchema, incomingUpdateTabDataSchema, incomingClosePopupSchema, incomingDidResetTrackersDataSchema]);
1172711743
var detectedRequestSchema = z3.object({
@@ -11767,6 +11783,12 @@
1176711783
attributes: z3.union([categoryTypeSelectedSchema, categorySelectedSchema, toggleSkippedSchema]),
1176811784
eventOrigin: eventOriginSchema
1176911785
});
11786+
var secCertificateViewModelSchema = z3.object({
11787+
summary: z3.string().optional(),
11788+
commonName: z3.string().optional(),
11789+
emails: z3.array(z3.string()).optional(),
11790+
publicKey: secKeyViewModelSchema.optional()
11791+
});
1177011792
var requestDataSchema = z3.object({
1177111793
requests: z3.array(detectedRequestSchema),
1177211794
installedSurrogates: z3.array(z3.string()).optional()
@@ -11793,6 +11815,10 @@
1179311815
var toggleReportScreenSchema = z3.object({
1179411816
data: z3.array(toggleReportScreenDataItemSchema)
1179511817
});
11818+
var certDataSchema = z3.object({
11819+
secCertificateViewModels: z3.array(secCertificateViewModelSchema),
11820+
isInvalidCert: z3.boolean()
11821+
});
1179611822
var windowsIncomingViewModelSchema = z3.object({
1179711823
Feature: z3.literal("PrivacyDashboard"),
1179811824
Name: z3.literal("ViewModelUpdated"),
@@ -11823,7 +11849,8 @@
1182311849
"close-message": closeMessageParamsSchema.optional(),
1182411850
"telemetry-span": telemetrySpanSchema.optional(),
1182511851
"extension-incoming": incomingExtensionMessageSchema.optional(),
11826-
"extension-outgoing": outgoingExtensionMessageSchema.optional()
11852+
"extension-outgoing": outgoingExtensionMessageSchema.optional(),
11853+
"cert-data": certDataSchema.optional()
1182711854
});
1182811855

1182911856
// shared/js/browser/utils/request-details.mjs
@@ -13982,6 +14009,7 @@
1398214009
var trackerBlockingData;
1398314010
var permissionsData;
1398414011
var certificateData;
14012+
var isInvalidCert = null;
1398514013
var upgradedHttps;
1398614014
var protections;
1398714015
var isPendingUpdates;
@@ -13999,7 +14027,8 @@
1399914027
parentEntity,
1400014028
cookiePromptManagementStatus,
1400114029
platformLimitations: true,
14002-
locale
14030+
locale,
14031+
isInvalidCert
1400314032
},
1400414033
permissionsData ? { permissions: permissionsData } : {},
1400514034
certificateData ? { certificate: certificateData } : {}
@@ -14011,6 +14040,8 @@
1401114040
const isTrackerBlockingDataSet = typeof trackerBlockingData === "object";
1401214041
const isLocaleSet = typeof locale === "string";
1401314042
const isMaliciousSiteSet = maliciousSiteStatus && maliciousSiteStatus.kind !== void 0;
14043+
if (isInvalidCert === null)
14044+
return console.log("isInvalidCert was not ready");
1401414045
if (!isLocaleSet || !isUpgradedHttpsSet || !isIsProtectedSet || !isTrackerBlockingDataSet || !isMaliciousSiteSet) {
1401514046
return;
1401614047
}
@@ -14228,7 +14259,16 @@
1422814259
window.onChangeProtectionStatus = onChangeProtectionStatus;
1422914260
window.onChangeLocale = onChangeLocale;
1423014261
window.onChangeCertificateData = function(data) {
14231-
certificateData = data.secCertificateViewModels;
14262+
const parsed = certDataSchema.safeParse(data);
14263+
if (!parsed.success) {
14264+
console.error("could not parse incoming data from onChangeCertificateData");
14265+
console.error(parsed.error);
14266+
certificateData = [];
14267+
isInvalidCert = false;
14268+
return;
14269+
}
14270+
certificateData = parsed.data.secCertificateViewModels;
14271+
isInvalidCert = parsed.data.isInvalidCert;
1423214272
channel2?.send("updateTabData");
1423314273
};
1423414274
window.onIsPendingUpdates = function(data) {
@@ -15032,7 +15072,7 @@
1503215072
supportsHover: desktop.includes(platform2.name),
1503315073
initialScreen: screen,
1503415074
opener,
15035-
supportsInvalidCertsImplicitly: platform2.name !== "browser" && platform2.name !== "windows",
15075+
supportsInvalidCertsImplicitly: platform2.name === "android",
1503615076
supportsMaliciousSiteWarning: platform2.name === "macos" || platform2.name === "ios" || platform2.name === "android" || platform2.name === "windows",
1503715077
includeToggleOnBreakageForm,
1503815078
randomisedCategories

integration-tests/android.spec-int.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ test.describe('breakage form', () => {
227227
await dash.screenshot('screen-breakage-form-empty-description.png');
228228
});
229229

230-
test('submits form with description', { tag: '@screenshots' }, async ({ page }) => {
230+
test.skip('submits form with description', { tag: '@screenshots' }, async ({ page }) => {
231231
/** @type {DashboardPage} */
232232
const dash = await DashboardPage.android(page, { screen: 'breakageForm' });
233233
await dash.reducedMotion();

integration-tests/windows.spec-int.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ test.describe('breakage form', () => {
114114
await dash.screenshot('screen-breakage-form-empty-description.png');
115115
});
116116

117-
test('submits form with description', { tag: '@screenshots' }, async ({ page }) => {
117+
test.skip('submits form with description', { tag: '@screenshots' }, async ({ page }) => {
118118
/** @type {DashboardPage} */
119119
const dash = await DashboardPage.windows(page, { screen: 'breakageForm' });
120120
await dash.reducedMotion();

schema/__generated__/schema.parsers.mjs

Lines changed: 31 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/__generated__/schema.types.ts

Lines changed: 75 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/api.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
},
4444
"extension-outgoing": {
4545
"$ref": "extension-outgoing.json"
46+
},
47+
"cert-data": {
48+
"$ref": "cert-data.json"
4649
}
4750
}
4851
}

schema/cert-data.json

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "CertData",
4+
"type": "object",
5+
"description": "",
6+
"required": ["secCertificateViewModels", "isInvalidCert"],
7+
"additionalProperties": false,
8+
"properties": {
9+
"secCertificateViewModels": {
10+
"type": "array",
11+
"items": {
12+
"$ref": "#/definitions/SecCertificateViewModel"
13+
}
14+
},
15+
"isInvalidCert": {
16+
"type": "boolean",
17+
"description": "`true` if the certificate is missing or invalid"
18+
}
19+
},
20+
"definitions": {
21+
"SecCertificateViewModel": {
22+
"title": "SecCertificateViewModel",
23+
"type": "object",
24+
"properties": {
25+
"summary": {
26+
"type": "string"
27+
},
28+
"commonName": {
29+
"type": "string"
30+
},
31+
"emails": {
32+
"type": "array",
33+
"items": {
34+
"type": "string"
35+
}
36+
},
37+
"publicKey": {
38+
"$ref": "#/definitions/SecKeyViewModel"
39+
}
40+
}
41+
},
42+
"SecKeyViewModel": {
43+
"title": "SecKeyViewModel",
44+
"description": "A model representing a SecKey with its properties and capabilities",
45+
"type": "object",
46+
"properties": {
47+
"keyId": {
48+
"type": ["string", "null"],
49+
"description": "Base64 encoded representation of the application label data"
50+
},
51+
"externalRepresentation": {
52+
"type": ["string", "null"],
53+
"description": "Base64 encoded external representation of the key"
54+
},
55+
"bitSize": {
56+
"type": ["integer", "null"],
57+
"description": "Size of the key in bits"
58+
},
59+
"blockSize": {
60+
"type": ["integer", "null"],
61+
"description": "Block size of the key"
62+
},
63+
"effectiveSize": {
64+
"type": ["integer", "null"],
65+
"description": "Effective size of the key in bits"
66+
},
67+
"canDecrypt": {
68+
"type": "boolean",
69+
"description": "Whether the key can be used for decryption"
70+
},
71+
"canDerive": {
72+
"type": "boolean",
73+
"description": "Whether the key can be used for key derivation"
74+
},
75+
"canEncrypt": {
76+
"type": "boolean",
77+
"description": "Whether the key can be used for encryption"
78+
},
79+
"canSign": {
80+
"type": "boolean",
81+
"description": "Whether the key can be used for signing"
82+
},
83+
"canUnwrap": {
84+
"type": "boolean",
85+
"description": "Whether the key can be used for unwrapping another key"
86+
},
87+
"canVerify": {
88+
"type": "boolean",
89+
"description": "Whether the key can be used for verification"
90+
},
91+
"canWrap": {
92+
"type": "boolean",
93+
"description": "Whether the key can be used for wrapping another key"
94+
},
95+
"isPermanent": {
96+
"type": ["boolean", "null"],
97+
"description": "Whether the key is stored permanently in the keychain"
98+
},
99+
"type": {
100+
"type": ["string", "null"],
101+
"description": "Type of the key (RSA, Elliptic Curve, etc.)",
102+
"enum": ["RSA", "Elliptic Curve", "Elliptic Curve (Prime Random)", null]
103+
}
104+
},
105+
"required": ["canDecrypt", "canDerive", "canEncrypt", "canSign", "canUnwrap", "canVerify", "canWrap"]
106+
}
107+
}
108+
}

0 commit comments

Comments
 (0)