Moving to smarty - escaping in webftp, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
<input type="hidden" name="currentDir" value="{$currentDir}" />
|
||||
<input type="hidden" name="file" value="{$file}" />
|
||||
<input type="hidden" name="mode" value="{$mode}" />
|
||||
<textarea name="fileContent" cols="80" rows="40" wrap="OFF" id="fileContent">{$myFileContent}</textarea>
|
||||
<textarea name="fileContent" cols="80" rows="40" wrap="OFF" id="fileContent">{$myFileContent|escape:'htmlall'}</textarea>
|
||||
<br>
|
||||
<input type="submit" name="Submit" value="{t}Save file{/t}" />
|
||||
<input type="button" name="Submit2" value="{t}Cancel{/t}" onClick="javascript:document.location.href='webftp.php?action=cd&file={$currentDir}'" />
|
||||
|
||||
@@ -710,7 +710,7 @@ elseif ((!empty($_POST['loginname']) && !empty($_POST['password'])) || (!empty($
|
||||
{
|
||||
fclose($fp);
|
||||
// temporäre Datei lesen und ausgeben
|
||||
$myFileContent = htmlentities(implode("",file($downloadDir . killslashes(html_entity_decode($file))."_".$s)));
|
||||
$myFileContent = implode("",file($downloadDir . killslashes(html_entity_decode($file))."_".$s));
|
||||
}
|
||||
$smarty->assign('myFileContent', $myFileContent);
|
||||
unlink($downloadDir . killslashes(html_entity_decode($file))."_".$s);
|
||||
|
||||
Reference in New Issue
Block a user