comments (not for humans)
"So now that you've seen how contexts are important when mitigating XSS, I'll give you a new example", David said. "Take a look at the following example from a social networking web site".
[...]
"That does not mean, however, that blocking < and > when ouputting user data in javascript isn't necessary", David said.
[...]
David grabbed the keyboard and jotted down two new examples.
[...]
When I came into the office the next day, I immediately started rewriting the application to use prepared statements. An hour later I was done, and called Mr. X to go through it. By lunch time we had co-written the documentation, and code and documentation was sent over to the customer.
[...]
"As you saw from your implementation, writing your own security routines isn't always a good idea", Mr. X said looking me straight in the eyes.
[...]
I thought about what Mr. X said for a while.
[...]
"So let's go back to the input validation", Mr. X said. "How do you want to do the validation of the names now?"
[...]
"Now remember", Mr. X said, "that we are storing most of our user data in LDAP. But when we are storing orders, we store the name in our SQL database as a part of the shipping address. How do you suggest we handle LDAP injection with your approach?"
[...]
After finishing the call, Mr. X came back into my office.
[...]
The next morning I got my first go at a real system for a real customer. One of the company's clients had recently had a successful hacking attempt on one of their systems, and they wanted us to review and fix it.
[...]