-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Link preview / protection in workbench #78125
Comments
/cc @aeschli Since you didn't like the notification either. |
For external links, can’t we copy what websites like wikipedia do and add an ‘external’ icon to the text. Like so:
Strong disagree. I think that would ruin the command link experience. Also, I don't understand how command links (which only work when markdown content is marked as trusted) are the same problem as external websites. |
@jrieken Would showing the link preview only for http/https links work for you? We discussed about showing just an icon. It's a good idea and we can even show icons of different colors depending on scheme (http, command, etc). But it doesn't reveal the link and some of us feel we should make sure link location is shown before user can click (explicit consent & assume the risk). I can bring this up in next week's UX review. |
Yeah, foremost I think this should only be done for http/https links, not for file- or command-links. I don't think colors help because in contrast to said icons, there is no well-accepted color metaphor for external links. Instead of showing this so prominent, wouldn't it be enough to show its href as title/hover thing? That what I would have accepted... |
Which is what I am used to tbh |
Current dialog:
@Tyriar raised the point that extensions can modify setting through API, so from a security perspective this should be local storage item instead of a setting. I tried implementing a command to show quick pick, but this doesn't handle add/edit cases. I still think setting is fine, as the most evil thing an extension can do would be allow all links, which is as secure as we have it today. |
@octref great. As for the quick pick I would have it very simple if we decide to do it. Command is something like "Edit trusted links". Which opens command palette again with two options "Reset" and "Allow all" with no checkboxes just text. I understand this does not allow fine tuning but I do not really see this scenario. I would just change the wording "Trust all links on" -> "Trust all links from" |
Does that mean I will get prompted for each and every window? Or will this be a global choice? How do we ship a list of allows domain? Not at all, hardcode in the sources or via |
@jrieken I just wanted us to be on the safe side, and that the "trust all links" is a hidden option. |
I would say it's pretty common to have comments with links to SO, GH but also to all kinds of internal company sides and I would says it is PITA if you constantly get prompted. This is links we are talking about, not executables or such. |
One downside of dropping "Trust all links" is |
@octref the only downside of that approach is that I can not open the link and tell you to allow it for the future in one go. So I have to first configure, than click on the link again to open. |
One more nit: We shouldn't say "without protection" but "without prompt", e.g "Open all links without prompt". |
Updated as requested. |
With Markdown support in HTML/CSS extensions, users would see links going to external websites such as https://developer.mozilla.org/en-US/ and https://www.w3.org/. When displaying these links, we need to protect users as we don't control the linked websites.
Previous proposal. After you click link:
Notification asks you to whitelist domains:
After that, a setting would be written to
css.whiteListDomains
. Next time you click open that link, it opens in browser directly.We had some concerns this complicates a simple link opening. Here's my alternative proposal:
This applies to JS/TS as well:
For command links (GitLens), this would also give more context as to what command would be run. Maybe we can truncate the command to only show command but not its args.
The text was updated successfully, but these errors were encountered: