Ver Mensaje Individual
  #4 (permalink)  
Antiguo 06/09/2009, 21:00
bigwhite
 
Fecha de Ingreso: agosto-2009
Mensajes: 247
Antigüedad: 17 años, 3 meses
Puntos: 10
Respuesta: Problema al mostrar imagen almacenada en DB

Abimael: gracias.......mirando el codigo hace un addslashes() de lo que lee:

Cita:
$binario_contenido = addslashes(fread(fopen($binario_nombre_temporal, "rb"), filesize($binario_nombre_temporal)));
El problema es que a mi no me funciona:

Cita:
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\0JFIF\0\0d\0d\0\0ÿÛ\0C\0    $.\' \",#(7),0' at line 1] in EXECUTE("INSERT IGNORE imagedump (url,imagen) VALUES ('http://img128.imagevenue.com/loc24/th_27437_9.jpg',ÿØÿà\0JFIF\0\0d\0d\0\0ÿÛ\0C\0     $.\' \",#(7),01444\'9=82<.342ÿÛ\0C  2!!222222222222222222222222222222222222222222222 22222ÿÀ\0\0 \0k\0ÿÄ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \0ÿÄ\0;\0\0\0\0\0\0!1 AQq\"2a�¡3B‘±Á#Rá$4brs‚’ÑÿÄ\0\0\0\0\0\0\ 0\0\0\0\0\0\0\0ÿÄ\0/\0\0\0\0\0\0\0!1AQ\"q#2aR¡±Áð �‘ÑÿÚ\0 \0\0?\0Åà×ìrÞ™ñœRxY6ÒÆÅ¹¶Î\0®r‡ŽGVàÄØ ”{¿Ü)c=‡ØëWA®C\"³@Á@�\0ÐP\0 @@�šCà…�oS¢2Óº4zµòZ9*ª¼îG]ü*–®÷\\w\"æ–•d°Ífд�=Yí¢$`s¸æf>²�ÖYäÔUW+š× éú•‰¾Ó’5e}Êî*ƒ¾Õ%Z›+–ÙœY§„ÖQGâ; t»ôYbHûTæŸ in C:\xampp\htdocs\easypost\clases\adodb5\adodb-exceptions.inc.php on line 78
Como ves..... sigue produciendo una INJECTION (!)