<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/taint.detail.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'taint.detail.sinks.php',
    1 => 'D&oacute;nde emite advertencias taint',
    2 => 'D&oacute;nde emite advertencias taint',
  ),
  'up' => 
  array (
    0 => 'taint.detail.php',
    1 => 'Propagaci&oacute;n y puntos comprobados',
  ),
  'prev' => 
  array (
    0 => 'taint.detail.basic.php',
    1 => 'C&oacute;mo se propaga la marca de corrupci&oacute;n',
  ),
  'next' => 
  array (
    0 => 'ref.taint.php',
    1 => 'Funciones de taint',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/taint/detail.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="taint.detail.sinks" class="section">
  <h2 class="title">Dónde emite advertencias taint</h2>
  <p class="simpara">
   Cuando un string corrompido alcanza uno de los puntos indicados a
   continuación, taint emite una advertencia (por defecto un
   <strong><code><a href="errorfunc.constants.php#constant.e-user-warning">E_USER_WARNING</a></code></strong>; el nivel es configurable mediante
   <a href="taint.configuration.php#ini.taint.error-level" class="link">taint.error_level</a>).
   Solo se inspeccionan los argumentos de tipo string de primer nivel;
   volcar un array que simplemente contiene valores corrompidos no genera
   ninguna advertencia.
  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Puntos de salida</strong></caption>
    
     <thead>
      <tr><th>Punto</th><th>Comprobado</th></tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><code class="literal">echo</code>, <code class="literal">print</code></td>
       <td>la expresión mostrada o impresa</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.printf.php" class="function">printf()</a></span>, <span class="function"><a href="function.vprintf.php" class="function">vprintf()</a></span></td>
       <td>el string de formato y los valores sustituidos</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.print-r.php" class="function">print_r()</a></span>, <span class="function"><a href="function.var-dump.php" class="function">var_dump()</a></span>, <span class="function"><a href="function.var-export.php" class="function">var_export()</a></span></td>
       <td>el valor volcado, cuando es un string</td>
      </tr>

      <tr>
       <td><code class="literal">exit</code>/<code class="literal">die</code> con un mensaje</td>
       <td>el mensaje</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.file-put-contents.php" class="function">file_put_contents()</a></span>, <span class="function"><a href="function.fwrite.php" class="function">fwrite()</a></span>, <span class="function"><a href="function.fputs.php" class="function">fputs()</a></span> hacia <code class="literal">php://output</code></td>
       <td>los datos escritos</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Puntos del sistema de ficheros</strong></caption>
    
     <thead>
      <tr><th>Punto</th><th>Comprobado</th></tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><span class="function"><a href="function.fopen.php" class="function">fopen()</a></span>, <span class="function"><a href="function.opendir.php" class="function">opendir()</a></span>, <span class="function"><a href="function.unlink.php" class="function">unlink()</a></span></td>
       <td>la ruta</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.file.php" class="function">file()</a></span>, <span class="function"><a href="function.readfile.php" class="function">readfile()</a></span>, <span class="function"><a href="function.file-get-contents.php" class="function">file_get_contents()</a></span>, <span class="function"><a href="function.highlight-file.php" class="function">highlight_file()</a></span>/<span class="function"><a href="function.show-source.php" class="function">show_source()</a></span></td>
       <td>la ruta</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.copy.php" class="function">copy()</a></span>, <span class="function"><a href="function.rename.php" class="function">rename()</a></span>, <span class="function"><a href="function.move-uploaded-file.php" class="function">move_uploaded_file()</a></span></td>
       <td>tanto la ruta de origen como la de destino</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.mkdir.php" class="function">mkdir()</a></span>, <span class="function"><a href="function.rmdir.php" class="function">rmdir()</a></span>, <span class="function"><a href="function.touch.php" class="function">touch()</a></span></td>
       <td>la ruta</td>
      </tr>

      <tr>
       <td><code class="literal">include</code>, <code class="literal">include_once</code>, <code class="literal">require</code>, <code class="literal">require_once</code></td>
       <td>la ruta del fichero</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Puntos SQL</strong></caption>
    
     <thead>
      <tr><th>Punto</th><th>Comprobado</th></tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><span class="function"><a href="mysqli.query.php" class="function">mysqli_query()</a></span>, <span class="function"><a href="mysqli.prepare.php" class="function">mysqli_prepare()</a></span>, <span class="function"><a href="mysqli.real-query.php" class="function">mysqli_real_query()</a></span>, <span class="function"><a href="mysqli.multi-query.php" class="function">mysqli_multi_query()</a></span></td>
       <td>el string de la consulta</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.mysql-query.php" class="function">mysql_query()</a></span>, <span class="function"><strong>sqlite_query()</strong></span>, <span class="function"><strong>sqlite_single_query()</strong></span>, <span class="function"><a href="function.oci-parse.php" class="function">oci_parse()</a></span>, <span class="function"><a href="function.pg-query.php" class="function">pg_query()</a></span>, <span class="function"><a href="function.pg-send-query.php" class="function">pg_send_query()</a></span></td>
       <td>el string de la consulta</td>
      </tr>

      <tr>
       <td><span class="methodname"><a href="mysqli.query.php" class="methodname">mysqli::query()</a></span>, <span class="methodname"><a href="mysqli.prepare.php" class="methodname">mysqli::prepare()</a></span>, <span class="methodname"><a href="mysqli.real-query.php" class="methodname">mysqli::real_query()</a></span>, <span class="methodname"><a href="mysqli.multi-query.php" class="methodname">mysqli::multi_query()</a></span></td>
       <td>el string de la consulta</td>
      </tr>

      <tr>
       <td><span class="methodname"><a href="pdo.query.php" class="methodname">PDO::query()</a></span>, <span class="methodname"><a href="pdo.prepare.php" class="methodname">PDO::prepare()</a></span>, <span class="methodname"><a href="pdo.exec.php" class="methodname">PDO::exec()</a></span></td>
       <td>el string de la consulta</td>
      </tr>

      <tr>
       <td><span class="methodname"><a href="sqlite3.query.php" class="methodname">SQLite3::query()</a></span>, <span class="methodname"><a href="sqlite3.prepare.php" class="methodname">SQLite3::prepare()</a></span>, <span class="methodname"><a href="sqlite3.exec.php" class="methodname">SQLite3::exec()</a></span>, <span class="methodname"><strong>SQLiteDatabase::query()</strong></span>, <span class="methodname"><strong>SQLiteDatabase::singleQuery()</strong></span></td>
       <td>el string de la consulta</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Puntos de ejecución de comandos</strong></caption>
    
     <thead>
      <tr><th>Punto</th><th>Comprobado</th></tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><span class="function"><a href="function.exec.php" class="function">exec()</a></span>, <span class="function"><a href="function.system.php" class="function">system()</a></span>, <span class="function"><a href="function.passthru.php" class="function">passthru()</a></span>, <span class="function"><a href="function.shell-exec.php" class="function">shell_exec()</a></span> (incluyendo el operador de comillas invertidas)</td>
       <td>el string del comando</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.proc-open.php" class="function">proc_open()</a></span>, <span class="function"><a href="function.popen.php" class="function">popen()</a></span></td>
       <td>el string del comando</td>
      </tr>

      <tr>
       <td><code class="literal">eval</code></td>
       <td>el código evaluado</td>
      </tr>

      <tr>
       <td>las llamadas dinámicas como <code class="literal">$func()</code>, <code class="literal">$obj-&gt;$method()</code>, <span class="function"><a href="function.call-user-func.php" class="function">call_user_func()</a></span> o los callables en forma de array</td>
       <td>el nombre de la función, del método o de la clase que se resuelve</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.preg-match.php" class="function">preg_match()</a></span>, <span class="function"><a href="function.preg-match-all.php" class="function">preg_match_all()</a></span>, <span class="function"><a href="function.preg-replace.php" class="function">preg_replace()</a></span>, <span class="function"><a href="function.preg-split.php" class="function">preg_split()</a></span>, <span class="function"><a href="function.preg-grep.php" class="function">preg_grep()</a></span>, <span class="function"><a href="function.preg-replace-callback.php" class="function">preg_replace_callback()</a></span></td>
       <td>el patrón (y el nombre de la retrollamada en el caso de <span class="function"><a href="function.preg-replace-callback.php" class="function">preg_replace_callback()</a></span>)</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Puntos de cabeceras y cookies</strong></caption>
    
     <thead>
      <tr><th>Punto</th><th>Comprobado</th></tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><span class="function"><a href="function.header.php" class="function">header()</a></span></td>
       <td>el string de la cabecera</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.setcookie.php" class="function">setcookie()</a></span>, <span class="function"><a href="function.setrawcookie.php" class="function">setrawcookie()</a></span></td>
       <td>el nombre y el valor de la cookie</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Otros puntos</strong></caption>
    
     <thead>
      <tr><th>Punto</th><th>Comprobado</th></tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><span class="function"><a href="function.unserialize.php" class="function">unserialize()</a></span></td>
       <td>el string serializado</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.mail.php" class="function">mail()</a></span></td>
       <td>el destinatario, el asunto, los parámetros adicionales y las cabeceras adicionales (el cuerpo del mensaje es contenido y no se comprueba)</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="simpara">
   Las advertencias siguen el formato
   <code class="literal">nombre_de_funcion() [punto]: mensaje</code>, donde
   <code class="literal">punto</code> identifica la operación comprobada (por ejemplo
   <code class="literal">echo</code>, <code class="literal">include</code> o el nombre de la
   función) y el mensaje describe lo que se ha encontrado como posiblemente
   corrompido.
  </p>
 </div><?php manual_footer($setup); ?>