-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 parsing invalid file uri #3301
Crash parsing invalid file uri #3301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. While the fix seems to work, I think the previous solution to getting the scheme was slow and unnecessary complex. It would be better if we just removed it in favour of a better solution. I have proposed one in the comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Good call about the URI not necessarily having ://
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me now. Thanks your for all the work that has gone into it and congratulations on your first contribution to Fyne 🙂
Description:
storage/repository/parse.go assumed that there would always be a colon terminating the scheme. As seen in #3275 this led to an unexpected panic.
Note that I'm not as familiar with the usage of URI's in fyne, and this does make the code less lenient and throw errors more often (in theory). For example, "path/to/file" now expected to throw an error. After some research I think this is acceptable behavior as I don't see any way for those 'URI's to work. Let me know if this isn't a valid assumption and I can resubmit with a different fix in place (targeting just the reported issue)
Fixes #3275
Checklist:
Where applicable: