merge r20712 from branch 2.4 to trunk

bug 2844: increase security on LocalFiles Editor, filter on files to edit.



git-svn-id: http://piwigo.org/svn/trunk@20714 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2013-02-12 10:19:57 +00:00
commit 8a7952a171
5 changed files with 151 additions and 88 deletions

View file

@ -55,7 +55,6 @@ include_once(LOCALEDIT_PATH.'include/'.$page['tab'].'.inc.php');
// +-----------------------------------------------------------------------+
if (isset($_POST['restore']))
{
$edited_file = $_POST['edited_file'];
$content_file = file_get_contents(get_bak_file($edited_file));
array_push($page['infos'],
l10n('locfiledit_bak_loaded1'),
@ -73,7 +72,6 @@ if (isset($_POST['submit']))
}
else
{
$edited_file = $_POST['edited_file'];
$content_file = stripslashes($_POST['text']);
if (get_extension($edited_file) == 'php')
{