Commit Graph

636 Commits

Author SHA1 Message Date
Marten Seemann
c95d6ca08c update go-libp2p to v0.15.0-rc.1 2021-08-19 18:05:04 +02:00
Steven Allen
7c76118b0b
Merge pull request #8318 from ipfs/fix/path-panic
fix: avoid out of bounds error when rendering short hashes
2021-08-13 14:54:25 -07:00
Adrian Lanzafame
02823935aa feat: register first block metric by default 2021-08-07 15:48:22 -04:00
Steven Allen
66a76d27f3 fix: abort when we fail to resolve CIDs
I believe we figured that these were for "informational purposes", but
really, we _should_ always be able to resolve names to CIDs. If we
can't, there's probably something wrong with the directory.
2021-07-30 11:36:23 -07:00
Steven Allen
0858dc62aa fix: avoid panic on short hash
(caught higher up but should still be fixed)
2021-07-30 11:33:53 -07:00
Marcin Rataj
c7444fb61a feat: webui v2.12.4 2021-07-15 08:21:50 -07:00
Marcin Rataj
2c431eb825 fix: webui-2.12.3
This bumps webui to bugfix release based on feedback from 0.9.0-rc1:
https://github.com/ipfs/ipfs-webui/releases/tag/v2.12.3
2021-05-24 08:25:40 -07:00
Marcin Rataj
28d4d9b327 refactor: add isDomainNameAndNotPeerID
This ensures we exclude valid PeerIDs from code paths that require
DNSLink names.

Ref.
https://github.com/ipfs/go-ipfs/pull/8071#pullrequestreview-639409245
2021-05-13 10:54:40 -04:00
divingpetrel
24dd662d38 feat support non-ICANN DNS 2021-05-13 10:54:38 -04:00
Marten Seemann
473d7d5851 update quic-go to v0.21.0-rc.1 2021-05-12 19:17:52 -04:00
Marcin Rataj
a9868105f0
feat: ipfs-webui v2.12.2
https://github.com/ipfs/ipfs-webui/releases/tag/v2.12.2
2021-04-30 16:12:21 +02:00
Steven Allen
a006ded010 chore: update webui to 2.12.1 2021-04-28 11:00:45 -07:00
Marcin Rataj
9f8964e6f9
fix(gw): remove hardcoded hostnames
This closes #7317 by removing hardcoded PL hostnames from default
config, making the localhost the only implicit gateway hostname.
2021-04-12 18:03:44 +02:00
Steven Allen
4cdb67f37d
Merge pull request #7890 from ipfs/fix/remove-clear-site-data
fix(gw): remove use of Clear-Site-Data in subdomain router
2021-03-31 16:24:24 -07:00
Steven Allen
0a3f88823c
Merge pull request #7994 from ipfs/chore/deprecate-pathprefixes
chore: deprecate Gateway.PathPrefixes
2021-03-30 15:52:02 -07:00
Marcin Rataj
2f105f79b9
chore: deprecate Gateway.PathPrefixes
Context:
https://github.com/ipfs/go-ipfs/issues/7702#issuecomment-803136077
2021-03-30 21:17:41 +02:00
Steven Allen
d30f1e5d44
Merge pull request #7930 from ipfs/fix/redundant-ns-on-gateway
feat(gw): /ipfs/ipfs/{cid} → /ipfs/{cid}
2021-03-24 13:12:16 -07:00
Marcin Rataj
763a120ed2
fix: no fixup if X-Ipfs-Gateway-Prefix is present
https://github.com/ipfs/go-ipfs/pull/7930#discussion_r597976690
2021-03-20 00:00:58 +01:00
Marcin Rataj
a35ffee136
refactor: safer query handling
https://github.com/ipfs/go-ipfs/pull/7930#discussion_r597246135
2021-03-18 23:48:53 +01:00
Marcin Rataj
450baef0e9
refactor: explicit prefix check
https://github.com/ipfs/go-ipfs/pull/7930#discussion_r584001161
2021-03-18 21:48:04 +01:00
Marcin Rataj
b81b7549d3
refactor: addressing review
- moved to separate utility function
- return Bad Request error
- improved escaping of values passed via URL path
2021-03-18 21:22:07 +01:00
lanzafame
4ba03fa8df revert registration of metrics against unexposed prom registry 2021-03-17 10:15:42 +10:00
Hector Sanjuan
3db9551f79 Extract the namesys and the keystore submodules
Namesys is a very useful submodule. Given a ValueStore and a Datastore it can
resolve and publish /ipns/ paths.

This functionality does not need to be sequestered inside go-ipfs as it can
and should be used without IPFS, for example, for implementing lightweight
IPNS publishing services or for resolving /ipns/ paths.

"keystore" extraction was necessary, as there is a dependency to it in
namesys. Keystore is also a useful module by itself within the stack.

Fixes #6537
2021-03-12 14:09:36 -05:00
Marcin Rataj
dae7387584
refactor: show error, delay redirect
This implements error page that does not hide the problem,
but still redirects to a valid path after short delay:
https://github.com/ipfs/go-ipfs/pull/7930#issuecomment-786882748
2021-02-27 00:57:05 +01:00
Marcin Rataj
15e3732afd
feat(gw): /ipfs/ipfs/{cid} → /ipfs/{cid}
This will try to recover from invalid paths like  /ipfs/ipfs/{cid}
and redirect to proper one, when possible.
2021-02-20 00:09:17 +01:00
Marcin Rataj
d61ae2bcb4
fix: remove use of Clear-Site-Data
We used Clear-Site-Data to cushion transition period for local gateway
exposed at http://localhost while we were still figuring out
security-related details.

