diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-07-03 00:27:08 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-07-03 23:16:48 +0100 |
commit | 0a4a7da35cd043411b5544440f996f588be1e892 (patch) | |
tree | 7ed697e6b30b4fdfff0af466ec6bb6225cd09a63 /contrib/epee/include/net/http_protocol_handler.inl | |
parent | http_protocol_handler: catch invalid numbers when parsing (diff) | |
download | monero-0a4a7da35cd043411b5544440f996f588be1e892.tar.xz |
http_protocol_handler: fix HTTP/x.y parsing
It was accepting any character for the dot (yeah, massive big I know)
Diffstat (limited to 'contrib/epee/include/net/http_protocol_handler.inl')
-rw-r--r-- | contrib/epee/include/net/http_protocol_handler.inl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/epee/include/net/http_protocol_handler.inl b/contrib/epee/include/net/http_protocol_handler.inl index dc2c06972..76db5346f 100644 --- a/contrib/epee/include/net/http_protocol_handler.inl +++ b/contrib/epee/include/net/http_protocol_handler.inl @@ -353,7 +353,7 @@ namespace net_utils template<class t_connection_context> bool simple_http_connection_handler<t_connection_context>::handle_invoke_query_line() { - STATIC_REGEXP_EXPR_1(rexp_match_command_line, "^(((OPTIONS)|(GET)|(HEAD)|(POST)|(PUT)|(DELETE)|(TRACE)) (\\S+) HTTP/(\\d+).(\\d+))\r?\n", boost::regex::icase | boost::regex::normal); + STATIC_REGEXP_EXPR_1(rexp_match_command_line, "^(((OPTIONS)|(GET)|(HEAD)|(POST)|(PUT)|(DELETE)|(TRACE)) (\\S+) HTTP/(\\d+)\\.(\\d+))\r?\n", boost::regex::icase | boost::regex::normal); // 123 4 5 6 7 8 9 10 11 12 //size_t match_len = 0; boost::smatch result; |