Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert DateTime to a string to send to SQL serv
Message
De
05/09/2010 17:24:18
 
 
À
05/09/2010 16:50:20
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01480183
Message ID:
01480218
Vues:
60
Just to add another reference: http://xkcd.com/327/

>The other advantage is that parameters prevent SQL Injection. The concatenated examples in this thread are all wide open to injection if a hacker can sneak a quote character into the parameter followed by their own SQL command that could be a SELECT * to steal your customer list or a DROP if they are malicious. You can write code to watch for quotes and other injection attempts, but using parameters makes it a complete non-event.
>
>FWIW for those who have not encountered SQL Injection, here's a simple example of concatenated SQL:
>
"SELECT * FROM members WHERE username = "'+lcusername+"'"
>If the hacker can enter their username as bob'; DROP table members; -- then the SQL becomes
>
SELECT * FROM members WHERE username='bob'; DROP table members; --'
>and you get the idea. yes you can write code to prevent use of quote characters etc but this cannot occur at all if you use parameters.
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform