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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when the bundle ID contains characters not allowed in URL schemes #786

Merged
merged 2 commits into from Aug 2, 2023

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Aug 2, 2023

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

馃搵 Changes

The SDK uses the URLComponents builder to build the callback URL, with the bundle ID as the scheme. However, this builder throws an exception when the scheme contains invalid characters.

This issue was raised by a customer that had a bundle ID starting with a number. According to the BNF syntax for URI schemes, a scheme cannot start with a number.

Screenshot 2023-08-02 at 3 20 58 PM

This PR makes sure to return an error instead of crashing if the scheme contains any invalid characters.

Screenshot 2023-08-02 at 2 27 41 PM

馃搸 References

Fixes #785

馃幆 Testing

The changes were tested manually using a simulator running iOS 17.0 with Xcode 14.3 (14E222b).

@Widcket Widcket requested a review from a team as a code owner August 2, 2023 14:41
@Widcket Widcket merged commit d621132 into master Aug 2, 2023
9 checks passed
@Widcket Widcket deleted the fix/bundleid-numbers branch August 2, 2023 19:53
@Widcket Widcket mentioned this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash with numeric bundle indentifier
2 participants