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: use file path as key for safeDialogs on filesystem #17546

Merged
merged 1 commit into from Mar 27, 2019

Conversation

MarshallOfSound
Copy link
Member

@MarshallOfSound MarshallOfSound commented Mar 26, 2019

Description of Change

file:// protocol URLs weren't getting valid keys for the count store.

Notes: The safeDialogs webPreferences option now actually works on file:// URLs

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 26, 2019
@PalmerAL
Copy link
Contributor

PalmerAL commented Mar 26, 2019

@MarshallOfSound The option doesn't appear to work correctly even if I modify the webContents to use a http:// URL, so I'm guessing there may be more than one bug preventing this from working.

@MarshallOfSound
Copy link
Member Author

@PalmerAL I just checked 5.0.0-beta.6 without this change and it works fine for http:// URLs. With this change it also works for file:// URLs

@PalmerAL
Copy link
Contributor

@MarshallOfSound Interesting, I'm testing with the same version of Electron, and it definitely doesn't work for me.

Code:

  mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: false,
      safeDialogs: true
    }
  })

  // and load the index.html of the app.
  mainWindow.loadURL('https://electronjs.org/')

  // Open the DevTools.
  mainWindow.webContents.openDevTools()

Screen recording:
electron-safe-dialogs.zip

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 27, 2019
@codebytere
Copy link
Member

@MarshallOfSound should we wait for further investigation of the above before merging?

@MarshallOfSound
Copy link
Member Author

@codebytere I want to merge this as the issue is definitely fixed on master on both file:// and http://. I have removed the "Fixes #X" though to leave that issue open for more investigation into 5.x.

@MarshallOfSound MarshallOfSound merged commit f443476 into master Mar 27, 2019
@release-clerk
Copy link

release-clerk bot commented Mar 27, 2019

Release Notes Persisted

The safeDialogs webPreferences option now actually works on file:// URLs

@trop
Copy link
Contributor

trop bot commented Mar 27, 2019

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

@sofianguy sofianguy added this to Fixed in 5.0.0-beta.7 in 5.0.x Mar 28, 2019
kiku-jw pushed a commit to kiku-jw/electron that referenced this pull request May 16, 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.7
Development

Successfully merging this pull request may close these issues.

None yet

3 participants