-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Desktop: Fixes #10946: Stop crashing HTML/MD importer when content has link with very long name #10947
Closed
Closed
Desktop: Fixes #10946: Stop crashing HTML/MD importer when content has link with very long name #10947
Changes from 4 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b1db308
wip adding new checks to md import
pedr deceb77
changing checks in favour of handling error
pedr 7d25c00
handle error on node fsDriver stat
pedr f82c6d3
reverting changes
pedr f7cf69f
removing error handling from stat
pedr 0223773
adding a new way to check if it is to a localfile
pedr 07e7ff7
simplifying importLocalFile and removing unused function
pedr fbc7aea
Merge branch 'dev' into skip-creating-resource-from-uris
laurent22 3a8f417
Merge branch 'dev' into skip-creating-resource-from-uris
laurent22 706bdc0
Merge branch 'dev' into skip-creating-resource-from-uris
personalizedrefrigerator bf7e03b
remove repeated logic
pedr f49b092
Merge remote-tracking branch 'refs/remotes/origin/skip-creating-resou…
pedr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't think this logic should be here. The way stats work is that it either returns the file info, or null if the file doesn't exist. But in this case it exists, except it cannot be processed. So whatever we need to solve it's definitely not here that the fix should be
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.
The PR name made this more confusing, my bad.
These links are not local resources. The way that importer works is by reading the HTML for links and trying to check if they exist locally or not. When it is a will be a very long link like, or a
mailto:
to a support address with a template included, for example,fsDriver
stat
will throw theENAMETOOLONG
.There isn't any way to file exist because
ENAMETOOLONG
since it means it is a name longer than the system supports.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.
The problem is that a link is being fed to this function, so that should not happen. The current behaviour is correct - it crashes when invalid data is passed to this function. Now the fix is to prevent that data to get there in the first place