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

[Feature Request]: choose nodeIntegration value in settings #312

Open
niconil opened this issue Nov 7, 2023 · 2 comments
Open

[Feature Request]: choose nodeIntegration value in settings #312

niconil opened this issue Nov 7, 2023 · 2 comments
Labels
enhancement New feature or request needs-review Added to issues/features that needs review

Comments

@niconil
Copy link

niconil commented Nov 7, 2023

Is your feature request related to a problem? Please describe.
my enterprise auth page uses JQuery
when i launch prospect-mail the auth page is not loading correctly and i'm unable to logging in

when launch prospect-mail with --enable-logging it's clear it's a problem related to jquery
[44559:1107/140954.990131:INFO:CONSOLE(6)] "Uncaught ReferenceError: jQuery is not defined"

i've found two useful ressources about issue with Electron and JQuery :

directly from the electronjs FAQ, I apply the following recommandation :
"To solve this, you can turn off node integration in Electron"

so in "src/controller/mail-window-controller.js" (line 94)
i change the value of 'nodeIntegration' from 'true' to 'false'

and my local instance of prospect-mail is working !! i see no evident bad effect after few minutes of use.

Describe the solution you'd like
I'm not very familiar with Electron, i not aware of the consequences of my change
if prospect-mail can work correctly with nodeIntegration set to false,
is it possible to set the wanted value of nodeIntegration in settings file ?

Describe alternatives you've considered
without this change i'm unable to use prospect mail

@niconil niconil added enhancement New feature or request needs-review Added to issues/features that needs review labels Nov 7, 2023
@niconil niconil changed the title [Feature Request]: setting nodeIntegration in settings [Feature Request]: choose nodeIntegration value in settings Nov 7, 2023
@zeitounator
Copy link

I was following #299 but this is a more generic description of the overall problem. Having a look, I think that #316, #311 and probably #303 are duplicate of this same overall problem.

As far as I'm concerned, checking out #314 and storing the following new implemented setting in my ~/.config/Prospect Mail/settings.json file fixes the issue (i.e. getting directed to my company saml login and correctly following all redirection untill login is successful):

{
  "contextIsolation": true
}

This setting should probably be the default value as this is the case anyway if you don't provide this value when creating a BrowserWindow instance.

@zeitounator
Copy link

Since this is currently striking me only every now and then when I have to rotate my password and that the latest version works correctly once authenticated, here is how I work around the problem using the snap version for whomever it might help until the above is merged.

  1. Download v0.4.0 snap version.
  2. Make sure the latest snap installed version is stopped. Roll back to the oldest version
    sudo snap install --dangerous /path/to/downloaded/prospect-mail_0.4.0_amd64.snap
  3. Login through your saml corportate page. Once done exit prospect mail
  4. Roll forward to the latest snap plublished version:
    sudo snap refresh prospect-mail --amend
  5. Start prospect mail again. You should be already logged in and running the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-review Added to issues/features that needs review
Projects
None yet
Development

No branches or pull requests

2 participants