summaryrefslogtreecommitdiff
path: root/program/include/rcube_template.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-07-13 18:52:15 +0000
committerthomascube <thomas@roundcube.net>2009-07-13 18:52:15 +0000
commita366a323b5d78f453b4988be576e6520957c9488 (patch)
treef58df0cf224a88678eb1d27f6b7990558f311d6f /program/include/rcube_template.php
parentc6514e01f9486b871ee07928497bafdab3b438e8 (diff)
Prevent from endless loops in render_page hook
Diffstat (limited to 'program/include/rcube_template.php')
-rwxr-xr-xprogram/include/rcube_template.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index c4db040d8..382508099 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -287,6 +287,11 @@ class rcube_template extends rcube_html_page
public function send($templ = null, $exit = true)
{
if ($templ != 'iframe') {
+ // prevent from endless loops
+ if ($this->app->plugins->is_processing('render_page')) {
+ raise_error(array('code' => 505, 'type' => 'php', 'message' => 'Recursion alert: ignoring output->send()'), true, false);
+ return;
+ }
$this->parse($templ, false);
}
else {