php / php/php-src

Add expose_php option with reduced precision

Offen
#12,080 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Category: SAPI Feature
Vorherrschende Sprache
C
Sterne
40.4k
Forks
8.2k
Ø Merge
2 T. 13 Std.
Gemergte PRs (30 T.)
96

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die bestehende expose_php-Konfiguration und den Antwortpfad nachzuverfolgen, der den X-Powered-By-Header erzeugt. Vergleiche das vorgeschlagene Verhalten mit reduzierter Präzision mit den aktuellen Fällen für aktiviert und deaktiviert und ermittle anschließend die relevanten Konfigurations- und Test-Einstiegspunkte. Als erledigt gilt die Aufgabe, wenn eine unterstützte Option den Header beibehalten kann, während ihre Version weggelassen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
php
Bereich
backend
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.