diff options
author | filip <filip.komar@gmail.com> | 2016-07-07 23:51:39 +0200 |
---|---|---|
committer | filip <filip.komar@gmail.com> | 2016-07-07 23:51:39 +0200 |
commit | fd785f3d32d0b299556890e9fa639d5cc1209019 (patch) | |
tree | 00f2acaeef5e8c7f9e9be8fbbbb3b1acb3c6b16b /langs/diff.php | |
parent | e9b2d6d6c51ac27413f09581b4647fbc782476be (diff) | |
download | www-fd785f3d32d0b299556890e9fa639d5cc1209019.tar www-fd785f3d32d0b299556890e9fa639d5cc1209019.tar.gz www-fd785f3d32d0b299556890e9fa639d5cc1209019.tar.bz2 www-fd785f3d32d0b299556890e9fa639d5cc1209019.tar.xz www-fd785f3d32d0b299556890e9fa639d5cc1209019.zip |
new function 'get sanitized string from $_GET'
Diffstat (limited to 'langs/diff.php')
-rw-r--r-- | langs/diff.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/langs/diff.php b/langs/diff.php index fcc0f93ff..f3c10b895 100644 --- a/langs/diff.php +++ b/langs/diff.php @@ -6,13 +6,14 @@ define('HLANG', true); include 'lib.php'; -$source_file = isset($_GET['s']) ? strip_tags(trim($_GET['s'])) : null; -$target_lang = isset($_GET['l']) ? strip_tags(trim($_GET['l'])) : null; +$source_file = get_sane_string('s'); +$target_lang = get_sane_string('l'); -if (is_null($source_file) || - is_null($target_lang)) { +if (empty($source_file) || + empty($target_lang)) { - die('kthxbai'); + header('Location: /langs/report.php'); + die; } if (!file_exists($source_file)) { |