Disallow a self-reference on RSS widget save, which would DoS a site. Checking home/siteurl should cover the vast majority of cases. see #8910.

git-svn-id: https://develop.svn.wordpress.org/trunk@17260 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-01-11 21:37:12 +00:00
parent 173b89b166
commit c4e9ac89ba
1 changed files with 4 additions and 0 deletions

View File

@ -712,6 +712,10 @@ class WP_Widget_RSS extends WP_Widget {
if ( empty($url) )
return;
// self-url destruction sequence
if ( $url == site_url() || $url == home_url() )
return;
$rss = fetch_feed($url);
$title = $instance['title'];
$desc = '';