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

fix: access of out-of-scope reference in ShowOpenDialog #17126

Merged
merged 1 commit into from Feb 27, 2019

Conversation

jfuechsl
Copy link
Contributor

@jfuechsl jfuechsl commented Feb 25, 2019

and also in and ShowSaveDialog.

Description of Change

In the mac file dialog implementation of show*OpenDialog, a settings
object is passed down to the dialog completion handler.
However at the time the completion handler is invoked, the settings
object is already out-of-scope, resulting in an invalid access to
the security_scoped_bookmarks flag.
The fix is to capture the value of the flag and passing that directly
to the completion handler.

Closes #16664

Checklist

Release Notes

Notes: Fixed a bug when retrieving security scoped bookmarks in ShowOpenDialog and ShowSaveDialog

…ialog

In the mac file dialog implementation of show*OpenDialog, a settings
object is passed down to the dialog completion handler.
However at the time the completion handler is invoked, the settings
object is already out-of-scope, resulting in an invalid access to
the security_scoped_bookmarks flag.
The fix is to capture the value of the flag and passing that directly
to the completion handler.

fixes issue electron#16664
@jfuechsl jfuechsl requested a review from a team February 25, 2019 20:20
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Feb 25, 2019
@welcome
Copy link

welcome bot commented Feb 25, 2019

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 26, 2019
@codebytere codebytere merged commit 42aa375 into electron:master Feb 27, 2019
@release-clerk
Copy link

release-clerk bot commented Feb 27, 2019

Release Notes Persisted

Fixed a bug when retrieving security scoped bookmarks in ShowOpenDialog and ShowSaveDialog

@welcome
Copy link

welcome bot commented Feb 27, 2019

Congrats on merging your first pull request! 🎉🎉🎉

@MarshallOfSound
Copy link
Member

/trop run backport-to 4-0-x,5-0-x

@trop
Copy link
Contributor

trop bot commented Feb 28, 2019

The backport process for this PR has been manually initiated,
sending your 1's and 0's to "4-0-x" here we go! :D

@trop
Copy link
Contributor

trop bot commented Feb 28, 2019

The backport process for this PR has been manually initiated,
sending your 1's and 0's to "5-0-x" here we go! :D

@trop
Copy link
Contributor

trop bot commented Feb 28, 2019

I have automatically backported this PR to "4-0-x", please check out #17176

@trop
Copy link
Contributor

trop bot commented Feb 28, 2019

I have automatically backported this PR to "5-0-x", please check out #17177

@sofianguy sofianguy added this to Fixed in 5.0.0-beta.5 in 5.0.x Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
5.0.x
Fixed in 5.0.0-beta.5
Development

Successfully merging this pull request may close these issues.

securityScopedBookmarks do not work properly (showOpenDialog())
5 participants