Skip to content

Obfuscated IDs do not work in atomic operations #1089

Closed
@bart-degreed

Description

@bart-degreed

Obfuscated IDs cannot be used with an atomic:operations request, because the deserializer attempts to convert the incoming id JSON element value to TId, bypassing any custom obfuscation logic. Instead, it should assign IIdentifiable.StringId, without performing this validation upfront.

See usages of:

private void AssertCompatibleId(IResourceIdentity resourceIdentity, Type idType)
{
if (resourceIdentity.Id != null)
{
try
{
RuntimeTypeConverter.ConvertType(resourceIdentity.Id, idType);
}
catch (FormatException exception)
{
throw new JsonApiSerializationException(null, exception.Message, null, AtomicOperationIndex);
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions