Cannot View cert info during import
Categories
(Firefox :: Security, defect, P1)
Tracking
()
People
(Reporter: kwilson, Assigned: carolina.jimenez.g)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Steps to reproduce in Nightly:
- Enter this URL: http://eca.hinet.net/download/HRCA_b64.crt
- Click on "View" button to examine cert - nothing happens.
When folks use such a URL to import a cert, they must be able to examine the cert to make sure it is what they are expecting before they trust it.
Comment 1•5 years ago
|
||
The problem is that here:
The ownerGlobal
is that of the import dialog, not the browser window. You can get the actual latest browser window like this: https://searchfox.org/mozilla-central/rev/878bbf3cb8897a208454df27535f3522ab482cf2/browser/base/content/utilityOverlay.js#1005
So this should be easy to fix.
Apparently we have no tests for this, so it would be nice to add a test (maybe add it to the test that we have for opening about:certificate from different sources).
Danielle, Carolina, do you think one of you would be able to take this?
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/098d87f4abbc
Fixes problem when opening a certificate from downloadcert.xul.r=johannh
Comment 6•5 years ago
|
||
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=267994613&repo=autoland&lineNumber=24120
Backout link: https://hg.mozilla.org/integration/autoland/rev/68dba8038459a5130af3052f90a130e16116449e
[task 2019-09-23T17:12:45.132Z] 17:12:45 INFO - TEST-START | toolkit/components/certviewer/tests/browser/browser_openTabAndSendCertInfo.js
[task 2019-09-23T17:12:45.132Z] 17:12:45 INFO - GECKO(1934) | Chrome file doesn't exist: /Users/cltbld/tasks/task_1569257755/build/tests/mochitest/browser/toolkit/components/certviewer/tests/browser/head.js
[task 2019-09-23T17:12:45.133Z] 17:12:45 INFO - GECKO(1934) | ++DOCSHELL 0x11f3d1000 == 7 [pid = 1934] [id = {72d30348-5894-604e-8c54-0b55c8e624b4}]
[task 2019-09-23T17:12:45.133Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 13 (0x10d10f5c0) [pid = 1934] [serial = 14] [outer = 0x0]
[task 2019-09-23T17:12:45.133Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 14 (0x12b6da800) [pid = 1934] [serial = 15] [outer = 0x10d10f5c0]
[task 2019-09-23T17:12:45.138Z] 17:12:45 INFO - GECKO(1934) | [Parent 1934, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file /builds/worker/workspace/build/src/dom/base/ThirdPartyUtil.cpp, line 416
[task 2019-09-23T17:12:45.183Z] 17:12:45 INFO - GECKO(1934) | [Parent 1934, Main Thread] WARNING: NS_ENSURE_TRUE(root) failed: file /builds/worker/workspace/build/src/layout/base/nsDocumentViewer.cpp, line 3168
[task 2019-09-23T17:12:45.247Z] 17:12:45 INFO - GECKO(1934) | --DOMWINDOW == 2 (0x1062b3800) [pid = 1938] [serial = 11] [outer = 0x0] [url = about:blank]
[task 2019-09-23T17:12:45.329Z] 17:12:45 INFO - GECKO(1934) | ++DOCSHELL 0x12a7cc000 == 8 [pid = 1934] [id = {959b3bad-6d3c-a242-b9ad-9ab074401701}]
[task 2019-09-23T17:12:45.329Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 15 (0x12cd647a0) [pid = 1934] [serial = 16] [outer = 0x0]
[task 2019-09-23T17:12:45.329Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 16 (0x10d15c800) [pid = 1934] [serial = 17] [outer = 0x12cd647a0]
[task 2019-09-23T17:12:45.340Z] 17:12:45 INFO - GECKO(1934) | --DOCSHELL 0x106243000 == 0 [pid = 1938] [id = {331021e0-b5b3-0f4e-bd91-8d8649f1ed4b}] [url = about:blank]
[task 2019-09-23T17:12:45.382Z] 17:12:45 INFO - GECKO(1934) | [Parent 1934, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file /builds/worker/workspace/build/src/dom/base/ThirdPartyUtil.cpp, line 416
[task 2019-09-23T17:12:45.497Z] 17:12:45 INFO - GECKO(1934) | ++DOCSHELL 0x12c81a800 == 9 [pid = 1934] [id = {ec80319b-7818-a44f-8779-aa8a6c72c54a}]
[task 2019-09-23T17:12:45.497Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 17 (0x12c1bc3e0) [pid = 1934] [serial = 18] [outer = 0x0]
[task 2019-09-23T17:12:45.523Z] 17:12:45 INFO - GECKO(1934) | ++DOCSHELL 0x133a88800 == 10 [pid = 1934] [id = {df5f6c6e-d17c-254c-8cb6-0463dc3c7074}]
[task 2019-09-23T17:12:45.523Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 18 (0x12cd645c0) [pid = 1934] [serial = 19] [outer = 0x0]
[task 2019-09-23T17:12:45.565Z] 17:12:45 INFO - GECKO(1934) | [Parent 1934, Main Thread] WARNING: '!mWindow->GetCurrentInnerWindow()', file /builds/worker/workspace/build/src/dom/ipc/nsQueryActor.h, line 20
[task 2019-09-23T17:12:45.565Z] 17:12:45 INFO - GECKO(1934) | [Parent 1934, Main Thread] WARNING: '!mWindow->GetCurrentInnerWindow()', file /builds/worker/workspace/build/src/dom/ipc/nsQueryActor.h, line 20
[task 2019-09-23T17:12:45.668Z] 17:12:45 INFO - GECKO(1934) | ++DOCSHELL 0x106243800 == 1 [pid = 1938] [id = {cc6c8fae-5ac7-bc4c-a644-639a14ad719e}]
[task 2019-09-23T17:12:45.668Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 3 (0x11c23ed40) [pid = 1938] [serial = 15] [outer = 0x0]
[task 2019-09-23T17:12:45.668Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 4 (0x10452a800) [pid = 1938] [serial = 16] [outer = 0x11c23ed40]
[task 2019-09-23T17:12:45.732Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 19 (0x12f72f000) [pid = 1934] [serial = 20] [outer = 0x12c1bc3e0]
[task 2019-09-23T17:12:45.732Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 20 (0x12f72fc00) [pid = 1934] [serial = 21] [outer = 0x12cd645c0]
[task 2019-09-23T17:12:45.874Z] 17:12:45 INFO - GECKO(1934) | ++DOMWINDOW == 5 (0x106460c00) [pid = 1938] [serial = 17] [outer = 0x11c23ed40]
[task 2019-09-23T17:12:45.999Z] 17:12:45 INFO - GECKO(1934) | [Parent 1934, Main Thread] WARNING: Ignoring duplicate observer.: file /builds/worker/workspace/build/src/modules/libpref/Preferences.cpp, line 2696
[task 2019-09-23T17:12:45.999Z] 17:12:45 INFO - TEST-INFO | started process screencapture
[task 2019-09-23T17:12:46.202Z] 17:12:46 INFO - TEST-INFO | screencapture: exit 0
[task 2019-09-23T17:12:46.202Z] 17:12:46 INFO - Buffered messages logged at 17:12:45
[task 2019-09-23T17:12:46.202Z] 17:12:46 INFO - Entering test bound openFromPopUp
[task 2019-09-23T17:12:46.202Z] 17:12:46 INFO - Testing openFromPopUp
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Console message: OpenGL compositor Initialized Succesfully.
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Version: 2.1 INTEL-12.9.22
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Vendor: Intel Inc.
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Renderer: Intel Iris OpenGL Engine
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - FBO Texture Target: TEXTURE_2D
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Console message: OpenGL compositor Initialized Succesfully.
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Version: 2.1 INTEL-12.9.22
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Vendor: Intel Inc.
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Renderer: Intel Iris OpenGL Engine
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - FBO Texture Target: TEXTURE_2D
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Console message: OpenGL compositor Initialized Succesfully.
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Version: 2.1 INTEL-12.9.22
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Vendor: Intel Inc.
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Renderer: Intel Iris OpenGL Engine
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - FBO Texture Target: TEXTURE_2D
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Buffered messages finished
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/certviewer/tests/browser/browser_openTabAndSendCertInfo.js | about:certificate was opened - false == true - JS frame :: chrome://mochitests/content/browser/toolkit/components/certviewer/tests/browser/browser_openTabAndSendCertInfo.js :: checkSpec :: line 25
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - Stack trace:
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - chrome://mochitests/content/browser/toolkit/components/certviewer/tests/browser/browser_openTabAndSendCertInfo.js:checkSpec:25
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - chrome://mochitests/content/browser/toolkit/components/certviewer/tests/browser/browser_openTabAndSendCertInfo.js:openFromPopUp:87
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1350
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1385
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1213
[task 2019-09-23T17:12:46.203Z] 17:12:46 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:805
[task 2019-09-23T17:12:46.213Z] 17:12:46 INFO - TEST-PASS | toolkit/components/certviewer/tests/browser/browser_openTabAndSendCertInfo.js | We received an base64 string - "null" == "null" -
Assignee | ||
Comment 7•5 years ago
|
||
Uhm, that's strange. I ran that test multiple times locally and I see sometimes it passes and sometimes it doesn't. I have no clue what should be going wrong here, Johann, do you have any insights on it? Thank you
Comment 8•5 years ago
|
||
Hi Carolina, great question! I think what you're seeing here is an early "about:blank" load that can happen before the actual about:certificate page is laoded (for various complicated reasons). So about:blank loads and the waitForNewWindow function picks up on it because we told it to return on the first load in the new window. Luckily waitForNewWindow takes a "url" parameter that can be a string or a function which will check if the url that's loaded is the correct one and only return then.
I've made a small change to your test that looks like this:
https://hg.mozilla.org/try/rev/e3d1959914058f838b01f4902a0b1f08995dcabf
And pushed to try to see if that's successful:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=285d68034a23ef2295fa9687cbe60b56b2cb38ab
If that works you can just incorporate that change into your original patch and try to land again.
Thanks!
Assignee | ||
Comment 9•5 years ago
|
||
Thanks a lot Johann!
Assignee | ||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/91bd65bd68a6
Fixes problem when opening a certificate from downloadcert.xul.r=johannh
Comment 11•5 years ago
|
||
bugherder |
Comment 12•5 years ago
|
||
I've managed to reproduce this issue using Firefox 71.0a1 (20190912215412).
This is verified fixed using Firefox 71.0a1 (20191007215350) on the following OSes: Windows 10x64, Ubuntu 18.04x64 and macOS 10.13.
Description
•