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

Use URL origin instead of hostname for permission domains #8717

Merged
merged 5 commits into from
Jun 1, 2020

Conversation

rekmarks
Copy link
Member

@rekmarks rekmarks commented Jun 1, 2020

window.location.hostname -> window.location.origin

We should include the protocol and port in permission domain origin strings, because they can point to completely different entities.

@rekmarks rekmarks requested a review from a team as a code owner June 1, 2020 21:04
app/scripts/ui.js Outdated Show resolved Hide resolved
@metamaskbot
Copy link
Collaborator

Builds ready [74438ea]
Page Load Metrics (592 ± 53 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint309239136
domContentLoaded36572459011153
load36672559211153
domInteractive36472359011153

@Gudahtt
Copy link
Member

Gudahtt commented Jun 1, 2020

We should update the phishing controller to expect an origin rather than a hostname as well, as it doesn't really make sense to apply those same phishing lists to protocols not tied to DNS. So it'll need to be a little smarter. That can wait for another time though.

@metamaskbot
Copy link
Collaborator

Builds ready [2a0265c]
Page Load Metrics (692 ± 81 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint329048157
domContentLoaded37398769016981
load37598869216981
domInteractive37398669016981

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Gudahtt
Copy link
Member

Gudahtt commented Jun 1, 2020

It would be nice to hide the "default" protocols and ports, so that our current designs effectively don't change. e.g. hide HTTPS and default ports. But that can be a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants