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

git-svn-id: http://piwigo.org/svn/branches/2.4@20712 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2013-02-12 10:01:46 +00:00
parent ca9158ee81
commit ff5b60a215
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')
{