All output should be run through an escaping function

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

メンテナーはふだん 1 日以内に返信

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

評価

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

調査の方向性

The payload names no files: start from the check that raises the escaping error (the one wrapping the WordPress.Security.EscapeOutput sniff in the checker's checks directory) and see how it maps sniff messages to PCP errors and severities. Read the linked WordPress escaping doc section on postfixed variable names before deciding what counts as a recognised postfix. Done means such variables are reported as warnings rather than errors, with a test covering both a postfixed and a genuinely unescaped variable.

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

説明

This is listed as an error in PCP output. The link with this error rightly refers to the security/escaping documentation. However, that documentation recognises situations where it is not possible to escape late. The documentation encourages the use of postfixed variable names in such situations. PCP however, takes the simplistic and hard line approach that escaping must be done immediately prior to output, regardless of circumstances, and does not filter on postfixed variable names. See https://developer.wordpress.org/apis/security/escaping/#toc_4. Clearly, the use of postfixed variable names for clean content is in line with the Wordpress documentation and in such situations it would be good if PCP could report these as warnings rather than errors.

主要言語
PHP
スター
365
フォーク
135
平均マージ
1日 8時間
マージ済み PR(30日)
20

環境構築

はじめの一歩

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

WordPress/plugin-check のほかの issue

WordPress/plugin-check の issue をすべて見る

似ている issue

PHP の issue をもっと見る

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

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