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

Graceful handling for uploaded files above PHP's upload_max_filesize when CheckClientCredentials middleware is applied #760

Closed
JakeBooher opened this issue Jul 10, 2018 · 2 comments

Comments

@JakeBooher
Copy link

JakeBooher commented Jul 10, 2018

After doing some debugging on my own via laravel/framework#24798 I've discovered that the error I'm getting there is actually coming from the \Laravel\Passport\Http\Middleware\CheckClientCredentials middleware, so figured this would be a more appropriate place for this issue

Passport version: 6.0.3
Laravel version: 5.6.26

Specifically seems to be triggered by this line in \Laravel\Passport\Http\Middleware\CheckClientCredentials:

$psr = (new DiactorosFactory)->createRequest($request);

@JakeBooher
Copy link
Author

JakeBooher commented Jul 10, 2018

Ultimately boils down to running:

$request = new ServerRequest(
            $server,
            DiactorosRequestFactory::normalizeFiles($this->getFiles($symfonyRequest->files->all())),
            $symfonyRequest->getSchemeAndHttpHost().$symfonyRequest->getRequestUri(),
            $symfonyRequest->getMethod(),
            $body,
            $headers
        );

specifically DiactorosRequestFactory::normalizeFiles($this->getFiles($symfonyRequest->files->all())),

Is there any way for us to bypass this as I'm only wanting to check the client credentials to ensure they're valid

@driesvints
Copy link
Member

Think this is more an issue with DiactorosRequestFactory or the symfony implementation. Try asking there.

zendframework/zend-diactoros#316

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

No branches or pull requests

2 participants