authlib icon indicating copy to clipboard operation
authlib copied to clipboard

require_oauth.acquire imposes a memory limit

Open cariaso opened this issue 2 years ago • 0 comments

https://github.com/lepture/authlib/blob/169c7dcfc47478c8d55553cc95fb0f5578162b77/authlib/integrations/flask_oauth2/resource_protector.py#L73

require_oauth.acquire cannot be used to protect large POSTs, where the data will be streamed, because the usage of _req.data on line 73 fills memory. Replacing _req.data with a simple None seems to allow the correct result to be computed, but damages the downstream computation.

cariaso avatar Aug 30 '22 14:08 cariaso