Fix a security vulnerability in views.py.