diff options
author | Chris Smith <toonarmy@phpbb.com> | 2009-06-02 22:12:37 +0000 |
---|---|---|
committer | Chris Smith <toonarmy@phpbb.com> | 2009-06-02 22:12:37 +0000 |
commit | 62aa26c9a6681956bfb8af61447cd078271cc0a0 (patch) | |
tree | 860f5cbf24fd8af376de69aa309ef620708176b5 /phpBB/install | |
parent | ffbc25e17a64146cb988ba01e536e10a75b8322d (diff) | |
download | forums-62aa26c9a6681956bfb8af61447cd078271cc0a0.tar forums-62aa26c9a6681956bfb8af61447cd078271cc0a0.tar.gz forums-62aa26c9a6681956bfb8af61447cd078271cc0a0.tar.bz2 forums-62aa26c9a6681956bfb8af61447cd078271cc0a0.tar.xz forums-62aa26c9a6681956bfb8af61447cd078271cc0a0.zip |
- Stop people messing around #45935
- Ensure the Accept-Language header actually picks up a directory.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9527 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/index.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php index b1eba60af5..47f1787030 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -175,7 +175,7 @@ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language) // Set correct format ... guess full xx_yy form $accept_lang = substr($accept_lang, 0, 2) . '_' . substr($accept_lang, 3, 2); - if (file_exists($phpbb_root_path . 'language/' . $accept_lang)) + if (file_exists($phpbb_root_path . 'language/' . $accept_lang) && is_dir($phpbb_root_path . 'language/' . $accept_lang)) { $language = $accept_lang; break; @@ -184,7 +184,7 @@ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language) { // No match on xx_yy so try xx $accept_lang = substr($accept_lang, 0, 2); - if (file_exists($phpbb_root_path . 'language/' . $accept_lang)) + if (file_exists($phpbb_root_path . 'language/' . $accept_lang) && is_dir($phpbb_root_path . 'language/' . $accept_lang)) { $language = $accept_lang; break; @@ -218,7 +218,7 @@ if (!$language) closedir($dir); } -if (!file_exists($phpbb_root_path . 'language/' . $language)) +if (!file_exists($phpbb_root_path . 'language/' . $language) || !is_dir($phpbb_root_path . 'language/' . $language)) { die('No language found!'); } |