Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to prevent SQL Injection in c language?

Tags:

c

sql

mysql

I currently use c language to process the http event, and I need to do the SQL operation with mysql, then how to prevent the SQL injection, is there any c library for that,thank you?

like image 959
user440446 Avatar asked Nov 16 '25 01:11

user440446


2 Answers

SQL Injection Attacks and Some Tips on How to Prevent Them

like image 109
asling Avatar answered Nov 17 '25 14:11

asling


The way you prevent SQL injection (or shell escape injection, etc.) is not passing unquoted literal strings to an interface that treats some characters as special. You need to transform string data to a safe quoted form before including it as part of a larger "command string" that will be interpreted by an SQL database, shell, external command, API that takes URI strings, etc.

like image 23
R.. GitHub STOP HELPING ICE Avatar answered Nov 17 '25 16:11

R.. GitHub STOP HELPING ICE



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!