Return cloned system identies from the cache

This commit is contained in:
Jordan Brown
2018-10-11 13:04:53 -04:00
parent 9f396c9837
commit e9939bc00e
@@ -71,7 +71,7 @@ namespace Tgstation.Server.Host.Security
throw new ArgumentNullException(nameof(user));
lock (cachedIdentities)
if (cachedIdentities.TryGetValue(user.Id, out var identity))
return identity.SystemIdentity;
return identity.SystemIdentity.Clone();
throw new InvalidOperationException("Cached system identity has expired!");
}
}