Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

WordPressVIPMinimum.Security.PHPFilterFunctions.MissingThirdParameter shouldn't report for SCRIPT_FILENAME,...

オープン
#832 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php
領域
security, tooling

調査の方向性

スニペットに示されている WordPressVIPMinimum.Security.PHPFilterFunctions.MissingThirdParameter ルールと filter_input(INPUT_SERVER, ...) エントリーポイントから始めてください。php-src/sapi/cli/php_cli.c の330-347行に列挙されている SAPI 提供の変数を確認し、そのルールがこれらのケースを報告しなくなっている一方で、その他の入力に対する既存の報告は維持していることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Bug Description

Since filter_input always acts on the original data, which can also not be modified in userland, all values that are specified by the SAPI itself are safe and do not need sanitizing.
These are:
https://github.com/php/php-src/blob/master/sapi/cli/php_cli.c#L330-L347
PHP_SELF
SCRIPT_NAME
SCRIPT_FILENAME
PATH_TRANSLATED
DOCUMENT_ROOT

For fpm these are provided by apache/nginx and no further validation is required, since PHP would not even process the request if any of those were invalid

Minimal Code Snippet

echo filter_input( INPUT_SERVER, 'DOCUMENT_ROOT' );

Error Code

WordPressVIPMinimum.Security.PHPFilterFunctions.MissingThirdParameter

Environment

VIPCS version | 3.0.1

Tested Against main branch?

  • I have verified the issue still exists in the main branch of VIPCS.
  • I have verified the issue still exists in the develop branch of VIPCS.
主要言語
PHP
スター
261
フォーク
44
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Automattic/VIP-Coding-Standards のほかの issue

Automattic/VIP-Coding-Standards の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。