Skip to content

Commit

Permalink
Truncate the ip string from the beginning.
Browse files Browse the repository at this point in the history
  • Loading branch information
maliming committed Sep 18, 2024
1 parent 4c14a4a commit 05fd7be
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ private static string JoinAsString(IEnumerable<string> list)

while (serialized.Length > IdentitySessionConsts.MaxIpAddressesLength)
{
var lastCommaIndex = serialized.LastIndexOf(',');
var lastCommaIndex = serialized.IndexOf(',');
if (lastCommaIndex < 0)
{
return serialized;
}
serialized = serialized.Substring(0, lastCommaIndex);
serialized = serialized.Substring(lastCommaIndex + 1);
}

return serialized;
Expand Down

0 comments on commit 05fd7be

Please sign in to comment.