github.com/ipfs/kubo/* isn't clickable
bradcarnage opened this issue · 4 comments
Describe the bug
when you search for documentation, and try to click on a github.com/ipfs/kubo/* link, IPFS companion or brave tries to redirect to an IPFS resolver, when in reality it should just load content from github.
To Reproduce
Steps to reproduce the behavior:
- Go to duckduckgo.com
- Search for "ipfs kubo github"
- Click on ipfs/kubo.
- See error about invalid CID
Expected behavior
Redirect to original URL when CID invalid, or give the user the option to stop redirecting this domain upon encountering an error
Desktop Information:
- OS: Windows
- Browser: Brave
- Version: 1.56.11 Chromium: 115.0.5790.102 (Official Build) (64-bit)
- kubo v0.21.0 brave
Additional context
This was a really cool bug when trying to look up documentation and error reports for IPFS kubo :)
This "bugfix" should really just be a policy re-write on how the browser chooses to redirect sites or show error messages.
Ideally IPFS companion or the browser would show the resolution error, and give the user an option to "go to original URL and never redirect /ipfs/ links from this domain again"
Possibly, the browser would simply redirect back to the original page upon a resolution error, without notifying the user, if it's a valid and reachable page on the internet. Although, this may cause the edge-case problem where you have an erroneous redirect, without the user knowing why, when they were expecting to resolve /ipfs/ content from their own gateway.
It's funny how github.com/ipfs/kubo/* matches this criteria, isn't it?
Sort of like shooting yourself in the foot, almost.
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within seven business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
- "Priority" labels will show how urgent this is for the team.
- "Status" labels will show if this is ready to be worked on, blocked, or in progress.
- "Need" labels will indicate if additional input or analysis is required.
Finally, remember to use https://discuss.ipfs.io if you just need general support.
Thanks for submitting this issue @bradcarnage, this is indeed weird. However I'm unable to reproduce this. For me that link on brave takes me to the github repo. ipfs://kubo
seems like a wrong link.
For me clicking on the IPFS
link takes me to ipfs://kubo
which is indeed wrong.
This looks like a bad substitution in brave which seems to be redirecting <host>/ipfs/<cid>
so for https://github.com/ipfs/kubo
or any repo for that matter, the repo becomes the <cid>
. I don't believe this is related to companion.
CC: @lidel what's the best project to open this issue with brave?
I believe this check is not doing it's job well: https://github.com/brave/brave-core/blob/f4a4edd875a3c00201c593506e913200a9207fce/components/ipfs/ipfs_utils.cc#L141
Yes, this is a bug in Brave, already tracked in brave/brave-browser#29078. Closing.
@bradcarnage if you could comment on the brave issue that will be very helpful. 🙏
FYI redirect setting in Brave is separate from the one in companion. Brave setting is opt-in. If you disable redirect in Brave then you will still be able to rely on the redirect provided by ipfs-companion, and the ipfs://kubo
bug should be gone.
@whizzzkid fysa we've talked with Brave that ipfs-companion should have ability read IPFS-related settings, and also modify them. That API is wip (brave/brave-browser#31199) but no ETA yet. Once we have it, companion will be able to disable upstream redirects, ensuring only ones provided by itself are used.