惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 热门话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Project Zero
Project Zero
V
Vulnerabilities – Threatpost
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
C
Cisco Blogs
A
Arctic Wolf
月光博客
月光博客
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
量子位
小众软件
小众软件
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
N
Netflix TechBlog - Medium
K
Kaspersky official blog
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
Y
Y Combinator Blog
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
S
Schneier on Security
D
Docker
Scott Helme
Scott Helme
MyScale Blog
MyScale Blog
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
GbyAI
GbyAI
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
H
Help Net Security
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tenable Blog
B
Blog
Know Your Adversary
Know Your Adversary
IT之家
IT之家

WordPress大学

修复 Yoast SEO 在多语言网站输出Schema首页为其他语言网址的问题 – WordPress大学 使用 Resend 服务为 WordPress 网站配置SMTP发送邮件 – WordPress大学 Cimo:一款在浏览器端压缩和转换为 WebP 图片的WordPress插件 – WordPress大学 All In One SEO 插件低于4.9.3版本存在 REST API 端点漏洞 – WordPress大学 FluentCart 微信支付网关插件:WPKJ Payment Gateway for FluentCart with WeChat – WordPress大学 FluentCart 支付宝付款网关插件:WPKJ Payment Gateway for FluentCart with Alipay – WordPress大学 FluentCart:优秀的WordPress商城插件,最有希望替代WooCommerce和EDD – WordPress大学 使用 Captcha for WordPress 拦截垃圾邮件/评论/表单提交 – WordPress大学 3 个 WordPress 文件管理插件存在安全漏洞,请尽快更新 – WordPress大学 正确禁止 WordPress 转义 title 标题中的分隔符破折号 – 和 & 符号 – WordPress大学 如何修复 WordPress 错误:Non-existent changeset UUID – WordPress大学 什么是 LLMs.txt?它对SEO有用吗?WordPress 网站如何生成 LLMs.txt? – WordPress大学
WordPress 正确移除 Feed 输出的 wellformedweb.org/CommentAPI 恶意网址 – WordPress大学
https://www.wpdaxue.com/user/auuAwtzuk · 2026-06-08 · via WordPress大学

当前位置:首页>WordPress建站>网站安全>WordPress 正确移除 Feed 输出的 wellformedweb.org/CommentAPI 恶意网址

今天看到 im2828 反馈说,WordPress 源码引入的一个网址 http://wellformedweb.org/CommentAPI 的域名 wellformedweb.org 过期后被恶意抢注了,该网址会跳转到BC类网站(虽然我直接访问没有看到),有些服务器商已经通知用户进行处理。感谢 im2828 朋友!

WordPress 正确移除 Feed 输出的 wellformedweb.org/CommentAPI 恶意网址 - Remove Wfw Commentapi Link 1
问题反馈

wellformedweb.org/CommentAPI 最早用于 CommentAPI 规范,用来标准化 WordPress 等博客系统的评论接口。WordPress 很早就在 Feed 中硬编码了这个链接,并一直保留至今。

随着时间推移,wellformedweb.org 域名的原持有者不再续费。该域名已被从事非法业务的公司购买,现在的 wellformedweb.org 可能会跳转到赌博、色情等非法内容页面。

如何检查你的网站是否有这个问题?

最直接的检测方法就是在网站域名后面添加/feed 来访问,比如访问 https://www.wpdaxue.com/feed,如果你看到下面加框的这行,说明你的网站存在遗留问题:

WordPress 正确移除 Feed 输出的 wellformedweb.org/CommentAPI 恶意网址 - Remove Wfw Commentapi Link
通过访问 Feed 网址查看是否有问题

其实,由于 wellformedweb.org/CommentAPI 并非显性输出到页面中,也无法直接点击访问,普通用户一般不可能访问到这个网址,在前端页面中,唯一可以通过网址访问和查看到 wellformedweb.org/CommentAPI 网址的也就是上面说的 Feed 网址的代码中。

这个 feed 网址可能会被一些蜘蛛爬行,至于到底 wellformedweb.org/CommentAPI 会不会被蜘蛛识别为恶意网址,甚至蜘蛛是否会爬行 wellformedweb.org/CommentAPI 都无法确认,但是出于安全合规考虑,我们还是移除它会好一些。

方法1:安装下面的插件或添加对应代码去移除【最佳方案】

最便捷方式: 点击下载插件 Remove WFW CommentAPI Link ,然后在后台 插件 – 安装插件 界面上传安装启用。

如果你不想安装插件,可以将下面的代码添加到你当前启用的主题的 functions.php 文件:

/**
 * Plugin Name: Remove WFW CommentAPI Link
 * Plugin URI: https://www.wpdaxue.com/remove-wfw-commentapi-link.html
 * Start output buffering on feed requests.
 */
function rwcl_feed_ob_start() {
	if ( ! is_feed() ) {
		return;
	}
	ob_start( 'rwcl_feed_ob_callback' );
}
add_action( 'template_redirect', 'rwcl_feed_ob_start', 0 );

/**
 * Output buffer callback: strip wfw-related content from the feed.
 *
 * @param string $output The buffered feed output.
 * @return string Modified feed output.
 */
function rwcl_feed_ob_callback( $output ) {
	// Remove the entire line containing xmlns:wfw (including leading newline and tab indentation) to keep XML formatting intact.
	$output = preg_replace( '/\n\t*xmlns:wfw="http:\/\/wellformedweb\.org\/CommentAPI\/"/', '', $output );

	// Remove <wfw:commentRss>...</wfw:commentRss> tags and any trailing whitespace.
	$output = preg_replace( '/<wfw:commentRss>.*?<\/wfw:commentRss>\s*/s', '', $output );

	return $output;
}

不推荐此方法,因为你一更新WordPress就得重新修改

WordPress 正确移除 Feed 输出的 wellformedweb.org/CommentAPI 恶意网址 - 企业微信截图 17809126599053

无效的方法:有些教程说使用下面的代码,实际是无效的!

此方法毫无根据,根本就没有对应的filter钩子可以过滤,实测无效!!

WordPress 正确移除 Feed 输出的 wellformedweb.org/CommentAPI 恶意网址 - Image

好了,以上就是从Feed输出中移除 wellformedweb.org/CommentAPI 的解决方案。

关于这个过时网址何时会从 WordPress 源码中移除,我们不得而知。如果你的主机商还要求你直接删除源码文件中的相关代码,你可以查看以下两个文件:

  • wp-includes/feed-rss2.php 22行左右
  • wp-admin/includes/export.php 524 行左右

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

欢迎关注WordPress大学公众号 WPDAXUE

个人中心

购物车

优惠劵

今日签到

有新私信 私信列表

搜索

幸运之星正在降临...

点击领取今天的签到奖励!

恭喜!您今天获得了{{mission.data.mission.credit}}积分

  • 限制以下商品使用: 限制以下商品分类使用: 不限制使用:

    所有商品和商品类型均可使用