vb.net - Is this code is prone to sql injection attacks? -
sql= "select * book pubname = '" & mypubname & "'"
mypubname encapsulated.
yes. if taking "mypubname" variable user input , not checking properly.
to inject sql needs write value of "mypubname" variable "'sometext' or 1=1"
then query
select * book pubname = 'sometext' or 1=1
which return rows book table.
Comments
Post a Comment