albrechtjan / workload

Survey web application for TU Dresden
survey.zqa.tu-dresden.de
GNU Affero General Public License v3.0
0 stars 0 forks source link

CSRF vulnerability #59

Closed KonstantinSchubert closed 8 years ago

KonstantinSchubert commented 8 years ago

I added a decorator csrf_exempt to the workload_entries and the menu_lectures_all functions of the API views.

However, this view is accessible by browsers.

I must either remove the csrf_exempt OR protect the page from being accessible by browsers.

KonstantinSchubert commented 8 years ago

Some observation that might help to make the csrf-check pass on the POST sent by my app:

I observed that there is a field CSRF_COOKIE in the request.META which is different from the csrftoken in the COOKIE header. I am not sending a CSRF_COOKIE from my app. Should I? Or is this something that django puts in? But then maybe the CSRF_COOKIE and the csrftoken in the COOKIE field should match?

KonstantinSchubert commented 8 years ago

Duplicate of #57