diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-07-06 16:46:53 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-07-06 16:46:53 +0000 |
commit | 462dc69b8e8568f4656675b31b99a31ad98e1331 (patch) | |
tree | 80887b741981fbb7ae508039ae8da66e5e918310 /phpBB/includes/message_parser.php | |
parent | 2b531a279f267642582b275dc3f215367e6a5396 (diff) | |
download | forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar.gz forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar.bz2 forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar.xz forums-462dc69b8e8568f4656675b31b99a31ad98e1331.zip |
some bugfixes
git-svn-id: file:///svn/phpbb/trunk@6149 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r-- | phpBB/includes/message_parser.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 85f99d349b..26e754033a 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -803,8 +803,10 @@ class bbcode_firstpass extends bbcode { global $config, $phpEx, $user; + $check_path = ($user->page['root_script_path'] != '/') ? substr($user->page['root_script_path'], 0, -1) : '/'; + // Is the user trying to link to a php file in this domain and script path? - if (strpos($url, ".{$phpEx}") !== false && strpos($url, substr($user->page['root_script_path'], 0, -1)) !== false) + if (strpos($url, ".{$phpEx}") !== false && strpos($url, $check_path) !== false) { $server_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'); @@ -816,7 +818,7 @@ class bbcode_firstpass extends bbcode // Check again in correct order... $pos_ext = strpos($url, ".{$phpEx}"); - $pos_path = strpos($url, substr($user->page['root_script_path'], 0, -1)); + $pos_path = strpos($url, $check_path); $pos_domain = strpos($url, $server_name); if ($pos_domain !== false && $pos_path >= $pos_domain && $pos_ext >= $pos_path) |