Skip to content

url.resolve auth issue #1435

Description

@stevenvachon
require("url").resolve(
  "http://user:pass@fakeurl2.com:80/path/resource.html?query#hash",
  "http://fakeurl.com/path/resource.html?query#hash"
);

produces http://user:pass@fakeurl.com/path/resource.html?query#hash

Node.js has been doing this for as long as I've been using it. How can it be correct to add auth information from one absolute url to another absolute url?

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.urlIssues and PRs related to the legacy built-in url module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions