coldfusioncfqueryparam

How I can encode/escape a varchar to be more secure without using cfqueryparam?


How I can encode/escape a varchar to be more secure without using cfqueryparam? I want to implement the same behaviour without using <cfqueryparam> to get around "Too many parameters were provided in this RPC request. The maximum is 2100" problem. See: http://www.bennadel.com/blog/1112-Incoming-Tabular-Data-Stream-Remote-Procedure-Call-Is-Incorrect.htm

Update:


Solution

  • As others have said, that length-related error originates at a deeper level, not within the queryparam tag. And it offers some valuable protection and therefore exists for a reason.

    You could always either insert those values into a temporary table and join against that one or use the list functions to split that huge list into several smaller lists which are then used separately.

    SELECT name , 
           ..... , 
           createDate
    FROM somewhere
    WHERE (someColumn IN (a,b,c,d,e)
           OR someColumn IN (f,g,h,i,j)
           OR someColumn IN (.........));