ColdFusion Query - Injection Protection

前端 未结 3 707
长发绾君心
长发绾君心 2020-12-07 04:07

I ask this question with a bit of sheepishness because I should know the answer. Could someone be kind and explain if and how injection could occur in the following code?

3条回答
  •  醉酒成梦
    2020-12-07 04:43

    To answer the first part of your question, setting your #value# variable to the following:

    someValue'; DELETE FROM tableName WHERE '1' = '1
    

    would result in this query being executed:

    
        select * from tableName
        where fieldName = 'someValue'; DELETE FROM tableName WHERE '1' = '1'
    
    

提交回复
热议问题