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

Remove force unwrapping of incoming url parameters #887

Conversation

MarkPerkins
Copy link
Contributor

@MarkPerkins MarkPerkins commented Jun 21, 2024

What does this PR do?

Avoid unnecessary crashes due to unrelated incoming URLs by:

  • guard against existence of URL components.
  • guard against query parameters
  • validate required cookies *bonus: discard result from user defaults synchronization.

Test Plan

Didn't see any unit test files, otherwise i'd add code coverage for them. Happy to do it if there is a testing scheme!

  • Create sample project with appwrite sdk
  • establish universal links
  • apply .registerOAuthHandler() to root view.
  • start firing deeplinks, which will crash on open.

Related PRs and Issues

Discord
https://discord.com/channels/564160730845151244/1252726652044050572

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

Most of it. Followed PR naming, and added a issue on github.

Avoid unnecessary crashes due to unrelated incoming URLs by:
- guard against existence of URL components.
- guard against query parameters
- validate required cookies
*bonus: discard result from user defaults synchronization.
@MarkPerkins MarkPerkins requested a review from abnegate July 7, 2024 17:57
Copy link
Contributor

@abnegate abnegate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 💪

@abnegate abnegate merged commit 15beccf into appwrite:master Jul 8, 2024
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants