You are not logged in.
Dear visitor, welcome to Aqua Computer Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Quoted from "Shoggy"
Nanu, was ist denn im zweiten Link passiert? :![]()
TrOuble
God
Quoted from "mousonmars"
Moin
@shoggy da hast jetz wohl denn nagel auf denn Kopf getroffen ,
hab das gleiche problem wie bei skill0r's :-[
Blos wie kann ich es umgehen das jemand eine seite die sich nicht auf dem Server befindet einbindet ???
thx mous
![]() |
Source code |
1 2 3 4 5 6 7 |
<?php switch($_GET['id']) { case "<blubb>": include "<relativer oder absoluter pfad>"; break; ?> |
Quoted from "mousonmars"
Blos wie kann ich es umgehen das jemand eine seite die sich nicht auf dem Server befindet einbindet ???
Quoted from "Y0Gi"
es empfiehlt sich weiterhin:
- beim includen von dateien über die url prüfen, ob sie auch lokal vorhanden ist und möglichst auch auf ein festes verzeichnis festlegen, insbesondere relative pfandangaben müssen gefiltert werden.
[/code]
also etwa bei http://www.example.com/?page=hallo (wobei /? die abkürzung für index.php? und andere default-indexfiles ist)
[code]
<?php
$includepath = './includes/' . $_GET['page'] '.php';
if (! file_exists($includepath)) {
// fehlerbehandlung
}
?>
Quoted from "Y0Gi"
ich zitiere mal aus unserem text-modul:
![]()
Source code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 if (empty($_GET['text'])) trigger_error('Kein Text ausgewählt.', E_USER_ERROR); // check for illegal strings if (false !== strpos($_GET['text'], '/etc/passwd')) trigger_error('Wow, you\'re a super l33t h4x0r, eh?', E_USER_ERROR); $illegalParts = array('/', '\\'); foreach ($illegalParts as $illegalPart) { if (false !== strpos($_GET['text'], $illegalPart)) trigger_error('Nicht erlaubte Zeichen gefunden.', E_USER_ERROR); } // check file existence $textfile = realpath($_SERVER['DOCUMENT_ROOT'] . $CFG['path_texts'] . $_GET['text'] . '.inc.php'); if (! file_exists($textfile)) trigger_error('Text nicht gefunden.', E_USER_ERROR); // load file include($textfile);
man sieht auch wieder deutlich: php suxxst zualleroberst.
-