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

404 / Wayback Machine integration - should disable on localhost #8420

Closed
alexwykoff opened this issue Feb 27, 2020 · 5 comments · Fixed by brave/brave-core#4808
Closed

404 / Wayback Machine integration - should disable on localhost #8420

alexwykoff opened this issue Feb 27, 2020 · 5 comments · Fixed by brave/brave-core#4808
Assignees
Labels
dev-concern feature/wayback machine priority/P5 Not scheduled. Don't anticipate work on this any time soon. QA/No release-notes/include

Comments

@alexwykoff
Copy link

Description

As recommended by a user https://twitter.com/_rbonomo/status/1232805103175778304, when developing on localhost, the 404 / Wayback integration is not needed and may even interfere with development efforts.

Steps to Reproduce

  1. Spin up a local www host
  2. Visit a local link which will 404

Actual result:

Wayback integration is shown

Expected result:

Local server result should be shown

Reproduces how often:

Brave version (brave://version info)

1.4.95 (latest production)

Version/Channel Information:

  • Can you reproduce this issue with the current release? yes
  • Can you reproduce this issue with the beta channel? yes
  • Can you reproduce this issue with the dev channel? yes
  • Can you reproduce this issue with the nightly channel? yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? n/a
  • Does the issue resolve itself when disabling Brave Rewards? n/a
  • Is the issue reproducible on the latest version of Chrome? n/a

Miscellaneous Information:

@alexwykoff alexwykoff added the needs-discussion Although the issue is clear, we haven't yet reached a decision about the right solution. label Feb 27, 2020
@rebron rebron added the priority/P5 Not scheduled. Don't anticipate work on this any time soon. label Feb 28, 2020
@fmarier
Copy link
Member

fmarier commented Mar 2, 2020

In addition to localhost (and 127.0.0.1, [::1]), we might want to exclude *.local.

@StefanLobbenmeier
Copy link

StefanLobbenmeier commented Mar 3, 2020

The whole 127 subnet is localhost - so please also include them

@simonhong already thought of that, the method he used considers the whole 127. as localhost: https://chromium.googlesource.com/chromium/src/+/master/net/base/url_util_unittest.cc

@StefanLobbenmeier
Copy link

Now that I think about it it also might not be enough considering you can write IPs also in octal, for example
http://127.0045.1.2:8080/index.html

But Brave currently translates it into decimal:

http://127.37.1.2:8080/index.html

So this should be fine. Please test it anyway.

@simonhong
Copy link
Member

@StefanLobbenmeier net::IsLocalhost() works nicely :)
and you can see test cases https://github.com/brave/brave-core/pull/4808/files#diff-9c0cd69216d907227d0d91496b9f135aR10

simonhong added a commit to brave/brave-core that referenced this issue Mar 4, 2020
@bsclifton bsclifton added release-notes/include QA/No and removed needs-discussion Although the issue is clear, we haven't yet reached a decision about the right solution. QA/Yes labels Mar 4, 2020
@bsclifton
Copy link
Member

bsclifton commented Mar 4, 2020

Marked as QA/No since this is completely covered with automated tests 👍

npm run test brave_unit_tests -- --filter=BraveWaybackMachineUtilsTest*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-concern feature/wayback machine priority/P5 Not scheduled. Don't anticipate work on this any time soon. QA/No release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants
@fmarier @alexwykoff @kjozwiak @bsclifton @rebron @simonhong @StefanLobbenmeier and others