From 28a1dd7b5c068360968dfb648fe1b620e8902645 Mon Sep 17 00:00:00 2001 From: nashe Date: Fri, 7 Jul 2017 23:42:27 +0100 Subject: Add spanish choice in install Fixes #90. --- install.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/install.php b/install.php index bdab378..6a206fc 100755 --- a/install.php +++ b/install.php @@ -13,12 +13,19 @@ include __DIR__ . '/admin/inc/pwd.inc.php'; if (file_exists(__DIR__ . '/custom/config.yml') && isset($login) && isset($password)) { $status = 'installed'; } elseif (isset($_REQUEST['url'])) { + + // Do no try to use the file of an invalid locale + if (strstr($_REQUEST['locale'], '..') !== false + || !file_exists(__DIR__ . "/app/l10n/${_REQUEST['locale']}.lang")) { + $_REQUEST['locale'] = 'en'; + } + $save = array(); //Save config file $config = array( 'url' => $_REQUEST['url'], 'name' => filter_var($_REQUEST['title'], FILTER_SANITIZE_SPECIAL_CHARS), - 'locale' => filter_var($_REQUEST['locale'], FILTER_SANITIZE_SPECIAL_CHARS), + 'locale' => $_REQUEST['locale'], 'items' => 10, 'shuffle' => 0, 'refresh' => 240, @@ -164,6 +171,7 @@ if (file_exists(__DIR__ . '/custom/config.yml') && isset($login) && isset($passw

-- cgit v1.2.1