You are here

[Fixed] GPG/enigmail broken with 3.1.7

9 posts / 0 new
Last post
LeJav
Offline
Last seen: 12 years 11 months ago
Joined: 2010-04-01 11:34
[Fixed] GPG/enigmail broken with 3.1.7

I notice that nsi is now Unicode. It seems that this breaks portable GPG/Enigmail.
It does not work anymore for me.

Also, is it possible to include my previous suggestion?
Here it is:
It seems there is a bug with enigmail.
I have a path for portable TB like: D:\nxxxxx\....
According to my understanding, when portable TB starts, portable GPG sets the correct path in prefs.js for gpg.exe. But the path is not correct: it is something like D:\name\\.... There is only one \ after the D:. In the case of \n, it is interpreted as a CR by TB and gpg is not found. If I have another letter instead of n, it works well.

I have solved the problem by modifying ThunderbirdPortable.nsi by replacing:
FileWrite $0 `user_pref("extensions.enigmail.agentPath", "$GPGPATHDIRECTORY\gpg.exe");`
with
${StrReplace} '$1' '\' '\\' '$GPGPATHDIRECTORY\gpg.exe'
FileWrite $0 `user_pref("extensions.enigmail.agentPath", '$1') ;`
with StrReplace from http://nsis.sourceforge.net/StrRep
(so, add "!include StrReplace.nsh" in Custom section).

ottosykora
Offline
Last seen: 2 weeks 5 days ago
Joined: 2007-10-11 17:48
whou!! yes!

you are right, there seems to be something fishy since the recent update.
I di dnot notice, since using 20024 for daily work still.

It looks like that somehow it tries to look for keys in somewhere appdata on c drive or so, definitely broken with the last update.

It lookks like it forces to store the keyrings to appdata gnupg and looks for them there what ever I try.
On start, it was even searching for the gpg.exe somewhere on system drive, on next start it improved, but the keyrings it refuses to accept any other position then in the appdata gnupg.
This is very problematic, if run and the keys imported again, they are copied and left on the host machine on exit.

Furtermore, it seems that the gpg.con is not read any more(??) and so settings are lost.

I would not recommend to use this version if encryption is needed.

John, can you please look into it to confirm if this is some portable problem or general some incompatibility with the enigmail?

Otto Sykora
Basel, Switzerland

John T. Haller
John T. Haller's picture
Online
Last seen: 8 min 30 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Possible Fix

I've posted a fix that should handle both issues:
https://portableapps.com/temp/ThunderbirdPortable.exe

Please ensure this works for you for both the \n issue and the APPDATA issue and post your results.

Sometimes, the impossible can become possible, if you're awesome!

ottosykora
Offline
Last seen: 2 weeks 5 days ago
Joined: 2007-10-11 17:48
ok just quick test

copied complete 316 from backup
run update 317
replaced the launcher exe

tested:
first time my XP crashed badly, but then on next reboot I was able to launch 317 and this time it did work as far as keyrings, gpg.conf and gpg.exe pointing correctly, no keyrings left somewhere on c drive, gpg.conf read correctly to full extend.
I have IDEA algo installed and this needs to be loaded in gpg.conf, so as it did load, the correct conf was picked.

( the current settings are pointing to the original gpg locations inside the TB folder, so at least this works correct, other settings testing later )

will test more , but have to run now...

Thanks for the speed! You are overtaking yourself soon....;-)

Otto Sykora
Basel, Switzerland

ottosykora
Offline
Last seen: 2 weeks 5 days ago
Joined: 2007-10-11 17:48
enigmail ok

enigmail seems to be ok now, have tested on other computers, also in wine on linux and all seems to work as supposed with the patch.
launcher.

Otto Sykora
Basel, Switzerland

LeJav
Offline
Last seen: 12 years 11 months ago
Joined: 2010-04-01 11:34
Almost OK

Thanks for your support.
It is OK for APPDATA with enigmail/gpg.
It is better with \n, but not completely OK.
It finds now well the path for gpg, but when I rerun TB, it seems that is does not read well the prefs.js and interprets \n.
It says: couldn't find GPG, and override with is checked, with bad path (\n is interpreted).

John T. Haller
John T. Haller's picture
Online
Last seen: 8 min 30 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Same Way

It's doing the same thing the next time, so I'm guessing the app itself (GPG or Enigmail) doesn't like \n either. Keep in mind that \n affects multiple apps and is recommended against.

Sometimes, the impossible can become possible, if you're awesome!

John T. Haller
John T. Haller's picture
Online
Last seen: 8 min 30 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Fixed in 3.1.7 Rev 2

Both of these issues have been fixed in 3.1.7 Rev 2. Now, directories with n after a backslash will not confusing the processor and the GPG directories should be placed in the correct places.

If you attempted to create a new key with the GPG and the broken 3.17 release, any files created would be located in APPDATA\gnugpg on your PC. The exact locations vary but should be as follows:

On Vista/7: C:\Users\&ltusername>\AppData\Roaming\gnupg
On XP: C:\Documents and Settings\<username>\Application Data\gnupg

If you don't use a local copy of GPG, you can safely delete them.

Attempting to use the 3.1.7 release to sign messages should have failed and would not have transferred your existing private keys to the local machine.

Sometimes, the impossible can become possible, if you're awesome!

LeJav
Offline
Last seen: 12 years 11 months ago
Joined: 2010-04-01 11:34
Many thanks

My \n problem does not exist any more!
Did not know that the WordReplace was integrated in NSIS and did the work.
Thanks again!

Log in or register to post comments