diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-10 15:06:23 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-18 15:15:26 +0000 |
commit | 187a6ab2d24df7e85c85c19d83c4820878a713cc (patch) | |
tree | 76ee2316a4ecdfc9a2a77c70537b04fdf00793cd /contrib/epee/include/net/http_protocol_handler.inl | |
parent | checkpoints: trap failure to load JSON checkpoints (diff) | |
download | monero-187a6ab2d24df7e85c85c19d83c4820878a713cc.tar.xz |
epee: trap failure to parse URI from request
Diffstat (limited to 'contrib/epee/include/net/http_protocol_handler.inl')
-rw-r--r-- | contrib/epee/include/net/http_protocol_handler.inl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/epee/include/net/http_protocol_handler.inl b/contrib/epee/include/net/http_protocol_handler.inl index c555707ac..c18f7f706 100644 --- a/contrib/epee/include/net/http_protocol_handler.inl +++ b/contrib/epee/include/net/http_protocol_handler.inl @@ -345,7 +345,12 @@ namespace net_utils { analize_http_method(result, m_query_info.m_http_method, m_query_info.m_http_ver_hi, m_query_info.m_http_ver_hi); m_query_info.m_URI = result[10]; - parse_uri(m_query_info.m_URI, m_query_info.m_uri_content); + if (!parse_uri(m_query_info.m_URI, m_query_info.m_uri_content)) + { + m_state = http_state_error; + MERROR("Failed to parse URI: m_query_info.m_URI"); + return false; + } m_query_info.m_http_method_str = result[2]; m_query_info.m_full_request_str = result[0]; |