2 matches found
Strawberry GraphQL: Synchronous permission checks can treat an awaitable authorization result as truthy
Summary PermissionExtension.resolve evaluates the return value of haspermission for truthiness on the synchronous path. supportssync only classifies a permission as asynchronous when haspermission is declared with async def via inspect.iscoroutinefunction, so a plain def that returns an awaitable...
py-strawberry-graphql -- Incorrect authorization
Patrick Arminio reports: "PermissionExtension.resolve" evaluates the return value of "haspermission" for truthiness on the synchronous path. "supportssync" only classifies a permission as asynchronous when "haspermission" is declared with "async def" via "inspect.iscoroutinefunction", so a plain...