diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-05-24 13:45:08 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-05-24 13:45:08 +0000 |
commit | 894c718a415839f3683daaf251f15c3793358408 (patch) | |
tree | b90b87efb802a0c9d76e964ba1fe3278a58c33bd /langs/diff.php | |
parent | 095b3d81037f5a3b3de44444845651c9c4f5c411 (diff) | |
download | www-894c718a415839f3683daaf251f15c3793358408.tar www-894c718a415839f3683daaf251f15c3793358408.tar.gz www-894c718a415839f3683daaf251f15c3793358408.tar.bz2 www-894c718a415839f3683daaf251f15c3793358408.tar.xz www-894c718a415839f3683daaf251f15c3793358408.zip |
check path of files to diff
Diffstat (limited to 'langs/diff.php')
-rw-r--r-- | langs/diff.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/langs/diff.php b/langs/diff.php index f0518d5ad..e9a3c44f8 100644 --- a/langs/diff.php +++ b/langs/diff.php @@ -18,7 +18,6 @@ if (!file_exists($source_file)) { } include 'lib.php'; -include '../langs.inc.php'; $target_file = _lang_file_switch($source_file, $target_lang); @@ -26,6 +25,15 @@ if (!file_exists($target_file)) { die('no target'); } +$source_file = realpath($source_file); +$target_file = realpath($target_file); + +if (false === strstr($source_file, '/langs/') || + false == strstr($target_file, '/langs/')) { + die('no sorry'); +} + + $diff = _lang_diff($source_file, $target_file); $s = '<a href="report.php">« back to langs report</a>'; |