You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django REST framework
Hola people!
Is there any valid circumstance in which request.data can return None for any request? Checking for whether request.data is None before accessing doesn't seem to be the common practice from the docs. I, however, got an error of this kind as a result of a pentesting. I'm tyring to determine whether I should check if it's None before accessing, or putting a security check in a middleware to specifically raise a concern based on this event happening.
Thanks!
Lorenzo Peña
unread,
May 29, 2020, 8:32:42 PM5/29/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django REST framework
To answer my own question: yes, request.data can be None if the parser would correctly parse the incoming body into None, for instance, if the body consists of `null` and goes through a JSON parser.