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

Implement checks on Location setters #23670

Closed
wants to merge 6 commits into from
Prev

link to cannot have a username password spec

  • Loading branch information
braddunbar committed Jul 1, 2019
commit 05f75473ff252b5e774031e17341b37b28d010b7
@@ -215,6 +215,7 @@ impl LocationMethods for Location {
self.check_same_origin_domain()?;
let url = self.get_url();
// If copyURL cannot have a username/password/port, then return.

This comment has been minimized.

Copy link
@gterzian

This comment has been minimized.

Copy link
@braddunbar
// https://url.spec.whatwg.org/#cannot-have-a-username-password-port
if url.has_host() && !url.cannot_be_a_base() && url.scheme() != "file" {
self.set_url_component(value, UrlHelper::SetPort);
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.