[All SDKs] Validate that the Store ID and Authorization Model ID are valid ULIDs #114
Closed
4 tasks done
Labels
dotnet-sdk
Affects the C#/DotNet SDK
go-sdk
Affects the Go SDK
js-sdk
Affects the JavaScript SDK
python-sdk
Affects the Python SDK
When providing configuration to the SDKs, the user may put any strings in most of the fields
We already validate that: apiScheme + apiHost and the apiTokenIssuer are in the appropriate format, we should do the same for
StoreId
andAuthorizationModelId
where appropriate as we know they are inulid
format.We should not integrate the ulid library for that, as we'd rather keep our prod dependencies to an absolute minimum, but we can use regex.
[0-7][0-9A-HJKMNP-TV-Z]{25}
should work, but we have not verified it yet (source).Tests must be added for all corresponding functionality
The text was updated successfully, but these errors were encountered: