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

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -