[wp-trac] [WordPress Trac] #56133: URL escaping added in 'class-custom-background.php' file

WordPress Trac noreply at wordpress.org
Sun Jul 3 06:27:37 UTC 2022


#56133: URL escaping added in 'class-custom-background.php' file
---------------------------+-----------------------------------------------
 Reporter:                 |       Owner:  SergeyBiryukov
  robinwpdeveloper         |
     Type:  defect (bug)   |      Status:  assigned
 Priority:  normal         |   Milestone:  Awaiting Review
Component:                 |     Version:  trunk
  Administration           |
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  administration, coding-standards
---------------------------+-----------------------------------------------

Comment (by robinwpdeveloper):

 File path: src/wp-admin/includes/class-custom-background.php
 Here home_url( '/' ) is used (Line: 253) without any escaping.

 But in other files (e.x. wp-login.php - Line 289) esc_url is used to
 escape home_url() properly.

 We need to do the same in src/wp-admin/includes/class-custom-
 background.php too.

 Happy Coding :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56133#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list