I have a very simple login form with csrf token inside. When I submit this form, all data is submitted correctly:
csrfmiddlewaretoken=GTAf5G5Pg4QsP2IMe02WqWkv1oX6NuqK&login=admin&password=admin
There is a token, username and password.
<form action="/login_sent" method="post">
<div class="modal-body clear-fix">
{% csrf_token %}
<label for="login-input">User Name</label>
<div class="input">
<input id="login-input" type="text" name="login" placeholder="Enter login">
</div>
<label for="password-input">Password</label>
<div class="input">
<input id="password-input" type="password" name="password" placeholder="Password">
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary pull-right">
Sign In
</button>
</div>
</form>
Everything works correctly in both Chrome and Firefox, but in Internet Explorer 11 I get this error:
Forbidden (403)
CSRF verification failed. Request aborted.
I checked the magazines, but nothing more. I found a similar problem here: CSRF verfication failed, but only with IE9
but these solutions did not work for me.
Any ideas how to solve this problem (without disabling the csrf token)?
source
share