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

Unable to go backwards on IPFS pages when automatic DNSLink redirection is enabled #16557

Closed
urbenlegend opened this issue Jun 22, 2021 · 2 comments · Fixed by brave/brave-core#10556

Comments

@urbenlegend
Copy link

Description

When Automatically redirect to IPFS pages via DNSLink when possible is enabled in Settings -> IPFS, I am unable to go back to previously visited IPFS pages using the back button. Clicking the back button just refreshes the current page. My guess is that the non-redirected URL is put into the history stack and going back just causes Brave to redirect the page again.

Steps to Reproduce

  1. Enable IPFS local node
  2. Enable the Automatically redirect to IPFS pages via DNSLink when possible setting
  3. Visit ipfs.io
  4. Click the Help link in the top right corner of the webpage
  5. Click the Back button in Brave. Notice that Brave doesn't go back to the IPFS home page.

Actual result:

Back button does nothing on IPFS pages when DNSLink redirection is enabled.

Expected result:

Back button should work normally on IPFS pages regardless of whether DNSLink redirection is enabled or not.

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave 1.26.67 Chromium: 91.0.4472.114 (Official Build) (64-bit)
Revision 4bb19460e8d88c3446b360b0df8fd991fee49c0b-refs/branch-heads/4472@{#1496}
OS Linux

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Not tested
  • Can you reproduce this issue with the nightly channel? Not tested

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? No
  • Does the issue resolve itself when disabling Brave Rewards? No
  • Is the issue reproducible on the latest version of Chrome? N/A
@da2x
Copy link

da2x commented Oct 15, 2021

The relevant code in ipfs_tab_helper.cc by @spylogsster seems to be missing the should_replace_current_entry = true flag to OpenURLParams. As I understand it, that flag should be equivalent to location.replace in JavaScript. So, it should yield the desired behavior here.

@stephendonner
Copy link

Verified PASSED using

Brave 1.33.12 Chromium: 95.0.4638.50 (Official Build) nightly (x86_64)
Revision 3e9db37693d0cf8e31a89fbcf50401ae91125cef-refs/branch-heads/4638@{#816}
OS macOS Version 11.6 (Build 20G165)

Steps:

  1. new profile
  2. launched Brave
  3. loaded ipns://en.wikipedia-on-ipfs.org
  4. clicked on Use a local node
  5. in brave://settings/ipfs I set Automatically redirect to IPFS pages via DNSLink when possible setting to On
  6. loaded ipfs.io
  7. clicked on Help which loaded ipns://ipfs.io/ with Help link and content selected/displayed
  8. clicked on the browser's Back button and confirmed I returned to ipns://ipfs.io/ root
example example example
Screen Shot 2021-10-18 at 11 26 11 AM Screen Shot 2021-10-18 at 11 26 07 AM Screen Shot 2021-10-18 at 11 29 38 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment