Vous n’êtes pas connecté.
Bonjour, visiteur, bienvenue sur les forums Aqua Computer Forum. Si c’est votre première visite, nous vous invitons à consulter l’Aide. Elle vous expliquera le fonctionnement de cette page. Pour avoir accès à toutes les fonctionnalités, vous devez vous inscrire. Pour cela, veuillez utiliser le formulaire d’enregistrement, ou bien lisez plus d’informations sur la procédure d’enregistrement. Si vous êtes déjà enregistré, veuillez vous connecter.
Citation de "Shoggy"
Nanu, was ist denn im zweiten Link passiert? :![]()
TrOuble
God
Citation de "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
![]() |
Code source |
1 2 3 4 5 6 7 |
<?php switch($_GET['id']) { case "<blubb>": include "<relativer oder absoluter pfad>"; break; ?> |
Citation de "mousonmars"
Blos wie kann ich es umgehen das jemand eine seite die sich nicht auf dem Server befindet einbindet ???
Citation de "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
}
?>
Citation de "Y0Gi"
ich zitiere mal aus unserem text-modul:
![]()
Code source
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.
-