-
Notifications
You must be signed in to change notification settings - Fork 18
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
Crash occurring when trying to force unwrap possible nil response header #212
Comments
Hi, Thank you for reporting the issue. We are looking into it. Could you please specify the service to which the failing requests were made? Thank you. |
We are using amplify-swift. Specifically calling confirmSignUp followed by signIn |
@Jeffrey-Chau-Leo, thank you for the update. I asked because this can only fail when the headers contain non-ASCII characters. Since there is no standardization for which encoding to use for headers, we are discussing multiple approaches. |
@Jeffrey-Chau-Leo Do you know of any cases where the headers for SignUp or SignIn might have non-ASCII characters, perhaps as part of a username or something similar? We are thinking about limiting it to ASCII characters only and ignoring the rest. |
Unfortunately, yes, we may have users who have non-ASCII characters in their usernames. |
This is fixed in https://github.com/awslabs/aws-crt-swift/releases/tag/0.23.0. We have made the following improvements:
|
|
Describe the bug
A crash is occurring when trying to verify the users email with a verification code with amplify.
The
toString()
function below inUtilities.swift
crashes due to possible force unwrapping when nilExpected Behavior
No crash
Current Behavior
Reproduction Steps
I personally have not been able to replicate this issue, but has been occurring with our users according to our logs.
Possible Solution
Safely unwrap possible nil response headers, e.g. use a ternary operator to return an empty string
Additional Information/Context
No response
aws-crt-swift version used
0.17.0 via amplify Swift
Compiler and Version used
XCode 15.0, Swift 5
Operating System and version
MacOS 13.5
The text was updated successfully, but these errors were encountered: