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

Should not redirect in IPFS network delegate when resolve method is disabled or IPFS is disabled or in private/guest windows #12978

Closed
yrliou opened this issue Dec 1, 2020 · 2 comments · Fixed by brave/brave-core#7307

Comments

@yrliou
Copy link
Member

yrliou commented Dec 1, 2020

Description

Follow-up of brave/brave-core#7194.
OnBeforeURLRequest_IPFSRedirectWork in browser/net/ipfs_redirect_network_delegate_helper.cc should check if IPFS resolve method and the feature itself is enabled or not before doing the redirect.

Steps to Reproduce

  1. Set IPFS resolve method to disabled in settings
  2. Visit ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR

Actual result:

URL is redirected to https://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi.ipfs.dweb.link/.

Expected result:

URL should not be redirected.

Reproduces how often:

Every time.

Brave version (brave://version info)

Nightly

Version/Channel Information:

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

Other Additional Information:

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

Miscellaneous Information:

@yrliou yrliou self-assigned this Dec 1, 2020
@yrliou yrliou added this to the 1.20.x - Nightly milestone Dec 4, 2020
@yrliou yrliou changed the title Should not redirect in IPFS network delegate when resolve method is disabled or IPFS is disabled Should not redirect in IPFS network delegate when resolve method is disabled or IPFS is disabled or in private/guest windows Jan 11, 2021
@yrliou
Copy link
Member Author

yrliou commented Jan 11, 2021

full test plan is specified in brave/brave-core#7307

@LaurenWags
Copy link
Member

LaurenWags commented Jan 12, 2021

Verified passed with

Brave | 1.19.81 Chromium: 87.0.4280.141 (Official Build) dev (x86_64)
-- | --
Revision | 9f05d1d9ee7483a73e9fe91ddcb8274ebcec9d7f-refs/branch-heads/4280@{#2007}
OS | macOS Version 10.15.7 (Build 19H15)

Verified test plan from brave/brave-core#7307 (comment)

Method to resolve IPFS resources=Gateway

Set "Method to resolve IPFS resources" to "Gateway" in settings:
Gateway

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a Private window does not resolve:
Private-gateway

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a Guest window does not resolve:
guest-gateway

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a Tor window does not resolve:
Tor-gateway

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a normal window does resolve using gateway URL, not ipfs:// scheme:
normal - gateway

Method to resolve IPFS resources=Disabled

Set "Method to resolve IPFS resources" to "Disabled" in settings:
Disabled

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a normal window does not resolve:
normal-disabled

Also confirmed visiting provided URL in Private, Guest, and Tor windows does not resolve.


Verification passed on

Brave 1.19.83 Chromium: 88.0.4324.79 (Official Build) (64-bit)
Revision bd1e9353659b2491dac971226a973ca3b5684a14-refs/branch-heads/4324@{#1520}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#7307 (comment)

Method to resolve IPFS resources=Gateway

Set "Method to resolve IPFS resources" to "Gateway" in settings:
image

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a Private window does not resolve:
image

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a Guest window does not resolve:
image

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a Tor window does not resolve:
image

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a normal window does resolve using gateway URL, not ipfs:// scheme:
image

Method to resolve IPFS resources=Disabled

Set "Method to resolve IPFS resources" to "Disabled" in settings:
image

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a normal window does not resolve:
image

Confirmed visiting provided URL in Private, Guest, and Tor windows does not resolve.
image
image
image


Verification passed on

Brave | 1.19.83 Chromium: 88.0.4324.79 (Official Build) (64-bit)
-- | --
Revision | bd1e9353659b2491dac971226a973ca3b5684a14-refs/branch-heads/4324@{#1520}
OS | Windows 10 OS Version 2004 (Build 19041.685)

Verified test plan from brave/brave-core#7307 (comment)

Method to resolve IPFS resources=Gateway

Set "Method to resolve IPFS resources" to "Gateway" in settings:
image

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a Private window does not resolve:
image

Method to resolve IPFS resources=Disabled

Set "Method to resolve IPFS resources" to "Disabled" in settings:
image

Confirmed visiting provided URL, ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR, in a normal window does not resolve:
image

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