Author: acydburn
Date: Thu Aug 20 15:53:25 2009
New Revision: 10036
Log:
Check for valid $template_path in includes/template.php - Bug #50055
Modified:
branches/phpBB-3_0_0/phpBB/includes/template.php
Modified: branches/phpBB-3_0_0/phpBB/includes/template.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/template.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/template.php Thu Aug 20 15:53:25 2009
***************
*** 94,99 ****
--- 94,105 ----
{
global $phpbb_root_path, $user;
+ // Make sure $template_path has no ending slash
+ if (substr($template_path, -1) == '/')
+ {
+ $template_path = substr($template_path, 0, -1);
+ }
+
$this->root = $template_path;
$this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
$user->theme['template_storedb'] = false;
|