WordPress / WordPress/WordPress-Coding-Standards

XSS: Functions that already are escaped

Open
#747 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Focus: Security Status: Help wanted
Dominant language
PHP
Stars
2.8k
Forks
521
Avg merge
5d 20h
Merged PRs (30d)
1

Description

Split off from #744

Expected next thing to be an escaping function (see Codex for 'Data Validation'), not 'get_bloginfo' Escaping of bloginfo via a filter.

get_bloginfo( 'name' ) should give an error but get_bloginfo( 'name', 'display' ) should not.

Related: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/147#issuecomment-31956920 https://github.com/Automattic/_s/pull/555

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the WordPress Coding Standards handling of get_bloginfo() and the related discussion in issue #147 and pull request #555. Confirm the expected distinction between get_bloginfo('name') and get_bloginfo('name', 'display'), then identify the existing tests for escaped functions and update them so the first case reports an error while the second does not.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
security, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.