archive file access restricted to data directory
This commit is contained in:
parent
5709e182c6
commit
1e575c3a7f
@ -7,11 +7,15 @@
|
||||
<body>
|
||||
<h1>One Word Each Archiv</h1>
|
||||
<p><a href="./">Startseite</a></p>
|
||||
<p class="sentences">
|
||||
<?php
|
||||
$filename = $_REQUEST["file"];
|
||||
|
||||
if (strcmp(pathinfo($filename)["dirname"], ".") != 0) {
|
||||
die("nur das echte Archiv ist hier erreichbar");
|
||||
}
|
||||
$content = file_get_contents("./data/".$filename) or die("ungültiger Dateiname");
|
||||
?>
|
||||
<p class="sentences">
|
||||
<?php
|
||||
print($content);
|
||||
?>
|
||||
</p>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user