aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorVjacheslav Trushkin <cyberalien@gmail.com>2013-07-13 23:15:26 -0400
committerVjacheslav Trushkin <cyberalien@gmail.com>2013-07-13 23:15:26 -0400
commit8d303226351f358b24389fb2fd2d9b6bab7aa565 (patch)
treea120dd0c74bebf60580955e89b2f5902d8ecdc5a /phpBB
parent71f6f5ad7e095ded7bcad449e0bcd646ac610117 (diff)
downloadforums-8d303226351f358b24389fb2fd2d9b6bab7aa565.tar
forums-8d303226351f358b24389fb2fd2d9b6bab7aa565.tar.gz
forums-8d303226351f358b24389fb2fd2d9b6bab7aa565.tar.bz2
forums-8d303226351f358b24389fb2fd2d9b6bab7aa565.tar.xz
forums-8d303226351f358b24389fb2fd2d9b6bab7aa565.zip
[ticket/11694] Do not locate assets with root path
Do not locate assets that start with ./ PHPBB3-11694
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/template/twig/node/includeasset.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/template/twig/node/includeasset.php b/phpBB/includes/template/twig/node/includeasset.php
index ae113cadc8..990b1c984f 100644
--- a/phpBB/includes/template/twig/node/includeasset.php
+++ b/phpBB/includes/template/twig/node/includeasset.php
@@ -34,7 +34,7 @@ class phpbb_template_twig_node_includeasset extends Twig_Node
->subcompile($this->getNode('expr'))
->raw(";\n")
->write("\$asset = new phpbb_template_asset(\$asset_file);\n")
- ->write("if (\$asset->is_relative()) {\n")
+ ->write("if (substr(\$asset_file, 0, 2) !== './' && \$asset->is_relative()) {\n")
->indent()
->write("\$asset_path = \$asset->get_path();")
->write("\$local_file = \$this->getEnvironment()->get_phpbb_root_path() . \$asset_path;\n")