From 7757c685c5b8cca0ed6ebe9a4436e0c14a0ebf3f Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Sat, 1 Feb 2020 16:40:26 +0100 Subject: [PATCH] Fixup token parsing If the token is like "somethingA:somethinchB:somethingC" then user is "somethingA" and password is "somethinchB:somethingC" --- libretroshare/src/jsonapi/jsonapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretroshare/src/jsonapi/jsonapi.cpp b/libretroshare/src/jsonapi/jsonapi.cpp index 72209d218..5ed50d607 100644 --- a/libretroshare/src/jsonapi/jsonapi.cpp +++ b/libretroshare/src/jsonapi/jsonapi.cpp @@ -133,7 +133,7 @@ bool RsJsonApi::parseToken( const auto tkLen = clear_token.length(); for(uint32_t i=0; i < tkLen; ++i) - if(clear_token[i] == ':') colonIndex = i; + if(clear_token[i] == ':') { colonIndex = i; break; } user = clear_token.substr(0, colonIndex);