Code

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13218 closed (fixed)

django-syndication can't handle https URLs

Reported by: schaefer Owned by: bfirsh
Component: contrib.syndication Version: 1.1
Severity: Keywords:
Cc: schaefer@…, bfirsh, 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 bfirsh 4 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 4 years ago by bfirsh

  • Cc bfirsh added
  • Owner changed from nobody to bfirsh

Changed 4 years ago by bfirsh

comment:3 Changed 4 years ago by bfirsh

  • Has patch set

comment:4 Changed 4 years ago by bfirsh

  • Triage Stage changed from Accepted to Ready for checkin

comment:5 Changed 4 years ago by bfirsh

  • Triage Stage changed from Ready for checkin to Accepted

I done this wrong.

comment:6 Changed 4 years ago by samkeen

  • Cc samkeen added

comment:7 Changed 4 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 4 years ago by clouserw

  • Cc clouserw@… added

comment:9 Changed 4 years ago by jsocol

  • Cc james@… added

comment:10 Changed 4 years ago by stephendonner

  • Cc stephen.donner@… added

comment:11 Changed 4 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(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 4 years ago by russellm

(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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.