English subtitles

← Stopping the Spam - Intro to Relational Databases

Get Embed Code
4 Languages

Showing Revision 3 created 05/24/2016 by Udacity Robot.

  1. So before you made that change,
    I asked you to think about whether it
  2. would be better to clean bad stuff out
    of posts as soon as the user sends them,
  3. before we put them in the database or
    whether we should put them
  4. into the database as they are and
    clean them up before we display them.
  5. It turns out that there
    are arguments both ways.
  6. Usually you'll hear programmers talk
    about input sanitization, meaning that
  7. we clean bad stuff out of user input,
    before we do anything at all with it,
  8. that way if someone later displays
    the stored posts using another app.
  9. They don't have to worry about bad
    stuff hiding, in the database.
  10. But on the other hand, if we wanted
    an accurate record of what users have
  11. sent to us, maybe we want to preserve
    bad input in the database, and
  12. do output sanitization instead.
  13. People have different opinions,
    about which of these is best.
  14. Right now, since we already have
    live bad stuff in the database,
  15. we definitely need to sanitize output.
  16. But we could sanitize input as well.