all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rcopley@gmail.com, 35739@debbugs.gnu.org, npostavs@gmail.com
Subject: bug#35739: Bad signature from GNU ELPA
Date: Wed, 22 May 2019 15:40:46 -0400	[thread overview]
Message-ID: <jwvlfyy71dp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83muje76wa.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 22 May 2019 20:09:41 +0300")

>> It solves the problem by refraining from decoding until we know
>> positively that it needs to happen.
> You refrain from decoding what?

The files we download.

> E.g., Lisp files must be in UTF-8, right?

At first we don't care: we gets files (tarballs, GPG signatures, Elisp
files, ...) and while some of them may need decoding later on, not all
do.  And for purposes of signature checking, for some of those files we
need to get the exact original sequence of bytes, which is easier to get
if we only decode *after* signature checking rather than before.
For this reason we don't want to let URL do the decoding for us.

It's true that for "simple packages" made of a single .el file, after
signature checking we should maybe decode them as utf-8.  The main thing
we do with those is to save them as files and for that we don't
need decoding.  I haven't checked whether we do anything else
significant with those undecoded .el buffers, so maybe I missed an
explicit decode somewhere in there.

> And what about the descriptions we show in lisp-packages?

Not sure what you mean by that (I already mentioned the *-readme.txt
files which we do decode explicitly now).

> Or maybe I don't really understand why we need to decode _anything_,
> since we just download a .tar archive, right?

There's more than just tarballs.

>> Yes, this part should definitely not be in emacs-26.
> I'm actually asking why it should be on master.

It seemed like a simple way to provide this new functionality.
The functionality is needed at least by package.el, and I see no reason
why it should be the only client of URL that needs this functionality.

>> the change in url-insert only affects the case where the HTTP
>> headers returned by the server specify a particular "charset", which
>> is not the case when downloading .tar and .el files from
>> elpa.gnu.org AFAICT
> Why not?

For tarballs, since it's not a text/* format, it wouldn't make much
sense to specify a charset.  For Elisp files, it might just be a happy
accident of the configuration of the HTTP server, but my impression is
that nowadays it's considered a bad idea to rely on the HTTP headers to
tell you about the encoding (instead, the data contents should specify
its own encoding), so it's only useful for text/plain files.

> isn't that dangerous?

Dangerous?  definitely not.  All it means is that if you try to view
something like https://elpa.gnu.org/packages/xclip-1.8.el in your
browser there's a possibility that it will not display the non-ASCII
characters properly.  Of course, most browsers I know won't display
the file at all anyway (they ask you where to save it instead because
they don't know what else to do with text/x-emacs-lisp).


        Stefan






  reply	other threads:[~2019-05-22 19:40 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 21:25 bug#35739: Bad signature from GNU ELPA Richard Copley
2019-05-14 21:37 ` bug#35739: Acknowledgement (Bad signature from GNU ELPA) Richard Copley
2019-05-14 22:04 ` bug#35739: Bad signature from GNU ELPA Noam Postavsky
2019-05-14 22:26   ` Richard Copley
2019-05-14 22:42     ` Richard Copley
2019-05-15  2:42       ` Eli Zaretskii
2019-05-15  7:13         ` Richard Copley
2019-05-15 14:03           ` Stefan Monnier
2019-05-15 15:03             ` Eli Zaretskii
2019-05-18 22:36               ` Stefan Monnier
2019-05-22  5:19                 ` Eli Zaretskii
2019-05-22 16:20                   ` Stefan Monnier
2019-05-22 17:09                     ` Eli Zaretskii
2019-05-22 19:40                       ` Stefan Monnier [this message]
2019-05-23  3:50                         ` Eli Zaretskii
2019-05-23  4:06                           ` Stefan Monnier
2019-05-23  4:52                             ` Eli Zaretskii
2019-05-23 12:10                               ` Stefan Monnier
2019-05-23 14:15                                 ` Eli Zaretskii
2019-05-24 14:22                                   ` Stefan Monnier
2019-05-24 15:00                                     ` Eli Zaretskii
2019-05-24 19:31                                       ` Stefan Monnier
2019-05-24 19:43                                         ` Eli Zaretskii
2019-05-24 19:51                                           ` Stefan Monnier
2019-05-25  7:36                                             ` Eli Zaretskii
2019-05-25 18:38                                               ` Stefan Monnier
2019-05-25 19:13                                                 ` Eli Zaretskii
2019-05-15  2:41     ` Eli Zaretskii
2019-05-15  6:46       ` Richard Copley
2019-05-15 14:40         ` Eli Zaretskii
2019-05-15 15:12           ` Richard Copley
2019-05-29 18:45         ` Stefan Monnier
2019-05-29 19:11           ` Richard Copley
2019-05-29 20:07             ` Stefan Monnier
2019-05-29 20:50               ` Noam Postavsky
2019-05-30  2:35               ` Eli Zaretskii
2019-05-31  4:54                 ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=jwvlfyy71dp.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=35739@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=npostavs@gmail.com \
    --cc=rcopley@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.