GNU bug report logs - #37319
26.3; shr: Why inhibiting cookies when fetching images?

Previous Next

Package: emacs;

Reported by: Damien Cassou <damien <at> cassou.me>

Date: Fri, 6 Sep 2019 07:25:01 UTC

Severity: normal

Tags: fixed

Found in version 26.3

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37319 in the body.
You can then email your comments to 37319 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37319; Package emacs. (Fri, 06 Sep 2019 07:25:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Damien Cassou <damien <at> cassou.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 06 Sep 2019 07:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Damien Cassou <damien <at> cassou.me>
To: bug-gnu-emacs <at> gnu.org
Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Subject: 26.3; shr: Why inhibiting cookies when fetching images?
Date: Fri, 06 Sep 2019 09:24:26 +0200
Hi,

I would like to use shr to render an HTML document with images. These
images are only accessible when logged in, so I need cookies to be sent
by shr. Unfortunately, `shr-tag-img` explicitly pass t to
INHIBIT-COOKIES when calling `url-queue-retrieve`. Several calls to
`url-retrieve` in the same file also inhibit cookies.

Why is that so? Can we make that configurable through, e.g., a new
option `shr-img-inhibit-cookies` or similar?

Best,

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37319; Package emacs. (Sat, 14 Sep 2019 13:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 37319 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Damien Cassou <damien <at> cassou.me>
Cc: 37319 <at> debbugs.gnu.org
Subject: Re: bug#37319: 26.3; shr: Why inhibiting cookies when fetching images?
Date: Sat, 14 Sep 2019 15:57:05 +0200
Damien Cassou <damien <at> cassou.me> writes:

> I would like to use shr to render an HTML document with images. These
> images are only accessible when logged in, so I need cookies to be sent
> by shr. Unfortunately, `shr-tag-img` explicitly pass t to
> INHIBIT-COOKIES when calling `url-queue-retrieve`. Several calls to
> `url-retrieve` in the same file also inhibit cookies.
>
> Why is that so?

It's an artefact from when shr was used mainly for rendering Gnus
articles, I think.

> Can we make that configurable through, e.g., a new option
> `shr-img-inhibit-cookies` or similar?

Yes, I think that sounds fine.  eww, for instance, should (by default)
send cookies when retrieving images, for instance, but it needs to be
tempered by allowing not sending cookies to third-party images and the
like.  The entire eww cookie/referer thing needs a makeover, but that's
a different story.

But, yes, adding a `shr-use-cookies' variable to be bound before calling
`shr-insert-document' would be good.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37319; Package emacs. (Tue, 24 Sep 2019 15:50:02 GMT) Full text and rfc822 format available.

Message #11 received at 37319 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Damien Cassou <damien <at> cassou.me>
Cc: 37319 <at> debbugs.gnu.org
Subject: Re: bug#37319: 26.3; shr: Why inhibiting cookies when fetching images?
Date: Tue, 24 Sep 2019 17:49:21 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> But, yes, adding a `shr-use-cookies' variable to be bound before calling
> `shr-insert-document' would be good.

I've now added a `shr-cookie-policy' variable to the trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 24 Sep 2019 15:50:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 37319 <at> debbugs.gnu.org and Damien Cassou <damien <at> cassou.me> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 24 Sep 2019 15:50:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 23 Oct 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 158 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.