Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Avoiding SQL injections is quite simple - just use <a href="http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson06.aspx" rel="nofollow noreferrer">parameterized queries</a>, or an ORM such as <a href="http://msdn.microsoft.com/en-us/library/bb425822.aspx" rel="nofollow noreferrer">LINQ to SQL</a> or <a href="https://www.hibernate.org/343.html" rel="nofollow noreferrer">nHibernate</a> (which all use parameters under the hood). The library takes care of everything for you, and has been thoroughly vetted.</p> <p>After that, you're safe until it's time to write the data back out to other users. You always want to store the data as close to the original user input as possible. Another way to say this is - don't store a scrubbed version (unless you also store the original alongside it). Scrubbing is a one-way process - it destroys information. It's always easy to scrub again if you need to, but you can't un-scrub something.</p> <p>However, storing the original format means you do need to make sure you <a href="http://support.microsoft.com/kb/252985" rel="nofollow noreferrer">encode the output</a> before you write it to the browser. This prevents users from putting <a href="http://www.cgisecurity.com/xss-faq.html" rel="nofollow noreferrer">malicious cross-site scripts</a> and other things into your data that might be rendered on other users' pages.</p> <p>At the highest level, just keep in mind that all the work should be done as late as possible. <strong>Be liberal in what you accept</strong> (do only what is necessary to protect yourself) <strong>and strict in what you send</strong> (encode everything, scrub the hell out of it, transform it, etc). You want to have a "pure" copy which is altered to conform to the target output.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload