-
Notifications
You must be signed in to change notification settings - Fork 490
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
Share Link incorrectly gives path routed instead of subdomain routed URL. #2244
Comments
Thanks @milahu this sounds like a good feature to have, the reason it doesn't have it today is because not all gateways support subdomain gateways. The default gateway does, but that's not the norm. I think we can implement a simple check to validate if the server supports subdomain gatways and then generate those links. I'll mark this as a backlog item. |
I'm working on fixing this issue I'm currently working on a fork of ipfs-webui https://github.com/ipfs/ipfs-webui at https://github.com/acul71/ipfs-webui-fork.
Should there be a preference setting to enable or disable Subdomain Gateway URLs? |
@acul71 thank you for looking into this. Note that sending Is your intention to avoid this redirect when default is changed to subdomain gateway like Note that the current default in ipfs-webui is still ipfs-webui/src/bundles/gateway.js Line 3 in 27bea32
So the users by default will not benefit from your check. Changing the default here would do the trick. But, there is a problem with using As prior art, IPFS Companion is bit further in the migration, and has two settings: Perhaps ipfs-webui should have something similar, with extra check to decide which one to use, based on shared CID:
Thoughts? |
@lidel Thank you for your detailed response. I agree with your suggestion that "ipfs-webui should have something similar, with an extra check to decide which gateway to use based on the shared CID." I'll proceed in this direction. Thanks for the guidance! |
Hello there. Are the labels ok? |
I think the labels are decent, but they feel a little too similar. Maybe we need a disclaimer saying that certain content that doesn't need origin-isolation for the subdomain gateway input.
I think a simple test on the use of those config items would be most important. Then two basic tests ensuring the reset and submit buttons work.
Here is a very long CID v1 (using sha3-512): https://explore.ipld.io/#/explore/bagaaifcavabu6fzheerrmtxbbwv7jjhc3kaldmm7lbnvfopyrthcvod4m6ygpj3unrcggkzhvcwv5wnhc5ufkgzlsji7agnmofovc2g4a3ui7ja |
… gateway support, and refactored tests.
Fix issue ipfs#2244 Share Link incorrectly gives path routed instead of subdomain routed URL
@acul71 are you using AI or some GUI tools? That PR makes no sense (it merges from What you want to do is to open PR from your form into this repository. |
…s, refactored image check code, and simplified settings text.
Describe the bug
When you right click on a file in Files and choose "Share Link" you are given a URL like
https://<host>/ipfs/<cid>
. This should be of the formhttps://<cid>.ipfs.<host>
for security reasons.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Subdomain routing is always used.
Additional context
Path routing is known to be insecure for websites that use cookies, local storage, etc. This is well documented in the IPFS documentation and the documentation and security experts all recommend using subdomain routing whenever possible (which is almost always possible). These share links are encouraging people to share URLs that are insecure by default, and we should instead be using subdomain by default.
The text was updated successfully, but these errors were encountered: