authlib
authlib copied to clipboard
require_oauth.acquire imposes a memory limit
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.