Fórum OpenCart Brasil

Por um e-commerce livre, confiável e profissional

Suporte geral sobre problemas técnicos para OpenCart v2.x.
#69798
Percebi que ao pesquisar, tudo ok até então, tudo funciona perfeitamente!

Mas é só eu querer usar esse caráter ( ' ), por exemplo, se eu escrevo LETS, tudo ok, mas se escrevo LET'S, ocorre um erro super besta, que não consigo identificar o que seja. Alguém pode ajudar aí!?
Código: Selecionar todos
Notice: Error: 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 's'' at line 1
Error No: 1064
SELECT * FROM oc_url_alias WHERE `query` = 'http://www.dbeautypoint.com/index.php?route=product/search&search=let's' in /home/dbeautypoint.com/public/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/dbeautypoint.com/public/system/storage/modification/system/library/url.php on line 41Notice: Error: 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 's'' at line 1
Error No: 1064
SELECT * FROM oc_url_alias WHERE `query` = 'http://www.dbeautypoint.com/index.php?route=product/search&search=let's' in /home/dbeautypoint.com/public/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/dbeautypoint.com/public/system/storage/modification/system/library/url.php on line 41
O que podeser?
Muito Obrigado! Abraços!
#69854
Não é um erro super besta, é um erro que pode revelar pontos fracos de sua loja e abrir brechas para alguém invadir seu banco de dados.

Como corrigir
http://php.net/manual/pt_BR/security.da ... ection.php
http://stackoverflow.com/questions/6017 ... ion-in-php
https://www.owasp.org/index.php/SQL_Inj ... heat_Sheet