Firefox and saved passwords – editing the omni.jar?   4 comments

Till I migrate all my MS Live Spaces content across (sigh).. first post.

Thought I’d make a note on an issue I found recently.. and am still working on. You used to be able to force Firefox to remember *all* passwords (which is fine if you’ve secured your PC), this was done by commenting out a part of  C:\Program Files\Mozilla Firefox\components\ nsloginmanager.js. It’s a section of the Password Manager that looks for pages requesting the “autocomplete=off” feature.

Except a while ago, that nsLoginManager.js edit trick stopped working. The file you had to edit disappeared from the build somewhere round FF4.

So, with a bit of poking round it seems they rolled a heap of files into a single JAR file including NsLoginManager.js. Ok, sure, we’ll just edit the file in there as described here ( http://tipparti.wordpress.com/2011/05/30/make-firefox-prompt-remember-password-for-all-sites/trackback/ )

Hmm that doesn’t work as advertised.

Seems Mozilla ‘optimised’ the JAR file in a slightly non-ZIP standard way, to improve IO performance. Vista nor 7-zip can edit their omni.jar file.

But, there’s a workaround.. I just haven’t gotten it to work properly yet. The general idea is to extract the contents with Explorer to FF’s program directory (where they ‘used’ to be). Then you can edit the files, and leave them in place (rename the omni.jar file to activate changes). Make sure you copy the  JAR’s chrome.manifest file out and replace the existing one, I think this is a pointer to the omni.jar itself. I tried unzipping the files, no luck.  I’m editing *.manifest files to redirect just a portion of the omni.jar, testing on next reload of FF.

There’s a big s**tfight between some developers of apps like Winzip/7zip etc and Mozdevs on this point. I wish they’d work it out.

Anyhow it might cost a bit of performance, but if I can get omni.jar to unzip and work it’ll fix the problem.

Damn the Mozilla guys for using an ‘undocumented feature’ to improve performance.. and damn the popular compression app authors for not being broader in supporting more obscure features in the ZIP standard.

cheers..

Advertisements

Posted January 11, 2012 by benryanau in ICT

Tagged with , ,

4 responses to “Firefox and saved passwords – editing the omni.jar?

Subscribe to comments with RSS.

  1. I don’t know if you’re still working on this. Anyway, from https://developer.mozilla.org/en/Mozilla/About_omni.ja_%28formerly_omni.jar%29 I found this:

    “Several unzip tools and archives (including 7-Zip) currently cannot read omni.ja, due to the optimization that is applied to the file. It is suggested that Windows 7 users unzip the file by renaming it to omni.zip and using Windows Explorer to extract all files. Users of older versions of Windows can use InfoZip’s UnZip tool to extract files – make a copy of omni.ja, and drag-and-drop it onto unzip.exe.”

    Maybe that can help you?

    Spork Schivago
    • Yeah thanks Spork, I’ve got a workaround process that uses a Mozdev tool to de-optimise and re-optimise (written in Python – I’ll link it below, requires ActiveState Pyton under Win32).
      Even Win Explorer has trouble with the optimised JAR file when trying to re-save modifications back into it so that workaround doesn’t really work.

      This is the readme for the toolpack I’m posting:
      ============
      This is the readme for benryanau’s Omni.Ja toolkit b- contact me on the blog, https://benryanau.wordpress.com
      Here’s a small tool for working with Mozilla optimised jar’s.
      Under Win32 you need ActiveState Python – get it from http://www.activestate.com/activepython/downloads
      Also note They changed the name of omni.jar to omni.ja to reflect the fact that it’s a broken jar file for many people

      0) Extract the tool to a working directory and install Python to whever you like
      1) Copy your current omni.ja into the tool’s working directory and rename omni.ja to omni.jar
      2) Open a command prompt in the tool’s working dir and execute de-jar.cmd
      3) Use 7-Zip to extract the files you want to work with
      4) Add the modified files back to the omni.jar with 7-Zip
      5) Back at cmdline run re-jar.cmd
      6) Rename omni.jar to omni.ja
      7) Replace your Firefox working dir’s copy of omni.ja with the patched one (keep a backup!)

      That’s the process I use after editing nsloginmanager .js’s and it works for me.

  2. Sorry, I forgot to say that on my Gentoo Linux box, I have no problems extracting it using unzip. Haven’t tried with the GUI but I’d imagine there’d be no problems. Also, it says on the website, any version prior to Firefox 11 and Thunderbird 11 will name the file .JAR instead of .JA. Same file, they just dropped the R on versions 11+. Best of luck to you!

    Spork Schivago
  3. Here’s the toolset I use to edit the omni.ja files..
    https://skydrive.live.com/redir?resid=E55F3F5F75B5A7BB!1171

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: