mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-01 00:15:51 +00:00
Handle whitespace separating an 'ip port' correctly (RIPD-552)
This commit is contained in:
committed by
Vinnie Falco
parent
b12676f701
commit
4f0a20ec68
@@ -79,14 +79,14 @@ Endpoint Endpoint::from_string_altform (std::string const& s)
|
||||
|
||||
if (is.rdbuf()->in_avail()>0)
|
||||
{
|
||||
if (! IP::detail::expect (is, ' '))
|
||||
if (! IP::detail::expect_whitespace (is))
|
||||
return Endpoint();
|
||||
|
||||
while (is.rdbuf()->in_avail()>0)
|
||||
{
|
||||
char c;
|
||||
is.get(c);
|
||||
if (c != ' ')
|
||||
if (!isspace (c))
|
||||
{
|
||||
is.unget();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user