pfn / passifox

Extensions to allow Chrome and Firefox (4.0+) to auto form-fill passwords from KeePass (requires KeePassHttp)
GNU General Public License v3.0
904 stars 185 forks source link

Suggestion to improve "Unknown KeePassHttp error: 400" #489

Open Mark-Booth opened 8 years ago

Mark-Booth commented 8 years ago

Yesterday I finally got around to installing mono, libgdiplus, KeePass and PassIFox on my work Linux machine (RHEL 6.7 Santiago, no root access). Although I followed the PassIFox instructions to the letter, I could not connect it to KeePass.

At the "KeePass has not been configured" banner when I clicked "Connect" it just returned "Unknown KeePassHttp error: 400", which was the same as I got if KeePass was not running. The fact that I didn't get a "KeePassHttp is not running" error should have been my first clue, but I didn't recognise it as significant.

I confirmed that the port was being opened by telnetting to "localhost 19455" both before and after starting KeePass, getting "Connection refused" and "Connected..." respectively.

Eventually, I decided to check about:config and searching for passifox I found a non default extensions.passifix.keepasshttp_url set. Before getting KeePass to work on my Linux machine, I had been trying to get it to connect to my KeePass install on my WIndows machine.

Resetting the url back to localhost:19455 git everything working, but the generic nature of the error didn't help me very much.

Although this is rather an edge case, It would be nice if passifox added the keepasshttp_url value to the error message when it is non standard.

PassIFox v1.2.0 (installed straight from the Firefox add-ons)
Firefox ESR v38.6.1 (the latest supported at work)
KeePassHttp v1.8.4.1 (using both the plgx method and the dll pair method, in both root and plugins)
KeePass v2.32 (using mono 4.4.0 & libgdiplus-4.2)
Any page which prompts to connect
Mark-Booth commented 8 years ago

This could be as simple as updating the notification in KeePassFox.jsm to be something like:

this._showNotification("Unknown KeePassHttp error: " + s
                      + " connecting to " + this._keepassHttpUrl, null,
                      "kpf-error-note");`

But I'm not very familiar with javascript.

While in that areas of code, it might be worth adding the same text to the "KeePassHttp is not running" error too.