php / php/php-src

Add expose_php option with reduced precision

未关闭
#12,080 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Category: SAPI Feature
主要语言
C
星标
40.4k
派生
8.1k
平均合并
2 天 13 小时
30 天内合并 PR
96

描述

Description

As @krakjoe pointed out at https://github.com/php/php-src/pull/3335, the popular default configurations are decided by package managers and hosting providers, and the default already has expose_php enabled.

But, we also know that those same package managers and hosting providers feel their only option is to turn this off as a sort of security through obscurity. This in turn can deminish global statistics (e.g. W3 Techs).

Perhaps we could offer a middleground that would appeal to some of the package managers (e.g. Debian, Fedora), and major hosting providers to no longer turn it off completely. For example:

X-Powered-By: PHP/8.2.9

… could be reduced to:

X-Powered-By: PHP

One could instead consider preserving major or major+minor version. But, I think an option that controls simply whether the version is obscured is more likely to receive broad adoption, and keeps the API simpler to maintain and to consume (also crawlers interpreting and aggregating this information).

/cc @Slamdunk @petk

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先跟踪现有的 expose_php 配置以及生成 X-Powered-By 标头的响应路径。将提议的降低精度行为与当前启用和禁用的情况进行比较,然后确定相关的配置和测试入口点。当某个受支持的选项可以保留标头但省略其版本时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
php
领域
backend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。