Página 1 de 1

Possible SQL Injection [phpBB 2.0.7a]

Publicado: 20 Mar 2004, 00:11
por ThE KuKa
[Security Fix] Possible SQL Injection [phpBB 2.0.7a]

Noticia por Acyd Burn en phpbb.com

Se a notificado a phpbb.com de un defecto en search.html. Se recomienda que todos los usuarios de phpBB 2.0.x deben realizar los cambios especificados abajo.

Los archivos de descarga de phpbb.com estan puestos al dia, por lo tanto, las nuevas instalaciones y actualizaciones estan inmunes.

Para fijar este defecto, por favor abrir search.html en cualquier editor de texto y seguir las instrucciones:

ENCONTRAR:

Código: Seleccionar todo

$show_results = ( isset($HTTP_POST_VARS['show_results']) ) ? $HTTP_POST_VARS['show_results'] : 'posts';
DESPUES Aí?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?ADIR:

Código: Seleccionar todo

$show_results = ($show_results == 'topics') ? 'topics' : 'posts';
ENCONTRAR:

Código: Seleccionar todo

   $store_vars = array('search_results', 'total_match_count', 'split_search', 'sort_by', 'sort_dir', 'show_results', 'return_chars');
DESPUES Aí?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?ADIR:

Código: Seleccionar todo

   $search_results = '';
Para fijar los problemas de redireccion:

Abrir login.php:

ENCONTRAR:

Código: Seleccionar todo

                  $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "index.$phpEx";
REEMPLAZAR POR:

Código: Seleccionar todo

   $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('& a m p;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";
ENCONTRAR:

Código: Seleccionar todo

               $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : '';
REEMPLAZAR POR:

Código: Seleccionar todo

               $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('& a m p;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : '';
ENCONTRAR:

Código: Seleccionar todo

         $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "";
REEMPLAZAR POR:

Código: Seleccionar todo

         $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('& a m p;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "";
ENCONTRAR:

Código: Seleccionar todo

         $url = (!empty($HTTP_POST_VARS['redirect'])) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : htmlspecialchars($HTTP_GET_VARS['redirect']);
DESPUES Aí?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?ADIR:

Código: Seleccionar todo

         $url = str_replace('& a m p;', '&', $url);
ENCONTRAR:

Código: Seleccionar todo

      $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "index.$phpEx";
REEMPLAZAR POR:

Código: Seleccionar todo

      $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('& a m p;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";
Para fijar el pequeí?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?±o error del color de la fila mostrada en mensajes privados, estas instrucciones:

Abrir privmsg.php:

ENCONTRAR:

Código: Seleccionar todo

   message_die(GENERAL_ERROR, 'Could not query private messages', '', __LINE__, __FILE__, $sql);
}

if ( $row = $db->sql_fetchrow($result) )
{
DESPUES Aí?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?ADIR:

Código: Seleccionar todo

   $i = 0;
ENCONTRAR:

Código: Seleccionar todo

      $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
      $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
DESPUES Aí?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?ADIR:

Código: Seleccionar todo

      $i++;
* El codigo & a m p; hay que ponerlo SIN ESPACIOS, TODO JUNTO esta escrito de ese modo para poder ser mostrado.

Sobre lanzamiento de 2.0.7, ver este Tema