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

Make sure custom protocol is handled as secure context on macOS #1551

Merged
merged 2 commits into from Apr 22, 2021

Conversation

lemarier
Copy link
Member

@lemarier lemarier commented Apr 20, 2021

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • New Binding Issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes. Issue #___
  • No

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

Other information:

Do not seem to affect other platforms need to test on Windows and Linux to be sure it didn’t break anything.

Fix #1550
Related to tauri-apps/wry#85

Without the fix:

Screen Shot 2021-04-20 at 3 11 15 PM


With the fix

Screen Shot 2021-04-20 at 3 10 14 PM

…content on macOS

Do not seems to affect other platform need to test on Windows and linux to be sure it didn’t break anything.

Fix #1550
@lemarier lemarier requested a review from a team as a code owner April 20, 2021 19:19
@lemarier lemarier requested a review from a team April 20, 2021 19:19
Copy link
Sponsor Member

@nothingismagick nothingismagick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there were a flair possible for this kind of PR, then I would grant it legendary status that is literally a game changer. Thanks man. I owe you a caipi. On the Seychelles

@lucasfernog
Copy link
Member

I'm checking how local storage behaves with this solution. I think the webview caches it based on the url :/

@lemarier
Copy link
Member Author

I'm checking how local storage behaves with this solution. I think the webview caches it based on the url :/

maybe we could make sure local storage use app and not tauri-shared directory for storage.

@lucasfernog
Copy link
Member

I'm checking how local storage behaves with this solution. I think the webview caches it based on the url :/

maybe we could make sure local storage use app and not tauri-shared directory for storage.

That would be great

@lemarier
Copy link
Member Author

That would be great

macOS

It's stored inside ~/Library/WebKit and uses the package.id

Screen Shot 2021-04-20 at 4 33 59 PM

Windows

We already use with_user_data_folder so not a problem

Linux

Need to check this out

@lucasfernog
Copy link
Member

webkit stores localstorage under $HOME/.local/share/webkitgtk/localstorage, so we do need to change it. I'll PR wry.

@lucasfernog
Copy link
Member

Unfortunately navigator.mediaDevices is still undefined on Linux :( we probably need to tweak something on the wry end.

@lemarier
Copy link
Member Author

Unfortunately navigator.mediaDevices is still undefined on Linux :( we probably need to tweak something on the wry end.

ok I'll try to make some tests to see what we can do

@lucasfernog
Copy link
Member

Since this is a macOS PR i'll merge it.

@wusyong
Copy link
Member

wusyong commented Apr 22, 2021

I think we haven't enabled it yet but the method/signal should be here:
https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WebKitWebView-permission-request

@lucasfernog lucasfernog merged commit 5909c1e into dev Apr 22, 2021
@lucasfernog lucasfernog deleted the fix/https-custom-protocol-macos branch April 22, 2021 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Treat macOS custom protocol as https for WebRTC
4 participants