Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#43717 closed enhancement (fixed)

Ping back URL display with out escaping.

Reported by: sharaz Owned by: pento
Priority: normal Milestone: 5.1
Component: Bundled Theme Version: 4.9.5
Severity: normal Keywords: has-patch
Cc: Focuses: template

Description

functions.php
Line no 401 : printf( '<link rel="pingback" href="%s">' . "\n", get_bloginfo( 'pingback_url' ) );
According to theme review hand book ​Ref data should be escaped before output.
So the right way.
printf( '<link rel="pingback" href="%s">' . "\n", esc_url( get_bloginfo( 'pingback_url' ) ) );

Attachments (1)

43717.diff​ (5.6 KB ) - added by soulseekah 9 years ago.
esc_url on bloginfo pingback URL

Download all attachments as: .zip

Change History (10)

#1 @sharaz
9 years ago

I found this issue in twenty seventeen functions.php

@soulseekah
9 years ago

esc_url on bloginfo pingback URL

#2 @soulseekah
9 years ago

  • Keywords has-patch added

Welcome to Trac! Thanks for your report. While not a security issue (well, not less secure than the_title()), using esc_url should be done, of course.

43717.diff fixes all 7 themes in this regard.

#3 @sharaz
9 years ago

  • Component Security → Themes
  • Type defect (bug) → enhancement

This ticket was mentioned in ​Slack in #core by sharaz. ​View the logs.


9 years ago

#5 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review → 5.0

#6 @pento
8 years ago

  • Milestone 5.0 → 5.1

#7 @pento
8 years ago

  • Owner set to pento
  • Status new → assigned

#8 @pento
8 years ago

  • Component Themes → Bundled Theme

#9 @pento
8 years ago

  • Resolution → fixed
  • Status assigned → closed

In 44500:

Bundled Themes: Run the pingback_url through esc_url().

Twenties Ten through Seventeen have been updated to properly escape the pingback URL. Twenty Nineteen is already escaping the URL.

Props soulseekah, sharaz.
Fixes #43717.

Note: See TracTickets for help on using tickets.