bug 940994 - follow-up to fix some issues that were missed in review r=mmc
authorDavid Keeler <dkeeler@mozilla.com>
Fri, 14 Nov 2014 16:46:23 -0800
changeset 240195 b683d38c4c0055c40b705c0e4d0d238296693f09
parent 240194 3cd01637b2ef04dfd818d3bfa7e10ecd8fab30ec
child 240196 e75e7054ecc40c2cf5498de3d1187740889338dc
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmmc
bugs940994
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 940994 - follow-up to fix some issues that were missed in review r=mmc
security/manager/pki/resources/content/certManager.js
--- a/security/manager/pki/resources/content/certManager.js
+++ b/security/manager/pki/resources/content/certManager.js
@@ -381,21 +381,21 @@ function restoreCerts()
                   "*.p12; *.pfx");
   fp.appendFilter(bundle.getString("file_browse_Certificate_spec"),
                   gCertFileTypes);
   fp.appendFilters(nsIFilePicker.filterAll);
   if (fp.show() == nsIFilePicker.returnOK) {
     // If this is an X509 user certificate, import it as one.
 
     var isX509FileType = false;
-    var fileTypesList = gFileTypesList.split('; ');
-    for (var type in fileTypesList) {
+    var fileTypesList = gCertFileTypes.slice(1).split('; *');
+    for (var type of fileTypesList) {
       if (fp.file.path.endsWith(type)) {
         isX509FileType = true;
-  	break;
+        break;
       }
     }
 
     if (isX509FileType) {
       let fstream = Components.classes["@mozilla.org/network/file-input-stream;1"]
                       .createInstance(Components.interfaces.nsIFileInputStream);
       fstream.init(fp.file, -1, 0, 0);
       let dataString = NetUtil.readInputStreamToString(fstream, fstream.available());