Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#61378 closed enhancement (wontfix)

Escape Output in Storage Count List Item Class

Reported by: krunal265 Owned by:
Priority: normal Milestone:
Component: Administration Version: 6.5.3
Severity: normal Keywords: has-patch
Cc: Focuses: coding-standards

Description

In wp-admin/includes/dashboard.php
$used_class should be escaped according to WordPress Coding Standards to ensure proper security and data handling.

Attachments (1)

61378.patch​ (517 bytes ) - added by krunal265 2 years ago.
Patch added

Download all attachments as: .zip

Change History (3)

@krunal265
2 years ago

Patch added

#1 @sabernhardt
2 years ago

  • Keywords close added

The value of the $used_class variable is either ' warning' or an empty string, which would not require escaping.

A similar ticket concluded that a toolbar $class variable was not worth running the esc_attr function without any benefit. See ticket:58251#comment:23.

#2 @desrosj
2 years ago

  • Keywords close removed
  • Milestone Awaiting Review
  • Resolution → wontfix
  • Status new → closed

#58251 and a similar #59626 were closed out. As @sabernhardt stated, the value of $used_class cannot be changed, so there's no need to escape on output.

Note: See TracTickets for help on using tickets.