Affects Version/s: None
Fix Version/s: None
Sometimes, a space, tab, linefeed or any other whitespace appears directly before or after the “----
BEGIN ....--- “ and “-- END ....----“ header lines when copying and pasting PGP messages from a PGP application into a webmail. An example is copying a encrypted message by double clicking a HTML table cell and pasting this in a conventional mail client, or copying and pasting from a PGP application into a webmail client. Then a space will be appended in the beginning and end, which is basically invisible for the naked eye.
This causes messages to not get decrypted or verified properly in ciphermail.
Suggestion of fix:
For every line that contains ----
BEGIN*---- and ---- END*----, delete any illegal charachters in the beginning and end.
Such as (regexp):
(BEGIN|END)([-^])--- [^\n]*\n/\n--- $2$3----\n/g