-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
mailto:
links are blocked on Chrome
#1138
Comments
@benoit74 see #916 and #943. A fix for the |
This time I would probably prefer to do it in readers, for the exact reason you mention ^^ The Or we have to decide to amend the ZIM specification and clearly explain that Glad that the way to solve the issue in kiwix-server is known. Does it means the fix is already there in KJS (because AFAIK, the mailto links are working there)? |
@benoit74 In the browser extension filtering for |
I've just thought that it might be an easy fix to add UPDATE: According to my tests in the PWA, this can indeed be solved by relaxing the CSP for the content of the iframe (at least, if not for the whole app as well). That should apply in Kiwix Serve too, which uses a very similar CSP. @kelson42 Should an issue for modifying the CSP be opened on libkiwix instead of here? |
@Jaifroid Yes please. If this change has any other impacts. Please list them |
Sorry, the issue does not being much.. I though you would do a PR. |
Did you mean me? I could do a "blind" PR, but I don't have the ability to test it, as I can't compile Kiwix Serve. I'm also at work... EDIT: I would if I could, e.g. if we had a way to build with a container (?), but I've done the next best thing which is to point out exactly where the CSP entry needs to be added AFAIK. |
One thing that occurs to me is that nowadays there are all sorts of custom protocols. Even things like EDIT: I'm not sure what Wombat does with such protocols. Hopefully it leaves them alone? |
@Jaifroid We have a shortlist in zimwriterfs of schemes we shozld not rewrite. geo: and tel: are indeed interesting cases. |
In Zimit it is quite simple now. Any link with a protocol has not been rewritten, because result of rewriting is always a relative link because there is no need to specify of protocol once inside the ZIM, we just want to continue to use whatever has been used to load the HTML (starting with http if ZIM is served on http, https if it is served on https, but also the hostname, the base path, ... plus we could have other readers using other protocols). So at reader level, any relative link is de facto already rewritten, and expected to point to a resource existing inside the ZIM. If corresponding item is missing in the ZIM (for any reason) it is always replaced by an absolute link with original http or https protocol used for crawling, including hostname and base path. Finally FYI, warc2zim rewrites only relative links and http/https absolute links. All other protocols are simply ignored and kept as-is. From my PoV (and this is true not only for Zimit but all ZIMs), all links with a protocol specified should be able to escape the sandbox since we know for sure they do not point to something inside the ZIM. Or at least they shouldn't. Not only mailto: and tel:, any absolute link. |
Why only a shortlist? I don't get it |
@benoit74 Sounds like you want ro make a C++ PR ;) |
OK, thanks, both -- apart from mailto:, geo: and tel: links in Wikivoyage ZIMs (last two already dealt with, e.g. adding the World icon for geo: and telephone icon for tel:), then readers should just compare the protocols, and offer to open a new browser window/tab in the case of any other protocol, so the browser can deal with it however it wants. I'll reference this in #1090. |
Oh, of course, each reader is welcomed to handle any scheme he knows about with custom behaviors, but generally it should fallback to opening it in the browser / system and let it decide |
ZIM: https://dev.library.kiwix.org/viewer#fas-military-medicine_en_2024-05/irp.fas.org/doddir/milmed/index.html
Chrome: 125
OS: MacOS Sonoma 14.5
When clicking on Steve Aftergood at the bottom of the front page, we should open a mailto: link. This does not happen.
Looks like we have a security message:
Is there anything which can be done or is it just Chrome who is too aggressive?
Nota: opening link outside viewer, i.e. from https://dev.library.kiwix.org/content/fas-military-medicine_en_2024-05/irp.fas.org/doddir/milmed/index.html works as expected, clearly an "iframe" issue.
The text was updated successfully, but these errors were encountered: