[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage re
From: |
Daiki Ueno |
Subject: |
bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters |
Date: |
Mon, 28 Aug 2017 14:30:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Hello,
Eli Zaretskii <eliz@gnu.org> writes:
>> From: "Rainer Gemulla" <rgemulla@uni-mannheim.de>
>> Date: Wed, 16 Aug 2017 20:09:46 +0000
>>
>> When I use plstore with gnupg (from either Cygwin or directly the
>> Windows version), plstore does not
>> correctly decrypt.
>>
>> The reason seems to be that spurious carriage return characters are
>> added when encrypting the plstore file.
>> When later decrypting it, these carriage returns make gnupg fail.
>>
>> This issue can be reproduced by opening a plstore file in
>> plstore-mode and encrypting and decrypting it
>> repeatedly via C-c C-c. The added carriage returns are directly visible.
>>
>> The error also affects other packages that use the plstore.
>>
>> A quick workaround for me was to add an advice that removes the
>> carriage returns (here ^M needs to be
>> replaced by the carriage return character):
>
> Daiki, could you please look into this? AFAICT, the problem is that
> plstore.el uses insert-file-contents-literally to read the files,
> which leaves the CR characters intact. Why does plstore.el needs to
> use that function? Can it instead bind coding-system-for-read to
> raw-text, and then use insert-file-contents? Or even just use
> insert-file-contents?
Sorry for the late response. I barely remember the detail, but I
suppose it is a leftover when I made plstore editable. It sounds good
to just use insert-file-contents here.
Regards,
--
Daiki Ueno