Skip navigation
Currently Being Moderated

cfqueryparam question

Aug 3, 2012 5:00 AM

Is it necessary to keep keywords and certain symbols out of data if cfqueryparam and htmleditformat() are used ?

 
Replies
  • Currently Being Moderated
    Aug 3, 2012 6:05 AM   in reply to lwfg

    Cfqueryparam will escape certain symbols such as apostrophes so you don't have to worry about it.

     

    If you are sending htmlformtatted strings as part of your query string, with or without cfqueryparam, the database will process the string that was sent.  That means spaces will be converted to %20, and so on.

     

    I don't understand your question about keywords.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 7:04 AM   in reply to lwfg

    No you do not need to worry about that.  However, you do have to worry about script injection. 

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 8:27 AM   in reply to lwfg

    If you store what you collected, and use htmleditformat for displaying the data, the js will not execute.  However, if you are using a rich textarea to collect the data, you might have a problem because that data will include html tags.

     

    If you go to cfilb.org you will find a useful function called safetext.  It strips the nefarious tags and preserves the benign ones.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points