Skip to content

Conversation

@omjego
Copy link
Contributor

@omjego omjego commented Aug 28, 2020

httplib::detail::split wasn't doing proper boundary checks. Inputs like "/? " (query with only spaces) or "/?= =" were crashing the server cause of illegal memory access done by the process, creating a potential security vulnerability, as this could be leveraged to make a DoS attack.
Have added checks for such cases and test cases as well.

omjego added 3 commits August 25, 2020 08:16
When passed ' ' as a query string, the server crashes cause of illegal memory access done in httplib::detail::split. Have added checks to make sure the split function has a valid string with length > 0.
Fix query parsing issues
@yhirose
Copy link
Owner

yhirose commented Aug 28, 2020

@omjego, the code looks good to me. Thanks for your contribution!

@yhirose yhirose merged commit b0fd4be into yhirose:master Aug 28, 2020
ExclusiveOrange pushed a commit to ExclusiveOrange/cpp-httplib-exor that referenced this pull request May 2, 2023
* Fix parsing to parse query string with single space char.

When passed ' ' as a query string, the server crashes cause of illegal memory access done in httplib::detail::split. Have added checks to make sure the split function has a valid string with length > 0.

* Fix parsing to parse query string with single space char.
SC-One pushed a commit to SC-One/cpp-httplib that referenced this pull request Jan 15, 2025
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.

2 participants