1

(5 replies, posted in Bugs & problems)

Yippy!  Found the problem.

1) The raw PGP message from the original HTML is processed into a <pre> </pre> block.
2) FireGPG wash function (in cselect.js) replaces all <br>s with newlines (\n).

However, most PGP blocks already include newlines within the HTML right after each <br>.  Therefore, the <pre> block doubles up on the newlines it contains in the text.

Firefox 3.5 used to automatically replace multiple whitespace characters (including newlines) with a single whitespace.  This is an error within the context of a <pre> block.

Firefox 3.6 apparently fixes that error.

The fix to FireGPG is relatively simple.

Blocks that look like:

<div class="PlainText">--x--BEGIN PGP MESSAGE-----<br>
Version: GnuPG v1.4.10 (MingW32)<br>
<br>
aaaaaa...aaa<br>
aaaaaa...aaa<br>
=aaaa<br>
-----END PGP MESSAGE-----<br>

or like:

<div class="PlainText">--x--BEGIN PGP MESSAGE-----<br>Version: GnuPG v1.4.10 (MingW32)<br><br>
aaaaaa...aaa<br>aaaaaa...aaa<br>=aaaa<br>-----END PGP MESSAGE-----<br>

should both end up looking like:

--x--BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.10 (MingW32)

aaaaaa...aaa
aaaaaa...aaa
=aaaa
-----END PGP MESSAGE-----

I'll send in some code.

2

(5 replies, posted in Bugs & problems)

Here are some sample results showing the differences between Firefox 3.5 and 3.6.
I replaced a "-" with an "x" in the "BEGIN PGP MESSAGE" lines so that FireGPG doesn't detect it.

Firefox 3.5:

<body xmlns="http://www.w3.org/1999/xhtml" id="firegpg-inline" class="caution">
        <div id="trusted-confirm" title="If this number is in your status bar, it's a real FireGPG block">qZNh</div>
        <div id="header">PGP Encrypted Message</div>
        <pre id="output" style="display: none;"/>
        <div id="message"/>
        <div id="options">
            <span tabindex="0" id="toggle-original">Hide original</span> |
            <span tabindex="0" id="action">Decrypt</span> |
            <span tabindex="0" id="switch-direction">Switch direction</span>

        </div>
        <pre id="original" style="display: block;">--x--BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.10 (MingW32)

aaaaaaaa...
aaaaaaaa...
=aaa
-----END PGP MESSAGE-----</pre>
    </body>

Firefox 3.6:

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Block context</title>
        <link rel="stylesheet" type="text/css" href="block.css"/>
    </head>
    <body id="firegpg-inline" class="failure">
        <div id="trusted-confirm" title="If this number is in your status bar, it's a real FireGPG block"/>
        <div id="header">PGP Encrypted Message</div>
        <pre id="output" style="display: block;">Decryption failed. Unknown error.
gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
gpg: invalid radix64 character 3A skipped
gpg: invalid radix64 character 2E skipped
gpg: invalid radix64 character 2E skipped
gpg: invalid radix64 character 28 skipped
gpg: invalid radix64 character 29 skipped
gpg: CRC error; 7B67B9 - 418C54
gpg: [don't know]: invalid packet (ctb=55)</pre>
        <div id="message" style="direction: ltr;"/>
        <div id="options">
            <span tabindex="0" id="toggle-original">Hide original</span> |
            <span tabindex="0" id="action">Decrypt</span> |
            <span tabindex="0" id="switch-direction">Switch direction</span>

        </div>
        <pre id="original" style="display: block; direction: ltr;">--x--BEGIN PGP MESSAGE-----

Version: GnuPG v1.4.10 (MingW32)



bbbbbbbb....

bbbbbbbb....

=bbb

-----END PGP MESSAGE-----</pre>
    </body>
</html>

I don't know why 3.5 doesn't get the <html> and <head> blocks like 3.6.  Other than that, they look similar until the actual PGP message starts.  For 3.6, it puts and extra Line Feed (LF) character for EVERY line--including lines that only have a LF, i.e., after the "Version" line.  The 3.5 sample came from a Linux box (the Linux system hasn't put out a 3.6 version yet).  The 3.6 version came from a MSW Vista box.

The samples were captured by highlighting the entire "PGP Encrypted Message" block, right click, View Selection Source .

3

(3 replies, posted in Bugs & problems)

See message http://forum.getfiregpg.org/viewtopic.p … 2703#p2703

Same problem several others have reported.

4

(9 replies, posted in Bugs & problems)

See message http://forum.getfiregpg.org/viewtopic.p … 2703#p2703

I have also seen this problem.

5

(5 replies, posted in Bugs & problems)

For some reason, FireFox 3.6+ does not display/decrypt messages.  The display shows extra blank lines between each line in the PGP message.  Using the editor, I can copy and paste the message, remove the blank lines, and decrypt.  However it won't decrypt inline.  Anybody else have this problem?

I'll look at the code and see about detecting consecutive newlines and limiting them to only one.

Thanks! smile  When will the new version be out?

I've downloaded the code, found the problem, and created a fix:

In cselect.js:
  in wash: function(text)
change:
        var reg=new RegExp("<style>[^<]*</style>", "gi"); //Élimination des styles
        str = str.replace(reg,"\n");

        reg=new RegExp("<[^>]+>", "g"); // Élimination des balises HTML
        str = str.replace(reg, "");

to
        var reg=new RegExp("<style>[^<]*</style>", "gi"); //Élimination des styles
        str = str.replace(reg,"\n");

        reg=new RegExp("</div>", "gi"); // Force end of <div>s to a newline
        str = str.replace(reg, "\n");

        reg=new RegExp("<[^>]+>", "g"); // Élimination des balises HTML
        str = str.replace(reg, "");

This properly places a newline at the end of any <div>s since they tag a contained area anyway.  For that matter, other HTML tags might also cause this problem, but this is the only one I've seen generated by the latest PGP Desktop software (www.pgp.com).  Since the next line removes all tags anyway, I see no current problems.

Thanks the_glu!

Not having OWA access shouldn't pose a problem.  You can grab any web page with a encryption and modify the html to use a <div></div> starting after the last comment line in the encryption, ending after the encryption, and removing any <br> for the comment line.

Here's a sample HTML file that shows the problem:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
</head>
<body>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">-----BEGIN PGP MESSAGE-----<br>
Version: PGP Desktop 9.10.0 (Build 500)<br>
Charset: utf-8</font></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma"><font color="#000000" size="2" face="Tahoma">xxxxx...</font>...xxxxx<br>
yyyyy...yyyyy<br>
blah more lines of encryption...<br>
-----END PGP MESSAGE-----</font></div>
</body>
</html>

Save the above as an html file and test by loading it in Firefox.  You'll need FireGPG inline off to copy it (or do some creative copy and pasting with it on).  This should demonstrate the display problem nicely with the FireGPG inline option turned on and off.  So...have fun with it!

Please review the following message with FireGPG's "Check for PGP blocks in page" option OFF as FireGPG will otherwise catch all the PGP message parts and tend to obscure the discussion.

I have the following problem:

I am using Firefox on Ubuntu accessing a Outlook Web Access site.  Using FireGPG I can generally encrypt and decrypt emails OK.  However, for any emails received by users using IE through the same site, I get in-line failures to decrypt:

Decryption failed. Unknown error.
yyyyy...yyyy\n
gpg: invalid armor header: 
gpg: CRC error; 0F5926 - 2D90E0
gpg: [don't know]: invalid packet (ctb=4b)

The reason seems to be that FireGPG is failing to in-line interpret/render the message HTML properly.  For example, without FireGPG ([OFF] Check for PGP blocks in page), a message of this type renders as follows (Example 1):

-----BEGIN PGP MESSAGE-----
Version: PGP Desktop 9.10.0 (Build 500)
Charset: utf-8
xxxxx...xxxxx
yyyyy...yyyyy
blah more lines of encryption...
-----END PGP MESSAGE-----

With FireGPG ([ON] Check for PGP blocks in page), when I "display original", the message renders (Example 2):

-----BEGIN PGP MESSAGE-----
Version: PGP Desktop 9.10.0 (Build 500)
Charset: utf-8xxxxx...xxxxx
yyyyy...yyyyy
blah more lines of encryption...
-----END PGP MESSAGE-----

As you can see, then first line of the encryption is merged with the previous comment line.

If I select the text of Example 1 and use FireGPG's text editor to decrypt the message, all is well.  However, Example 2 will not decrypt in-line or with the text editor and gives the above error.  If I use the text editor, I can edit Example 2 by adding the proper line feed before the first encrypted character and all is well.

This tends to defeat the very excellent in-line decryption that work well with other messages.

Looking at the HTML code, I see that it seems to be a <div> rendering problem:

<div dir="ltr"><font color="#000000" size="2" face="Tahoma">-----BEGIN PGP MESSAGE-----<br>
Version: PGP Desktop 9.10.0 (Build 500)<br>
Charset: utf-8</font></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma"><font color="#000000" size="2" face="Tahoma">xxxxx...</font>...xxxxx<br>
yyyyy...yyyyy<br>
blah more lines of encryption...<br>
-----END PGP MESSAGE-----<br>
</font></div>

While IE/OWA "may" be constructing the email wrong, Firefox does display the message correctly without FireGPG.

Please fix.

10

(6 replies, posted in Bugs & problems)

Correction: Your PUBLIC KEY is used to encrypt and your PRIVATE KEY is used to decrypt.  So, you add your name (i.e. your PUBLIC KEY) to the list of users for encryption.  Then, you can decrypt your own sent messages (with your PRIVATE KEY, just like the other people to whom you sent the message).