-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
The error messages this produces aren't exactly user-friendly:
Lines 146 to 150 in f1a7e28
| await send_csrf_failed( | |
| scope, | |
| wrapped_send, | |
| "form-urlencoded POST field did not match cookie", | |
| ) |
Lines 168 to 188 in f1a7e28
| await send_csrf_failed( | |
| scope, | |
| wrapped_send, | |
| "multipart/form-data POST field did not match cookie", | |
| ) | |
| return | |
| except FileBeforeToken: | |
| await send_csrf_failed( | |
| scope, | |
| wrapped_send, | |
| "File encountered before csrftoken - make sure csrftoken is first in the HTML", | |
| ) | |
| return | |
| # Now replay the body | |
| await app(scope, replay_receive, wrapped_send) | |
| return | |
| else: | |
| await send_csrf_failed( | |
| scope, wrapped_send, message="Unknown content-type" | |
| ) | |
| return |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request