Fixup token parsing

If the token is like "somethingA:somethinchB:somethingC" then user is
"somethingA" and password is "somethinchB:somethingC"
This commit is contained in:
Gioacchino Mazzurco 2020-02-01 16:40:26 +01:00
parent b0358759e5
commit 7757c685c5
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -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);