Skip to content

Provide a way to reveal the entire URI in an 'Allow extension to open URI" dialog #239272

Closed

Description

@joshspicer

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.97.0-insider (63c0355)
  • OS Version: Windows_NT x64 10.0.26100

The "allow extension to open URI" dialog truncates the URI and doesn't allow a user to inspect it before approval.

From a security point of view a user may want to inspect the entire URI (that's why the prompt is there in the first place, right?) before allowing VS Code to proceed.

I would expect to be able to hover over the URI, or alternatively provide a button to copy the URI back out for inspection. This specific URI was generated programatically, so a user would have no idea its contents.

Image

Steps to Reproduce:

  1. Click on a vscode URI that will trigger this 'open in URI' dialog.

You can do so in Remote - SSH upon failing to connect to a remote, as a part of the 'diagnose with copilot' flow.

  1. Note that you cannot see the entire URI in the trust dialog. Hovering does not reveal the URI
Screen.Recording.2025-01-30.at.3.42.19.PM.mov

Activity

  1. bpasero commented on Jan 31, 2025

    @bpasero
    Contributor

    We used to show the entire URL but then changed it in 85ebf1e for #66628.

    I do not think that native dialogs give us the option to show a hover, but the custom dialog could allow to put in the link as markdown with a title attribute. We would then have to force the custom dialog use here:

    const result = await this.dialogService.confirm({
    message: localize('confirmUrl', "Allow '{0}' extension to open this URI?", extensionDisplayName),
    checkbox: {
    label: localize('rememberConfirmUrl', "Do not ask me again for this extension"),
    },
    detail: uriString,
    primaryButton: localize({ key: 'open', comment: ['&& denotes a mnemonic'] }, "&&Open")
    });

  2. bpasero commented on Jan 31, 2025

    @bpasero
    Contributor

    One idea:

    • force a custom dialog
    • render the link as real link, but still truncated
    • put an info that clicking the link puts it into the clipboard
    • we also have a hover to show the full link

    Or alternatively, we just work on having a hover, maybe thats sufficient.

  3. added
    dialogs
    workbench-os-integration
    on Jan 31, 2025
  4. added a commit that references this issue on Feb 3, 2025
    fb40630
  5. bpasero commented on Feb 3, 2025

    @bpasero
    Contributor

    With a custom dialog, we are able to render a tooltip:

    Image

    PR: #239527

  6. added
    unreleased
    on Feb 4, 2025
  7. added a commit that references this issue on Feb 4, 2025
    30dbfbb
  8. added
    verification-needed
    on Feb 4, 2025
  9. added
    insiders-released
    and removed
    unreleased
    on Feb 6, 2025
  10. bpasero commented on Feb 6, 2025

    @bpasero
    Contributor

    Could you verify this fix in insiders? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

  11. locked and limited conversation to collaborators on Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

dialogsinsiders-releasedverification-neededverifiedworkbench-os-integration

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions