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
fix: savePage throw on relative paths #32728
Conversation
d2afe58
to
ddb0182
Compare
ddb0182
to
5cd6502
Compare
5cd6502
to
7ae49c3
Compare
Release Notes Persisted
|
I was unable to backport this PR to "16-x-y" cleanly; |
I was unable to backport this PR to "15-x-y" cleanly; |
I was unable to backport this PR to "17-x-y" cleanly; |
I was unable to backport this PR to "18-x-y" cleanly; |
The backport process for this PR has been manually initiated - sending your PR to |
I have automatically backported this PR to "17-x-y", please check out #33016 |
I was unable to backport this PR to "16-x-y" cleanly; |
I was unable to backport this PR to "15-x-y" cleanly; |
@codebytere has manually backported this PR to "16-x-y", please check out #33017 |
@codebytere has manually backported this PR to "15-x-y", please check out #33018 |
/trop run backport-to 18-x-y |
The backport process for this PR has been manually initiated - sending your PR to |
I have automatically backported this PR to "18-x-y", please check out #33019 |
Description of Change
Closes #32696.
Fixes an issue where
webContents.savePage
failed consistently on Windows and Linux and sporadically on macOS when passing a relative path instead of an absolute one. Our version ofsavePage
plumbs down tocontent/browser/web_contents/web_contents_impl.cc
, which, per comment:As a result, there isn't any proper checking for paths being absolute at that layer, since it's a function that assumes what's being passed to it has already been checked and sanitized.
We fix this by performing absolute path checks ourselves.
Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where
webContents.savePage
failed when passing a relative path instead of an absolute one.