Resolve decryption failure when message has no version header
ClosedPublic

Authored by kavindap on May 9 2018, 12:37 AM.

Details

Summary

BUG 357462

Test Plan
  1. Copy a message without the version header into KGpg (and no blank line/whitespace between the begin PGP message header and ciphertext.)
  2. Decrypt message
  3. Decryption succeed.

Diff Detail

Repository
R358 KGpg
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kavindap created this revision.May 9 2018, 12:37 AM
Restricted Application added a subscriber: kde-utils-devel. · View Herald TranscriptMay 9 2018, 12:37 AM
kavindap requested review of this revision.May 9 2018, 12:37 AM
kavindap retitled this revision from BUG 357462 to Resolve decryption failure when message has no version header .May 9 2018, 12:41 AM
kavindap edited the summary of this revision. (Show Details)
kavindap edited the test plan for this revision. (Show Details)
kavindap added a reviewer: dakon.
kavindap edited the test plan for this revision. (Show Details)
dakon requested changes to this revision.May 9 2018, 5:20 AM
dakon added inline comments.
transactions/kgpgdecrypt.cpp
116–120

This can become "} else if…", none of the following code can be run in this call as all check line again for different values.

transactions/kgpgdecrypt.h
85

You probably do not need this variable, you can directly call setSuccess() when you receive the line.

This revision now requires changes to proceed.May 9 2018, 5:20 AM

THe problem is KGpgDecrypt:: finish will be called after every line is read from gpg. If we use setSuccess inside nextLine it would be overrided by finish().

kavindap updated this revision to Diff 33886.May 9 2018, 1:45 PM
kavindap retitled this revision from Resolve decryption failure when message has no version header to Resolve decryption failure when message has no version header.

calling KGpgTextOrFileTransaction::finish()

kavindap updated this revision to Diff 33887.May 9 2018, 1:54 PM

Style formatting and comments

kavindap updated this revision to Diff 33888.May 9 2018, 2:06 PM
kavindap marked an inline comment as done.

Fix grammer.

dakon accepted this revision.May 9 2018, 4:14 PM
This revision is now accepted and ready to land.May 9 2018, 4:14 PM
This revision was automatically updated to reflect the committed changes.