Bug 2961 - Partial retrieval not available with PGP/Inline encrypted messages
Summary: Partial retrieval not available with PGP/Inline encrypted messages
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Plugins/Privacy/PGP (show other bugs)
Version: 3.9.1
Hardware: PC Windows XP
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2013-07-10 23:27 CEST by LoseDanger
Modified: 2013-07-12 08:40 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LoseDanger 2013-07-10 23:27:16 CEST
When a Receive size limit is set lower than the size of a received PGP/Inline encrypted message, no option is offered to download the rest of the message, and the message cannot be properly decrypted.

Steps to reproduce:
1) Go to: Configuration -> Preferences for current account -> Receive

2) Set "Receive size limit" to	"1 KB"

3) OK

4) Create new message.

5) TO: your own email address.

6) Message body

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur viverra
tempus odio, sit amet consequat tortor volutpat et. Nullam at sem mauris.
Duis accumsan commodo nunc nec tincidunt. Nam sed purus sapien. Proin nec
risus purus. In sed diam nec nulla mollis suscipit. Nullam hendrerit
pellentesque odio, vel hendrerit turpis lacinia vitae. Vestibulum facilisis
lectus at dolor consectetur, a dictum nulla vehicula. Vestibulum eleifend
fringilla vehicula. Nam quis ante id lectus malesuada dignissim sodales
quis quam. Sed eget libero fermentum, adipiscing metus eu, tempor nulla.
Vestibulum nulla lacus, tristique viverra turpis a, convallis sodales
tellus.

7) Options -> Privacy System -> PGP Inline

8) Options -> Encrypt

9) Send

10) Click through the options appropriately.

11) Get Mail.

12) Click on the new message.

13) Observe it saying "Couldn't decrypt: No data" and the message being
partially downloaded without an option to download fully.
Comment 1 users 2013-07-11 16:21:03 CEST
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=1de8172c2e3c8eef2bac4a2cd9ebe727c0773f8a
Author: Paul <paul@claws-mail.org>
Date:   Thu Jul 11 15:17:48 2013 +0100

    fix bug 2961, 'Partial retrieval not available with PGP/Inline encrypted messages'
    
    do a more thorough check before deciding to go ahead with a (ultimately
    failed) decryption attempt: check for the end of the encrypted block,
    don't just assume, (never assume, it makes an ...), that it must be
    there if the beginning of the block is found.
    
    Move some stuff, which is now used in both -mime and -inline,  into a
    new file, pgpcore/pgp_utils.[ch]