4

I have very simple login form with csrf token inside. When I submit this form all of data is sent correctly:

csrfmiddlewaretoken=GTAf5G5Pg4QsP2IMe02WqWkv1oX6NuqK&login=admin&password=admin

There is token, login 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 is working correctly on both Chrome and Firefox, but on Internet Explorer 11 I get this error:

Forbidden (403)

CSRF verification failed. Request aborted.

I checked the logs, but there is nothing more then that. I found 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 csrf token)?

Community
  • 1
  • 1
Konrad Klimczak
  • 1,474
  • 2
  • 22
  • 44

0 Answers0