Remove dead wellformedweb.org wfw namespace from RSS feed#1984
Merged
Conversation
The wfw namespace URL (http://wellformedweb.org/CommentAPI/) declared in the RSS 2.0 feed points to a domain that has long since expired and been re-registered by gambling/ad sites. Security scanners now flag the feed as containing a malicious link because of this URL. Drop the xmlns:wfw declaration and the <wfw:commentRss> element. Comment feeds are still advertised in the Atom output via the standard <link rel="replies" type="application/atom+xml"> element. Fixes #1981
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
电信天翼云等安全扫描把站点 RSS Feed 报为「恶意广告」(#1981)。
根因:RSS 2.0 输出里声明并使用了
wfw命名空间,指向http://wellformedweb.org/CommentAPI/。该域名早已过期并被博彩/广告站抢注,安全扫描器读到 Feed 中的这个 URL 就判定为恶意链接。WordPress 也曾遇到同样的问题。改动
var/Typecho/Feed.php中移除对wellformedweb.org的全部引用:xmlns:wfw="http://wellformedweb.org/CommentAPI/"命名空间声明<wfw:commentRss>元素两者必须一起删除,否则保留
wfw:前缀而无声明会产生无效 XML。影响
评论 Feed 的能力不受影响:Atom 输出仍通过标准的
<link rel="replies" type="application/atom+xml">暴露评论源。Fixes #1981