Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#13218 closed (fixed)

django-syndication can't handle https URLs

Reported by: schaefer Owned by: Ben Firshman
Component: contrib.syndication Version: 1.1
Severity: Keywords:
Cc: schaefer@…, Ben Firshman, skeen@…, clouserw@…, james@…, stephen.donner@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

django-syndication will always use an http scheme for feed URLs, even if the site is using https. This can cause problems when the site is only using https and redirects all http requests to a default page.

It seems to me that the main "culprit" here is add_domain:

source:django/trunk/django/contrib/syndication/views.py#L11

Attachments (1)

13218.diff (4.5 KB) - added by Ben Firshman 7 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 7 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

This isn't entirely true - syndication will honor https:// if it is provided in the links that are to be rendered. However, it is true that a feed will always assume that the URL scheme is HTTP, regardless of the request. The request scheme information is available when add_domain is called, so it should be used.

comment:2 Changed 7 years ago by Ben Firshman

Cc: Ben Firshman added
Owner: changed from nobody to Ben Firshman

Changed 7 years ago by Ben Firshman

Attachment: 13218.diff added

comment:3 Changed 7 years ago by Ben Firshman

Has patch: set

comment:4 Changed 7 years ago by Ben Firshman

Triage Stage: AcceptedReady for checkin

comment:5 Changed 7 years ago by Ben Firshman

Triage Stage: Ready for checkinAccepted

I done this wrong.

comment:6 Changed 6 years ago by samkeen

Cc: samkeen added

comment:7 Changed 6 years ago by samkeen

Cc: skeen@… added; samkeen removed

Just checking on progress for this bug

I found that as mentioned, I could work around the generation of the <link> tag by providing the entire URL (including the https), But the syndication framework is generating the <atom:link on its own with the hard coded http scheme leading to rss validation errors

http://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fpreview.addons.mozilla.org%2Fen-US%2Ffirefox%2Faddon%2F10868%2Fversions%2Fformat%3Arss

I'm new to the Django ticket triage process, but it looks like the next stage for this ticket is "ready for checkin". Let me know if there is anything I can do to help move this patch towards being landed.

thanks

comment:8 Changed 6 years ago by Wil Clouser

Cc: clouserw@… added

comment:9 Changed 6 years ago by James Socol

Cc: james@… added

comment:10 Changed 6 years ago by stephendonner

Cc: stephen.donner@… added

comment:11 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [14007]) Fixed #13218 -- Ensure that syndicated content served over HTTPS uses https:// links by default. Thanks to schaefer for the report, and Ben Firshman for the patch.

comment:12 Changed 6 years ago by Russell Keith-Magee

(In [14010]) [1.2.X] Fixed #13218 -- Ensure that syndicated content served over HTTPS uses https:// links by default. Thanks to schaefer for the report, and Ben Firshman for the patch.

Backport of r14007 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top