A quick note for startups (or anybody) that may be deploying on Google App Engine:
As App Engine does not automatically escape output, you need to do this yourself.
As an example, here’s a very simple snippet:
Welcome, {{ firstname }}!
If “firstname” is not properly sanitized when stored in the database or escaped on output, I could easily make my first name the following:
damon<script>alert('hi!')</script>
And then we would have stored JavaScript code execution, aka Cross-Site Scripting, as the <script> tag would get interpreted by the browser when echoed out.
The solution?
Simple, just |escape your output when coding in Google App Engine:
Welcome, {{ firstname|escape }}!
You can also sanitize data prior to storing it in the database, but as an additional layer it’s good to escape it on output as well.
I’m not sure if this is a derivative of the fact that GAE utilizes Django 0.9.7, but I guess we’ll see when they upgrade to Django 1.0 as it autoescapes all output by default (thank you, Django!).

