[Kde-pim] Review Request 124179: Kleo: Improve error handling of SignEncryptFilesTask

Andre Heinecke aheinecke at intevation.de
Thu Jun 25 18:45:24 BST 2015



> On June 25, 2015, 3:37 p.m., Allen Winter wrote:
> > not crazy about triplicating the same code -- rather see a new method fo dealing with the errors

Yes, the updated patch is more agressive in that it reduces most of the duplication of these three methods. This allows me to check for the new input failure in that central location.

I've also made another change (thats why i generalized the Summary)
Previously erors when removing input files were silently also ignored.
I find this wrong and possibly dangerous. If you think your supersecret file is removed and it
still exists in plain text because kleo encountered an error it might compromomise security.

So the new finishIO code no longer discards those errors.


- Andre


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124179/#review81747
-----------------------------------------------------------


On June 25, 2015, 5:45 p.m., Andre Heinecke wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124179/
> -----------------------------------------------------------
> 
> (Updated June 25, 2015, 5:45 p.m.)
> 
> 
> Review request for KDEPIM.
> 
> 
> Repository: kdepim
> 
> 
> Description
> -------
> 
> This deduplicates the IO Finalization and additionally checks
> for input failures.
> 
> As errors from preprocessing commands can lead to an
> empty input the crypto jobs appearently succeed (as they work
> on empty input) but create empty files. 
> 
> With removeInput set to true there is the possibility of
> data loss in that case.
> 
> The new method finishIO handles those errors. Additionally
> errors that occur when removing input files are no longer
> silently discarded.
> 
> See: https://bugs.g10code.com/gnupg/issue1624 for
> the report on input error issue
> 
> 
> Diffs
> -----
> 
>   kleopatra/crypto/signencryptfilestask.cpp abfa6e4 
>   kleopatra/utils/input.h 0a4a930 
>   kleopatra/utils/input.cpp 751e6f1 
> 
> Diff: https://git.reviewboard.kde.org/r/124179/diff/
> 
> 
> Testing
> -------
> 
> The input error handling has been part of the last gpg4win version (relased in march).
> 
> I've also tested this with KDE/4.14 under linux by trying to archive / encrypt files without read permission.
> Tested removeInput error handling by creating a read only folder and trying to remove files after encryption in there.
> 
> 
> Thanks,
> 
> Andre Heinecke
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list