mirror of
https://github.com/php/doc-es.git
synced 2026-04-23 15:18:07 +02:00
87 lines
2.2 KiB
XML
87 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: cfe2c34143ab17e522b1594ae0902b7245f072d5 Maintainer: PhilDaiguille Status: ready -->
|
|
<!-- Reviewed: yes Maintainer: Marqitos -->
|
|
|
|
<book xml:id="book.taint" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<?phpdoc extension-membership="pecl" ?>
|
|
<title>Taint</title>
|
|
<titleabbrev>Taint</titleabbrev>
|
|
|
|
<preface xml:id="intro.taint">
|
|
&reftitle.intro;
|
|
<para>
|
|
Taint es una extensión que sirve para detectar código XSS (strings
|
|
corrompidos, «tainted»).
|
|
También se puede utilizar para localizar vulnerabilidades a inyecciones SQL, inyecciones
|
|
«shell», etc.
|
|
</para>
|
|
<para>
|
|
Si taint está habilitada, advertirá de si se ha proporcionado una cadena corrompida
|
|
(que venga de <varname>$_GET</varname>, <varname>$_POST</varname>
|
|
o <varname>$_COOKIE</varname>) a alguna función.
|
|
</para>
|
|
<example>
|
|
<title>Ejemplo de <function>taint</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$a = trim($_GET['a']);
|
|
|
|
$nombre_fichero = '/tmp' . $a;
|
|
$salida = "¡¡¡Bienvenido, {$a} !!!";
|
|
$var = "salida";
|
|
$sql = "Select * from " . $a;
|
|
$sql .= "ooxx";
|
|
|
|
echo $salida;
|
|
|
|
print $$var;
|
|
|
|
include $nombre_fichero;
|
|
|
|
mysql_query($sql);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
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
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</preface>
|
|
|
|
&reference.taint.setup;
|
|
&reference.taint.detail;
|
|
&reference.taint.reference;
|
|
|
|
</book>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|