Skip to content

Restrict Plack::App::File request methods, GH#660#662

Merged
miyagawa merged 1 commit intoplack:masterfrom
robrwo:rrwo/restrict-methods
Feb 15, 2021
Merged

Restrict Plack::App::File request methods, GH#660#662
miyagawa merged 1 commit intoplack:masterfrom
robrwo:rrwo/restrict-methods

Conversation

@robrwo
Copy link
Copy Markdown
Contributor

@robrwo robrwo commented Feb 15, 2021

Static file requests (handled by Plack::App::File, which is used
by Plack::Middleware::Static) were allowing any request method,
including POST or DELETE.

This change only allows GET and HEAD requests. Other requests
will receive a HTTP 405 error.

Fixes #660.

Static file requests (handled by Plack::App::File, which is used
by Plack::Middleware::Static) were allowing any request method,
including POST or DELETE.

This change only allows GET and HEAD requests. Other requests
will receive a HTTP 405 error.
@miyagawa miyagawa merged commit 12347a0 into plack:master Feb 15, 2021
@robrwo robrwo deleted the rrwo/restrict-methods branch March 25, 2021 14:56
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

Successfully merging this pull request may close these issues.

Plack::App::File should check request method

2 participants