Skip to content

fix: don't crash server when a non HTTP method was provided#236

Merged
lem-onade merged 1 commit intomainfrom
fix/server-crash-on-non-HTTP-methods
May 15, 2023
Merged

fix: don't crash server when a non HTTP method was provided#236
lem-onade merged 1 commit intomainfrom
fix/server-crash-on-non-HTTP-methods

Conversation

@BelgianNoise
Copy link
Member

@BelgianNoise BelgianNoise commented May 13, 2023

Changes in this PR

  • Do not crash the server when a non HTTP method is provided, for instance: WebDAV's PROPFIND. (used in unit tests)

@BelgianNoise BelgianNoise self-assigned this May 13, 2023
@BelgianNoise BelgianNoise marked this pull request as ready for review May 13, 2023 20:54
@tomhgmns tomhgmns self-requested a review May 14, 2023 08:16
Copy link
Contributor

@AbelVandenBriel AbelVandenBriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realised: what happens with an empty string method? Is it possible, if so, how does this handle it?

@BelgianNoise
Copy link
Member Author

BelgianNoise commented May 14, 2023

I just realised: what happens with an empty string method? Is it possible, if so, how does this handle it?

This would still crash the server. But afaik this is literally impossible cause we are using node http's built in request streams for this. An empty method is not possible. (link to node http IncomingMessage doc)
Is there a way to forge a request with an empty method ourselves ?

@lem-onade lem-onade merged commit bfae6df into main May 15, 2023
@lem-onade lem-onade deleted the fix/server-crash-on-non-HTTP-methods branch May 15, 2023 08:01
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.

4 participants