emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] url: Wrap cookie headers in url-http--encode-string.


From: Eli Zaretskii
Subject: Re: [PATCH] url: Wrap cookie headers in url-http--encode-string.
Date: Thu, 08 Sep 2016 20:20:30 +0300

> From: Toke Høiland-Jørgensen <address@hidden>
> Cc: Eli Zaretskii <address@hidden>, address@hidden, address@hidden
> Date: Thu, 08 Sep 2016 17:58:31 +0200
> 
> (url-retrieve-synchronously "http://google.se";) ; sets a cookie
> (let* ((url-request-data (encode-coding-string "æøå" 'utf-8)))
>        (url-retrieve-synchronously "http://google.se";)) ; crashes

Can the cookies file include non-ASCII text?  E.g., could the domain
be non-ASCII?

If that file is guaranteed to be pure ASCII, we can indeed force the
string returned by url-cookie-generate-header to be unibyte.
Otherwise we need to encode it.

Btw, if the cookies file can indeed include non-ASCII characters, IMO
url-cookie needs to take more care of forcing specific encoding when
it reads and writes that file, otherwise this is a problem waiting to
happen.  But we can solve this on master, if needed; the urgent thing
is to fix the release branch for this particular use case.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]