From bda536f7a3eaa138a8dd46e2d769545a1d52ff40 Mon Sep 17 00:00:00 2001 From: Anton Bobrov Date: Thu, 25 May 2023 14:21:38 +0200 Subject: [PATCH] Related: #2192786 fix https://bugzilla.redhat.com/show_bug.cgi?id=2118991 --- firefox.spec | 7 + mozilla-1833330.patch | 632 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 639 insertions(+) create mode 100644 mozilla-1833330.patch diff --git a/firefox.spec b/firefox.spec index 12f8a2b..50bc09c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -330,6 +330,7 @@ Patch421: mozilla-s390x-skia-gradient.patch Patch422: one_swizzle_to_rule_them_all.patch Patch423: svg-rendering.patch Patch424: D158770.diff +Patch425: mozilla-1833330.patch # With clang LLVM 16 rust-bindgen 0.56.0 is too old, combined # https://github.com/rust-lang/rust-bindgen/pull/2319 @@ -715,6 +716,7 @@ echo "use_rustts %{?use_rustts}" %patch422 -p1 -b .one_swizzle_to_rule_them_all %patch423 -p1 -b .svg-rendering %patch424 -p1 -b .D158770.diff +%patch425 -p1 -b .mozilla-1833330 %if 0%{?fedora} >= 38 || (0%{?rhel} == 9 && %{rhel9_minor_version} >= 3) # MUST ONLY be applied for building against clang LLVM 16. @@ -1487,6 +1489,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Tue May 23 2023 Anton Bobrov 102.11.0-2 +- Do not import cert to certdb on override exception: + rhbz#2118991 + mzbz@1833330 + * Thu May 04 2023 Eike Rathke - 102.11.0-2 - Update to 102.11.0 build2 diff --git a/mozilla-1833330.patch b/mozilla-1833330.patch new file mode 100644 index 0000000..2c1af64 --- /dev/null +++ b/mozilla-1833330.patch @@ -0,0 +1,632 @@ +diff --git a/security/manager/locales/en-US/security/certificates/certManager.ftl b/security/manager/locales/en-US/security/certificates/certManager.ftl +--- a/security/manager/locales/en-US/security/certificates/certManager.ftl ++++ b/security/manager/locales/en-US/security/certificates/certManager.ftl +@@ -51,9 +51,6 @@ certmgr-cert-name = + certmgr-cert-server = + .label = Server + +-certmgr-override-lifetime = +- .label = Lifetime +- + certmgr-token-name = + .label = Security Device + +@@ -69,6 +66,9 @@ certmgr-email = + certmgr-serial = + .label = Serial Number + ++certmgr-fingerprint-sha-256 = ++ .label = SHA-256 Fingerprint ++ + certmgr-view = + .label = View… + .accesskey = V +diff --git a/security/manager/pki/resources/content/certManager.js b/security/manager/pki/resources/content/certManager.js +--- a/security/manager/pki/resources/content/certManager.js ++++ b/security/manager/pki/resources/content/certManager.js +@@ -64,22 +64,16 @@ var serverRichList = { + + buildRichList() { + let overrides = overrideService.getOverrides().map(item => { +- let cert = null; +- if (item.dbKey !== "") { +- cert = certdb.findCertByDBKey(item.dbKey); +- } + return { + hostPort: item.hostPort, +- dbKey: item.dbKey, + asciiHost: item.asciiHost, + port: item.port, + originAttributes: item.originAttributes, +- isTemporary: item.isTemporary, +- displayName: cert !== null ? cert.displayName : "", ++ fingerprint: item.fingerprint, + }; + }); + overrides.sort((a, b) => { +- let criteria = ["hostPort", "displayName"]; ++ let criteria = ["hostPort", "fingerprint"]; + for (let c of criteria) { + let res = a[c].localeCompare(b[c]); + if (res !== 0) { +@@ -106,10 +100,10 @@ var serverRichList = { + _richBoxAddItem(item) { + let richlistitem = document.createXULElement("richlistitem"); + +- richlistitem.setAttribute("dbKey", item.dbKey); + richlistitem.setAttribute("host", item.asciiHost); + richlistitem.setAttribute("port", item.port); + richlistitem.setAttribute("hostPort", item.hostPort); ++ richlistitem.setAttribute("fingerprint", item.fingerprint); + richlistitem.setAttribute( + "originAttributes", + JSON.stringify(item.originAttributes) +@@ -120,18 +114,7 @@ var serverRichList = { + hbox.setAttribute("equalsize", "always"); + + hbox.appendChild(createRichlistItem({ raw: item.hostPort })); +- hbox.appendChild( +- createRichlistItem( +- item.displayName !== "" +- ? { raw: item.displayName } +- : { l10nid: "no-cert-stored-for-override" } +- ) +- ); +- hbox.appendChild( +- createRichlistItem({ +- l10nid: item.isTemporary ? "temporary-override" : "permanent-override", +- }) +- ); ++ hbox.appendChild(createRichlistItem({ raw: item.fingerprint })); + + richlistitem.appendChild(hbox); + +@@ -170,32 +153,6 @@ var serverRichList = { + } + }, + +- viewSelectedRichListItem() { +- let selectedItem = this.richlist.selectedItem; +- if (!selectedItem) { +- return; +- } +- +- let dbKey = selectedItem.getAttribute("dbKey"); +- if (dbKey) { +- let cert = certdb.findCertByDBKey(dbKey); +- viewCertHelper(window, cert); +- } +- }, +- +- exportSelectedRichListItem() { +- let selectedItem = this.richlist.selectedItem; +- if (!selectedItem) { +- return; +- } +- +- let dbKey = selectedItem.getAttribute("dbKey"); +- if (dbKey) { +- let cert = certdb.findCertByDBKey(dbKey); +- exportToFile(window, cert); +- } +- }, +- + addException() { + let retval = { + exceptionAdded: false, +@@ -212,16 +169,8 @@ var serverRichList = { + }, + + _setButtonState() { +- let websiteViewButton = document.getElementById("websites_viewButton"); +- let websiteExportButton = document.getElementById("websites_exportButton"); + let websiteDeleteButton = document.getElementById("websites_deleteButton"); +- +- let certKey = this.richlist.selectedItem?.getAttribute("dbKey"); +- let cert = certKey && certdb.findCertByDBKey(certKey); +- + websiteDeleteButton.disabled = this.richlist.selectedIndex < 0; +- websiteExportButton.disabled = !cert; +- websiteViewButton.disabled = websiteExportButton.disabled; + }, + }; + /** +diff --git a/security/manager/pki/resources/content/certManager.xhtml b/security/manager/pki/resources/content/certManager.xhtml +--- a/security/manager/pki/resources/content/certManager.xhtml ++++ b/security/manager/pki/resources/content/certManager.xhtml +@@ -157,18 +157,13 @@ + + + +- +- ++ + + + + + + +-