unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 28114@debbugs.gnu.org, Rainer Gemulla <rgemulla@uni-mannheim.de>
Subject: bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters
Date: Mon, 28 Aug 2017 14:30:01 +0200	[thread overview]
Message-ID: <od1k21nx4c6.fsf-ueno@gnu.org> (raw)
In-Reply-To: <83mv6xdyfi.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Aug 2017 12:20:49 +0300")

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





  reply	other threads:[~2017-08-28 12:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 20:09 bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters Rainer Gemulla
2017-08-18  9:20 ` Eli Zaretskii
2017-08-28 12:30   ` Daiki Ueno [this message]
2017-08-29 15:45     ` Eli Zaretskii
2017-08-29 15:57       ` bug#28114: Re[2]: " Rainer Gemulla
2017-09-02 10:03         ` Eli Zaretskii
2017-09-02 10:10           ` Rainer Gemulla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=od1k21nx4c6.fsf-ueno@gnu.org \
    --to=ueno@gnu.org \
    --cc=28114@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=rgemulla@uni-mannheim.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).