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

Purple "IPFS badge" displays for non-"IPFS" sites #31145

Closed
BigLep opened this issue Jun 19, 2023 · 4 comments · Fixed by brave/brave-core#19451
Closed

Purple "IPFS badge" displays for non-"IPFS" sites #31145

BigLep opened this issue Jun 19, 2023 · 4 comments · Fixed by brave/brave-core#19451
Assignees

Comments

@BigLep
Copy link

BigLep commented Jun 19, 2023

Description

Purple "IPFS badge" displays for non-"IPFS" sites.

Example: https://github.com/ipfs/github
image

Steps to Reproduce

  1. Have IPFS enabled
  2. Visit a site that has /ipfs at the root path like github.com/ipfs that isn't hosted by an IPFS HTTP gateway returning the x-ipfs-path header and doesn't have DNSLink setup.

Actual result:

See above

Expected result:

No purple badge

Reproduces how often:

Every time

Brave version (brave://version info)

Brave 1.50.121 Chromium: 112.0.5615.138 (Official Build) (arm64)
Revision 2258f2fcaeb07bc95c992b7ca47f0b43ead9865c-refs/branch-heads/5615@{#1282}
OS macOS Version 13.4 (Build 22F66)
JavaScript V8 11.2.214.14
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Command Line /Applications/Brave Browser.app/Contents/MacOS/Brave Browser --disable-domain-reliability --enable-dom-distiller --origin-trial-public-key=bYUKPJoPnCxeNvu72j4EmPuK7tr1PAC7SHh8ld9Mw3E=,fMS4mpO6buLQ/QMd+zJmxzty/VQ6B1EUZqoCU04zoRU= --sync-url=https://sync-v2.brave.com/v2 --lso-url=https://no-thanks.invalid --variations-server-url=https://variations.brave.com/seed --variations-insecure-server-url=https://variations.brave.com/seed --flag-switches-begin --flag-switches-end --component-updater=url-source=https://go-updater.brave.com/extensions
Executable Path /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
Profile Path /Users/sal/Library/Application Support/BraveSoftware/Brave-Browser/Profile 2
Linker lld
Active Variations AllowCertainClientHintsStudy:EnabledBraveAdblockCookieListOptInReleaseStudy:EnabledBraveAdblockMobileNotificationsListDefault:EnabledBraveAds.AdServingStudy:DefaultAdNotificationsPerHour=10/MaximumAdNotificationsPerDay=100/MaximumInlineContentAdsPerHour=6/MaximumInlineContentAdsPerDay=20/AdServingVersion=2BraveAutoTranslateStudy:AutoTranslateDisabledBraveCleanupSessionCookiesOnSessionRestore:DisabledBraveDebounceStudy:EnabledBraveGoogleSignInPermissionStudy:EnabledBraveHttpsByDefaultRolloutStudy:EnabledBraveRewardsWebUiPanelStudy:EnabledBraveScreenFingerprintingBlockerStudy:EnabledCrossPlatformVPNStudy:EnabledDefault1pBlockingStudy:DisabledDisableReduceLanguage:EnabledEphemeralStorageStudy:EnabledFirstPartyEphemeralDomainBlockStudy:EnabledForceDisableBlinkFeatures:EnabledMacCoreLocationBackendStudy:EnabledPartitionBlinkMemoryCacheStudy:EnabledPartitionConnectionsByNetworkIsolationKeyStudy:EnabledPermissionLifetimeReleaseStudy:EnabledSpeedreaderReleaseStudy:EnabledUserActivityStudy:TriggersWhatsNewStudy:Enabled

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Haven't tried
  • Can you reproduce this issue with the nightly channel? Haven't tried

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

Miscellaneous Information:

I searched for existing issues about this by looking at:
https://github.com/brave/brave-browser/issues?q=is%3Aissue+ipfs+is%3Aopen
https://github.com/brave/brave-browser/issues?page=3&q=is%3Aissue+ipfs+badge

I assume there is logic from https://www.npmjs.com/package/is-ipfs related to https://docs.ipfs.tech/how-to/address-ipfs-on-web/ that hasn't been properly ported over.

@BigLep
Copy link
Author

BigLep commented Jun 19, 2023

Looking at the release checklist (example), I see there are various positive tests affirming the IPFS badge's presence. It would probably be good to add a negative case (asserting that the badge isn't present).

lidel added a commit to lidel/qa-resources that referenced this issue Jun 19, 2023
@lidel
Copy link

lidel commented Jun 19, 2023

@cypt4 I think this may be a regression in URL/DNSLink processing pipeline, perhaps due to recent refactors?
There is similar #31151.

You can reference ipfs/ipfs-docs#1295https://github.com/ipfs/ipfs-docs/blob/feat/how-to-implement-support-in-a-web-browser.md/docs/how-to/detect-ipfs-on-web.md or ask me on Slack if needed.

I agree with @BigLep, we need QA tests for this, filled brave/qa-resources#526 to close the gap.

@cypt4 cypt4 self-assigned this Jun 20, 2023
@cypt4 cypt4 added this to the web3 milestone Jun 20, 2023
@cypt4 cypt4 added the priority/P4 Planned work. We expect to get to it "soon". label Jun 20, 2023
@cypt4 cypt4 removed this from the web3 milestone Jun 29, 2023
@srirambv srirambv added priority/P3 The next thing for us to work on. It'll ride the trains. QA/Yes and removed priority/P4 Planned work. We expect to get to it "soon". labels Jul 21, 2023
cypt4 added a commit to brave/brave-core that referenced this issue Jul 31, 2023
cypt4 added a commit to brave/brave-core that referenced this issue Aug 1, 2023
* Validate IPFS Cid using Rust CID lib
Resolves brave/brave-browser#31145
@brave-builds brave-builds added feature/web3/wallet Integrating Ethereum+ wallet support feature/web3/wallet/core labels Aug 1, 2023
@cypt4 cypt4 added release-notes/include and removed feature/web3/wallet Integrating Ethereum+ wallet support feature/web3/wallet/core labels Aug 1, 2023
@brave-builds brave-builds added this to the 1.58.x - Nightly milestone Aug 1, 2023
cypt4 added a commit to brave/brave-core that referenced this issue Aug 10, 2023
* Validate IPFS Cid using Rust CID lib
Resolves brave/brave-browser#31145
kjozwiak pushed a commit to brave/brave-core that referenced this issue Aug 11, 2023
* Support sending f1 to typed f4 addresses (#18511)

* Support sending f1 to typed f4 addresses
Resolves brave/brave-browser#30401

* Migrate to rust static

* Build fix

* Review fix

* remove unused crates and update *.toml

* bump fvm_shared to 3.3.0 to match filecoin Cargo.toml

* add missing BUILD.gn update for multihash

* fix multihash aliased deps

---------

Co-authored-by: bridiver <34129+bridiver@users.noreply.github.com>

* Include FEVM addresses when sender is f1 (#19330)

* Include FEVM addresses when sender is f1
Resolves brave/brave-browser#30403

* Validate IPFS Cid using Rust CID lib (#19451)

* Validate IPFS Cid using Rust CID lib
Resolves brave/brave-browser#31145

* Cleanup

---------

Co-authored-by: bridiver <34129+bridiver@users.noreply.github.com>
@kjozwiak
Copy link
Member

The above requires 1.57.45 or higher for 1.57.x verification 👍

@srirambv
Copy link
Contributor

Verification passed on

Brave 1.57.45 Chromium: 116.0.5845.82 (Official Build) (64-bit)
Revision c43241b101a636729252df90d1a1a7b72f2a9f94
OS Linux
  • Verified steps from issue description
  • Verified visiting a site that has /ipfs at the root path that isn't hosted on IPFS doesn't show the IPFS badge
31145.mp4

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

Successfully merging a pull request may close this issue.

6 participants