1
0
mirror of synced 2025-04-20 11:47:43 +03:00
Omkar Jadhav 852a374748
Fix server crash caused due to regex complexity while matching headers. (#632)
* 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.

* Fix server crash caused due to regex complexity while matching headers.

While parsing content-type header in multipart form request the server crashes due to the exhaustion of max iterations performed while matching the input string with content-type regex.
Have removed the regex which might use backtracking while matching and replaced it with manual string processing. Have added tests as well.

* Remove magic number

Co-authored-by: Ivan Fefer <fefer.ivan@gmail.com>

Co-authored-by: yhirose <yhirose@users.noreply.github.com>
Co-authored-by: Ivan Fefer <fefer.ivan@gmail.com>
2020-09-03 13:17:52 -04:00
..
2020-03-09 23:59:00 -04:00
2020-01-16 23:28:11 -05:00
2020-01-21 09:09:05 -05:00
2019-11-29 17:07:51 -05:00
2019-11-29 17:07:51 -05:00
2017-12-29 22:34:59 -05:00
2020-07-30 01:47:54 -04:00
2020-07-29 23:12:05 -04:00
2013-07-04 18:18:52 -04:00