In the final implementation subdomain gateways are not tied to a
hostname explicitly, which removes the risk of cookies leaking,
removing the need for the header.

Turns out it causes issues for Firefox users, so let's just remove it.

Closes https://github.com/ipfs-shipyard/ipfs-companion/issues/977
2021-01-29 22:08:16 +01:00
Marcin Rataj
a0f90d3a14 test: cover 2 remaining lines 2021-01-14 20:53:20 +01:00
Marcin Rataj
abb25a1cfc refactor: remove redundant urlescape
URL.Query() will already decode the query parameters
2021-01-14 20:52:04 +01:00
Marcin Rataj
3de5b14e0c fix: ?uri= url-decode and preserve query
This makes ?uri= param able to process URIs passed by web browsers
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler
2021-01-14 20:52:04 +01:00
Dennis Trautwein
36368ee4dd feat: support requests from registerProtocolHandler
This commit adds support for requests produced by navigator.registerProtocolHandler on gateways. Now one can register `dweb.link` as an URI handler for `ipfs://`:

```
navigator.registerProtocolHandler('ipfs', 'https://dweb.link/ipfs/?uri=%s', 'ipfs resolver')
```

Then opening `ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR` will produce an HTTP GET call to:

```
https://dweb.link/ipfs?uri=ipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
```

The query parameter `uri` will now be parsed and the given content identifier resolved via:

`https://dweb.link/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR`
2021-01-14 20:52:04 +01:00
Marcin Rataj
f932510b88
fix: check if rootID has DNSLink before uninlining
This kinda enables to run their custom DNS resolver with custom
tlds/names that are independent from the public DNS network.
2021-01-14 20:14:35 +01:00
Marcin Rataj
88dd257ace
test: false for isHTTPSRequest
As suggested in
https://github.com/ipfs/go-ipfs/pull/7847#discussion_r551933162
2021-01-08 00:31:46 +01:00
Marcin Rataj
09178aa717
feat(gw): support inlined DNSLink names with TLS
Problem statement and rationale for doing this can be found under
"Option C" at: https://github.com/ipfs/in-web-browsers/issues/169

TLDR is:

`https://dweb.link/ipns/my.v-long.example.com` can be loaded from a
subdomain gateway with a wildcard TLS cert if represented as a single
DNS label: `https://my-v--long-example-com.ipns.dweb.link`
2021-01-01 21:39:42 +01:00
Adin Schmahmann
fb3316ad05 fix: decrease log level of opencensus initialization 2020-12-08 21:46:49 -05:00
lanzafame
024bf80e6a change the scraping url 2020-12-08 20:22:43 -05:00
lanzafame
3d9821260a register quic opencensus metrics 2020-12-08 20:22:38 -05:00
Adin Schmahmann
76f3395ee6 p2p-proxy: earlier peerID validation check 2020-12-01 12:24:18 -05:00
Adin Schmahmann
a329e4fc66 p2p-proxy: better request length checking 2020-12-01 11:01:40 -05:00
Adin Schmahmann
499e011df9
Merge pull request #7699 from ipfs/fix/dnslink-dir-listing
fix(dnslink-gw): breadcrumbs and CID column when dir listing
2020-11-10 15:03:36 -05:00
Adin Schmahmann
0700c74bad
Merge pull request #7727 from ipfs/fix/preserver-query-on-website-redirect
fix(gw): preserve query on website redirect
2020-11-10 14:36:11 -05:00
Adin Schmahmann
675ef92a2a
Merge pull request #7716 from ipfs/feat/webui-v2.11.3
feat: ipfs-webui v2.11.4
2020-11-10 14:21:55 -05:00
Marcin Rataj
d1c20bdff7
fix: localhost API access via ipv6
This adds localhost ipv6 addresses to the allowlist for use in browser
context and fixes WebUI on ipv6-only deployments: http://[::1]:5001/webui

We were missing CORS/Origin tests for API port so I've added basic ones
and included localhost/127.0.0.1/::1 variants.
2020-10-20 00:46:40 +02:00
Marcin Rataj
6ffd0aa22e
fix(gw): preserve query on website redirect 2020-10-14 00:46:57 +02:00
Marcin Rataj
f62656630b
feat: ipfs-webui v2.11.4 2020-10-07 15:01:32 +02:00
Marcin Rataj
00147106f4
feat: ipfs-webui v2.11.3
https://github.com/ipfs-shipyard/ipfs-webui/releases/tag/v2.11.3
2020-10-06 19:57:18 +02:00
Adin Schmahmann
9c60ad89de
Merge pull request #7703 from rafaelramalho19/chore/bump-go-ipfs
chore: webui v2.11.2
2020-10-02 11:53:09 -04:00
Adin Schmahmann
9b1171d427
Merge pull request #7677 from ipfs/feat/content-disposition-attachment
feat(gateway): Content-Disposition improvements
2020-10-02 11:20:11 -04:00
Marcin Rataj
3ed46d995f
test(gw): add t0115-gateway-dir-listing.sh to sharness
This adds proper end-to-end tests for directory listing on Gateway port
that protects us against regressions oni each gw type:
- path gateway
- subdomain gateway
- dnslink website gateway

Tests cover:
- etag/unicode support
- breadcrumbs
- file name column
- hash column
2020-09-29 02:27:28 +02:00
Marcin Rataj
c94bd768d2
fix(gw): links in CID column on dir listing
This switches go-ipfs to dir-index-html after
https://github.com/ipfs/dir-index-html/pull/43
got merged to master
2020-09-28 23:12:47 +02:00
Rafael Ramalho
43b8a314f1 chore: bump webui version 2020-09-28 18:10:23 +01:00