downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Installation/Configuration> <Taint
[edit] Last updated: Fri, 24 May 2013

view this page in

Introduction

Taint est une extension dont le but est de détecter les codes XSS. Cette extension peut être utilisée pour mettre en lumière certaines vulnérabilités concernant des injections sql, des injections shell, etc.

Lorsque taint est actif, si vous passez une chaîne non propre (provenant de $_GET, $_POST ou $_COOKIE) à des fonctions, taint vous en alertera.

Exemple #1 Exemple avec Taint()

<?php
$a 
trim($_GET['a']);

$file_name '/tmp' .  $a;
$output    "Welcome, {$a} !!!";
$var       "output";
$sql       "Select *  from " $a;
$sql      .= "ooxx";

echo 
$output;

print $
$var;

include(
$file_name);

mysql_query($sql);
?>

L'exemple ci-dessus va afficher quelque chose de similaire à :

Warning: main() [function.echo]: Attempt to echo a string that might be tainted

Warning: main() [function.echo]: Attempt to print a string that might be tainted

Warning: include() [function.include]: File path contains data that might be tainted

Warning: mysql_query() [function.mysql-query]: SQL statement contains data that might be tainted


add a note add a note User Contributed Notes Introduction - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites