---
agent:
  instructions: "Search published articles with space-separated keywords. All terms must occur in the article text. Results are Markdown excerpts with canonical links, newest first."
  endpoint: "https://www.zaihua.news/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://www.zaihua.news/docs/api/#agent-search"
---

# PHP 的 https 大写为 httpS 会静默关掉 TLS，20 年无人发现

Source: https://www.zaihua.news/article/45248/

[返回新闻流](https://www.zaihua.news/)
2026年11月20日 · 11:04 · [在花新闻](https://www.zaihua.news/about/)

# PHP 的 https 大写为 httpS 会静默关掉 TLS，20 年无人发现

PHP 的 HTTP/FTP 流包装器在识别 scheme 时不分大小写，但只有在第五个字符是小写 s 时才启用 TLS。于是 HTTPS://、httpS://、FTPS:// 会被当成明文的 HTTP/FTP 发出去，令牌、Basic 认证、Cookie、POST 请求体和 FTP 登录信息全部裸奔；被第三方重定向到这种地址也一样中招。

漏洞编号 CVE-2026-128064（GHSA-f6gg-rchx-xw8j），CVSS 4.0 评分 8.2。已在 PHP 8.2.36、8.3.37、8.4.28、8.5.13 和 8.6.0 修复；8.1 及更早版本已 EOL，不会修复，只能自己把 URL 的 scheme 统一转成小写。

[Lukasz Jachowicz](https://x.com/ljachowicz/status/2123477025268924514)

🌸 [科技圈](http://t.me/zaihuanews)· [茶馆](https://t.me/zaihuachat) · [投稿](http://t.me/ZaiHuabot)

https://cdn.zaihua.news/main/45248/mtproto-0-0c9784ad30c6fd6e.jpg

[上一条 Gemini 在 Mac 上开始代用户操作，后台运行还能随时暂停](https://www.zaihua.news/article/45247/)[下一条🇬🇧 英国法庭裁定苹果胜诉，政府要求后门的案件令须公开审理](https://www.zaihua.news/article/45249/)
