swiftDialog icon indicating copy to clipboard operation
swiftDialog copied to clipboard

--webcontent caching account/sessions between dialog instances

Open philipross opened this issue 1 year ago • 1 comments

Describe the bug When running a dialog with --webcontent using a website that requires login, the user session/account details are cached between instances of running dialog.

To Reproduce Steps to reproduce the behavior:

  1. Run: dialog --title none --message none --icon none --ontop --webcontent https://mail.google.com
  2. Sign into your GMail account within the dialog window
  3. Close the dialog box
  4. Re-run a new dialog, either with the same --webcontent or with a different URL - e.g.: --webcontent https://sheets.google.com
  5. Dialog will launch with your account signed in.

Expected behavior I would expect that the webview runs like an incognito/private browsing mode so that it doesn't cache credentials/user details when using --webcontent

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • macOS version 15.0 RC1
  • swiftDialog version 2.5.1.4775 and also 2.5.2.4777

Additional context This also happens if I run a second dialog from a brand new terminal session.

philipross avatar Sep 14 '24 09:09 philipross

yeah, that's not how the behaviour of WKWebsiteDataStore.nonPersistent() configuration is supposed to work:

nonPersistent() Creates a new data store object that stores website data in memory, and doesn’t write that data to disk.

Yet information about the session not only persists between dialogs but also after a reboot, so it's being written somewhere.

bartreardon avatar Sep 16 '24 12:09 bartreardon