Open
Bug 1012615
Opened 10 years ago
Updated 2 years ago
browser.helperApps.neverAsk.saveToDisk does not work for .pem file
Categories
(Firefox :: Settings UI, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: charlin, Unassigned)
References
Details
Attachments
(1 file)
1.24 KB,
text/plain
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E; rv:11.0) like Gecko Steps to reproduce: firefox 29.0.1 running automation with Selenium web drive, and test requires download of a .pem file (created by OpenSSL) Have following code for my firefox profile: FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("browser.download.folderList", 2); profile.setPreference("browser.download.dir", "C:\\Ortaf\\download"); profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/octet-stream"); profile.setPreference("browser.helperApps.alwaysAsk.force", false); profile.setPreference("browser.download.manager.showWhenStarting", false); I got the MIME type by uploading a CAcert.pem to http://mime.ritey.com/ but application/octet-stream didn't work. So I've tried others, such as: text/pem application/x-pem-file (by this way, this is what OpenSSL site says MIME type should be, http://pki-tutorial.readthedocs.org/en/latest/mime.html) application/x-pem but none worked I've attached a CAcert.pem for you to try Actual results: pop-up continue to show up. I've opened \AppData\local\temp\ where new folders created for each selenium runs, and checked pref.js. It contains the correct preferences as set by above code. Expected results: no pop-up, and file downloaded and saved without user-interaction
I found that setting to TEXT/PLAIN work! Actually this was such an obvious choice that I should have tried, because even without using any automation tools, when I manually try to download the cert and Firefox pops up that download prompt window, it is defaulting to trying to use Notepad.exe to open this CAcert.pem file, which means Firefox sees it as mime type of text/plain I don't know if this is a bug in firefox. It is common knowledge that you could open a cert file using text editor, but at the same time, everyone talks about different cert files having/requiring matching to appropriate MIME-type.
Updated•10 years ago
|
Component: Untriaged → Preferences
Comment 2•10 years ago
|
||
David, having noticed that we have some magic regarding PEM files, is it possible this bug is caused by the relevant core security code and will be fixed by fixing bug 1024871? :-)
Flags: needinfo?(dkeeler)
I believe so, yes.
Flags: needinfo?(dkeeler)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•