mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-08 20:46:05 +00:00
fix security hole
missing check for passed parameters allows to read files on the server
This commit is contained in:
parent
d317c744bf
commit
31ffad39a8
|
@ -27,7 +27,7 @@ if (!$user->isAdmin()) {
|
|||
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if (isset($_GET["logname"])) $logname=$_GET["logname"];
|
||||
if (isset($_GET["logname"])) $logname=basename($_GET["logname"]);
|
||||
else $logname=NULL;
|
||||
|
||||
if (isset($_GET["mode"])) $mode=$_GET["mode"];
|
||||
|
|
|
@ -137,15 +137,11 @@ class SeedDMS_View_LogManagement extends SeedDMS_Bootstrap_Style {
|
|||
<?php
|
||||
$this->htmlEndPage();
|
||||
} elseif(file_exists($this->contentdir.$logname)){
|
||||
// $this->htmlStartPage(getMLText("backup_tools"));
|
||||
|
||||
// $this->contentSubHeading(sanitizeString($logname));
|
||||
|
||||
echo $logname."<pre>\n";
|
||||
readfile($this->contentdir.$logname);
|
||||
echo "</pre>\n";
|
||||
|
||||
// echo "</body>\n</html>\n";
|
||||
} else {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user