Bug 206683

Summary: Website links in "security" and "errata" RSS feeds are broken
Product: Services Reporter: Nikolai Lifanov <lifanov>
Component: Security TeamAssignee: Sevan Janiyan <sevan>
Status: Closed FIXED    
Severity: Affects Some People CC: doc, gavin, sevan, tobik
Priority: ---    
Version: unspecified   
Hardware: Any   
OS: Any   
URL: https://reviews.freebsd.org/D8715
Bug Depends on:    
Bug Blocks: 253768    
Attachments:
Description Flags
libcommon.diff
none
libcommon.diff tobik: maintainer-approval? (doc)

Description Nikolai Lifanov 2016-01-27 16:38:48 UTC
I'm not sure if this is the right bug category, but "Website" links in RSS feeds for "security" and "errata" have been missing the URI scheme for a few months now.

For example, the link as it comes into my RSS reader is:
//security.FreeBSD.org/advisories/FreeBSD-SA-16:10.linux.asc
//security.FreeBSD.org/advisories/FreeBSD-SA-16:09.ntp.asc
//security.FreeBSD.org/advisories/FreeBSD-EN-16:03.yplib.asc

These should be prefixed with an URI scheme.

As a contrast, "newsflash" RSS feed generates working links, like so:
http://www.freebsd.org/news/newsflash.html#event20160118:01
http://www.freebsd.org/news/newsflash.html#event20160106:01
http://www.freebsd.org/news/newsflash.html#event20160103:01
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2016-01-31 12:44:32 UTC
I'm certainly no expert in this area but the change to the entities definition seems to be doc revision 45654 by gavin.
Comment 2 Nikolai Lifanov 2016-07-25 14:07:21 UTC
Bump! This is still broken. I don't know much about how RSS feeds are generated to attempt to propose a fix.
Comment 3 Tobias Kortkamp freebsd_committer 2016-11-02 12:19:40 UTC
Still broken...
Comment 4 Tobias Kortkamp freebsd_committer 2016-11-02 12:38:39 UTC
Here is an excerpt from https://www.freebsd.org/security/rss.xml

    <item>
      <title>FreeBSD-SA-16:35.openssl</title>
      <link>//security.FreeBSD.org/advisories/FreeBSD-SA-16:35.openssl.asc</link>
      <guid>//security.FreeBSD.org/advisories/FreeBSD-SA-16:35.openssl.asc</guid>
      <pubDate>Wed, 2 Nov 2016 00:00:00 PST</pubDate>
    </item>

I've added an exception to my RSS reader's link opener for FreeBSD feeds to manually prepend https: to the links, which works for me as a work around.

Firefox has a useful live bookmarks feature too, but since the item links are broken it goes to the feed's channel link https://www.freebsd.org/security/ instead when you click on one of them.
Comment 5 Tobias Kortkamp freebsd_committer 2016-11-03 06:27:04 UTC
Created attachment 176579 [details]
libcommon.diff

This patch fixes the RSS feeds by prepending https: to the <link> and <guid> tags for every item.

As was pointed out by Mark share/xml/common.ent was changed to use protocol-relative URLs in doc r45654.  However RSS doesn't support protocol-relative URLs AFAICT, so this seems like the easiest way to fix this.

FYI, here is what Feed Validator has to say about FreeBSD's RSS feeds: http://www.feedvalidator.org/check.cgi?url=https%3A%2F%2Fwww.freebsd.org%2Fsecurity%2Frss.xml
Comment 6 Tobias Kortkamp freebsd_committer 2016-11-03 06:32:04 UTC
Created attachment 176580 [details]
libcommon.diff
Comment 7 commit-hook freebsd_committer 2016-12-06 19:52:00 UTC
A commit references this bug:

Author: sevan
Date: Tue Dec  6 19:50:57 UTC 2016
New revision: 49712
URL: https://svnweb.freebsd.org/changeset/doc/49712

Log:
  Switch from protocol independent URLs to explicitly using HTTPS as they're not
  valid for use in RSS.

  PR:		206683
  Submitted by:	PR by Nikolai Lifanov, Patch by Tobias Kortkamp
  Reviewed by:	bcr (mentor)
  Approved by:	gjb
  Differential Revision:	https://reviews.freebsd.org/D8715

Changes:
  head/share/xml/libcommon.xsl
Comment 8 Sevan Janiyan freebsd_committer 2016-12-06 19:55:02 UTC
Thanks for the heads up & the patch. Now committed.