2 ms·
it's a typical programmer mistake. So how do I avoid it ?
by baby 17y ago
it's a typical programmer mistake. So how do I avoid it ?
- nostrademons 17y agoPut some middleware into your web framework that will insert a "secret" into all forms, which contains an unforgeable token generated by the page. Only accept form input when that secret token matches the expected value. Django will do this for you; presumably other frameworks have similar mechanisms. http://docs.djangoproject.com/en/dev/ref/contrib/csrf/ http://docs.djangoproject.com/en/dev/ref/contrib/csrf/