We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13b7849 commit 412020bCopy full SHA for 412020b
src/fastapi_csrf_protect/core.py
@@ -180,7 +180,8 @@ async def validate_csrf(
180
raise MissingTokenError("Form data must be of type string")
181
token = form_data
182
else:
183
- token = self.get_csrf_from_body(await request.body())
+ body: bytes = await request.body()
184
+ token = self.get_csrf_from_body(body)
185
serializer = URLSafeTimedSerializer(secret_key, salt="fastapi-csrf-token")
186
try:
187
signature: str = serializer.loads(signed_token, max_age=time_limit)
0 commit comments