Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-126595

Persistent permissions don't respect `setPersistentStoragePath()`

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.8.0 Beta2
    • 6.8.0 Beta1
    • WebEngine
    • None

    Description

      For the new feature in 6.8 to persist permission choices, it looks like it picks up the data path too early to let us change it later with QWebEngineProfile.setPersistentStoragePath().

      The permission manager sets the data path when its initialized
      It's initialized lazily from the getter in ProfileQt.
      That getter is called from the ProfileAdater initializer, which is too early for callers to have changed the persistent storage path.

      It looks like calling ProfileAdapter::setStorageName() would cause the permission manager to get re-initialized with the new storage path (and it looks like that's what QQuickWebEngineProfile does), but that's not part of the QWebEngineProfile API. I tried to find other ways to change where permissions are stored post-initialization but couldn't see anything.

      We support users running multiple browser instances at a time with different profiles with their data isolated. We are using
      setCachePath() and setPersistentStoragePath() on QWebEngineProfile to achieve that. This change means that users won't be prompted for feature permissions the first time they visit a site in a new profile, if they've visited that site before in a different profile.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kchehlarski Kaloyan Chehlarski
              toofar toofar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes