From 6395af6ccb16017dc580ce3321633ea2c79603bf Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sun, 16 Aug 2015 11:07:39 +0200 Subject: filemgr - fixes round two - Get rid of escaping in heredocs plus related fixes --- config/filemgr/file_manager.php | 91 ++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 43 deletions(-) (limited to 'config/filemgr/file_manager.php') diff --git a/config/filemgr/file_manager.php b/config/filemgr/file_manager.php index 5e858591..afa9bdfa 100644 --- a/config/filemgr/file_manager.php +++ b/config/filemgr/file_manager.php @@ -193,19 +193,19 @@ if ('ok' == 'ok') { } $container .= << + - + - + - - + + EOF; @@ -231,39 +231,40 @@ EOF; $use_url = "\"U\""; } - + $cfe = urlencode($current_folder); + $vfe = urlencode($v); $container .= << - - + - - + + EOF; @@ -315,40 +316,42 @@ EOF; $use_url = "\"U\""; } + $cfe = urlencode($current_folder); + $vfe = urlencode($v); $container .= << - - + - - + + EOF; @@ -404,14 +407,16 @@ EOF; if ($_GET['do'] == 'edit') { $file_content = file_get_contents($current_folder.$_GET['f']); + $cfe = urlencode($current_folder); + $fce = htmlentities($file_content); echo << - +
+ File: {$current_folder}{$_GET['f']}
-
- - - +
+ + + EOD; @@ -424,7 +429,7 @@ EOD; +
   Name   Ext. Size Date Attributes
\"F\"[..]F[..]
- \"Folder\" + + Folder -
+
{$v}
-
- - - - - + + + + + +
{$browser}   - \"Rename\" + Rename   - \"D\" + D    <DIR>{$last_updated_time}{$fileperms}{$last_updated_time}{$fileperms}
- \"File\" + + File -
+
{$v}
-
- - - - - + + + + + +
{$browser} - \"Download\" + Download - \"Rename\" + Rename {$edit_file_content} - \"D\" + D {$extension}{$extension} {$file_size}{$last_updated_time}{$fileperms}{$last_updated_time}{$fileperms}