Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[All SDKs] Validate that the Store ID and Authorization Model ID are valid ULIDs #114

Closed
4 tasks done
rhamzeh opened this issue May 4, 2023 · 0 comments
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

Comments

@rhamzeh
Copy link
Member

rhamzeh commented May 4, 2023

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 and AuthorizationModelId where appropriate as we know they are in ulid 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant