Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure body is not a byte string, so data remains serializable #255

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

bitterpanda63
Copy link
Contributor

@bitterpanda63 bitterpanda63 commented Nov 6, 2024

During a GET request, django leaves the body as an empty byte string (e.g. b''). When an attack is detected, this body needs to be serialized, which then fails with Object of type bytes is not JSON serializable.

In order to fix this, we check and make sure that the body is not a bytestring.

@willem-delbare willem-delbare merged commit efa7003 into main Nov 6, 2024
9 of 11 checks passed
@willem-delbare willem-delbare deleted the fix-django-byte-body branch November 6, 2024 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants