mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
#1500 - Infinite loop in Blog's RSS widget
This commit is contained in:
parent
0f1b7abccb
commit
acd6e1a6c5
@ -201,6 +201,15 @@ class BlogHolder_Controller extends Page_Controller {
|
||||
return array();
|
||||
}
|
||||
|
||||
function defaultAction($action) {
|
||||
// Protection against infinite loops when an RSS widget pointing to this page is added to this page
|
||||
if(stristr($_SERVER['HTTP_USER_AGENT'], 'SimplePie')) {
|
||||
return $this->rss();
|
||||
}
|
||||
|
||||
return parent::defaultAction($action);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -228,4 +237,4 @@ class BlogEntry_Form extends Form {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user