All output should be run through an escaping function

Abierto
#1,540 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
php, wordpress
Área
security

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
PHP
Estrellas
365
Forks
135
Merge medio
1 d 8 h
PR fusionados (30 d)
20

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de WordPress/plugin-check

Todos los issues de WordPress/plugin-check

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.