- 05 Apr, 2020 1 commit
-
-
Hector Sanjuan authored
This commit upgrades go-ipfs-cmds and configures the commands HTTP API Handler to only allow POST/OPTIONS, disallowing GET and others in the handling of command requests in the IPFS HTTP API (where before every type of request method was handled, with GET/POST/PUT/PATCH being equivalent). The Read-Only commands that the HTTP API attaches to the gateway endpoint will additional handled GET as they did before (but stop handling PUT,DELETEs). By limiting the request types we address the possibility that a website accessed by a browser abuses the IPFS API by issuing GET requests to it which have no Origin or Referrer set, and are thus bypass CORS and CSRF protections. This is a breaking change for clients that relay on GET requests against the HTTP endpoint (usually :5001). Applications integrating on top of the gateway-read-only API should still work (including cross-domain access). Co-Authored-By: Steven Allen <steven@stebalien.com> Co-Authored-By: Marcin Rataj <lidel@lidel.org>
-
- 31 Mar, 2020 1 commit
-
-
Steven Allen authored
This logic collects a list of known relays by testing every new connection. It exists so we can dial /p2p-circuit/p2p/QmFoobar addresses (circuit addresses that don't specify the relay). However, this kind of address is useless outside of basic demos as a random relay is practically guaranteed to not be connected to the target peer. Picking a random relay to connect to some peer is almost _never_ the desired behavior.
-
- 25 Mar, 2020 1 commit
-
-
Steven Allen authored
This isn't a real autonat test, but it's a regression test to make sure we don't blatantly break this.
-
- 20 Mar, 2020 1 commit
-
-
Cornelius Toole authored
- add the `gitignore` or `ignore options to the add command
-
- 18 Mar, 2020 3 commits
-
-
Steven Allen authored
-
Marcin Rataj authored
When request is sent to http://localhost:8080/ipfs/$cid response has HTTP 301 status code and "Location" header with redirect destination at $cid.ipfs.localhost:8080 Redirect is followed by browsersi, but not by commandline tools. Status 301 is ignored by curl in default mode: it will print response and won't follow redirect, user needs to add -L for that. To fix curl, we return correct payload in body of HTTP 301 response, but set Clear-Site-Data header to ensure Origin sandbox can't be abused. This requires a surgical workaround: If Location header is present in ResponseWriter's Header map, we ensure http.ServeContent() returns HTTP 301 Context: https://github.com/ipfs/go-ipfs/pull/6982 License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
-
Marcin Rataj authored
License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
-
- 17 Mar, 2020 1 commit
-
-
Peter Rabbitson authored
Still throws an error when a pipe is encountered during directory recursion
-
- 15 Mar, 2020 1 commit
-
-
Peter Rabbitson authored
Before starting each individual test check if a daemon is present with a trash* directory as its workdir. Exit with failure if this is the case.
-
- 13 Mar, 2020 1 commit
-
-
Steven Allen authored
Go-ipfs user agents usually look like go-ipfs/VERSION/COMMIT_or_EMPTY. However, we changed this to /go-ipfs/VERSION(/COMMIT)? on master for a while. This change reverts this to make parsing the user agent simpler. Co-Authored-By: Oli Evans <oli@tableflip.io>
-
- 12 Mar, 2020 1 commit
-
-
Peter Rabbitson authored
-
- 09 Mar, 2020 1 commit
-
-
Steven Allen authored
-
- 26 Feb, 2020 1 commit
-
-
Steven Allen authored
-
- 18 Feb, 2020 1 commit
-
-
Steven Allen authored
Make sure they: 1. Report that they're done. Otherwise, we'll silently succeed. 2. Have a description. 3. Make sure we cleanup IPFS.
-
- 17 Jan, 2020 1 commit
-
-
Steven Allen authored
-
- 08 Jan, 2020 2 commits
-
-
Steven Allen authored
This will be useful when testing `refs local, `repo gc`, and `repo verify` commands once we store blocks by multihash instead of by CID. At that point, these commands will return raw v1 CIDs as the blockstore won't actually remember the codec used to store the block. Flags choice: * Ideally, we'd use the `-f, --format` flags like every other command but we're already using `-f` (format) for the format string. * Alternatively, I'd like to use `-c`. However, we're using _that_ for a global `--config` flag (bit of a waste given that it doesn't work...). `--codec` will have to do for now.
-
Steven Allen authored
-
- 06 Jan, 2020 1 commit
-
-
Steven Allen authored
-
- 25 Dec, 2019 1 commit
-
-
flowed authored
-
- 23 Dec, 2019 6 commits
-
-
Peter Rabbitson authored
-
Peter Rabbitson authored
Without reflecting this in the tests we do not actually shut down correctly during cleanup
-
Peter Rabbitson authored
Some did actually prevent proper test shutdown
-
Peter Rabbitson authored
Set this to '1' if you are doing local dev and have redirects in go.mod
-
Peter Rabbitson authored
Docker on a mac might be available, but may not be runnng. The way the original test was written is linux-specific anyway, so just hoist the check into the DOCKER declaration
-
Peter Rabbitson authored
54b1969c correctly switched from nc to socat, but did not account for it not being as widely available. Adjust tests that depend on it with the correct message. There are also a number of comments pertaining to nc - they were not adjusted.
-
- 17 Dec, 2019 1 commit
-
-
Marcin Rataj authored
Introduces hardening proposed in: https://github.com/ipfs/go-ipfs/issues/4025#issuecomment-342250616 License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
-
- 14 Dec, 2019 1 commit
-
-
Steven Allen authored
-
- 05 Dec, 2019 3 commits
-
-
Steven Allen authored
Otherwise, we have port conflicts and other issues.
-
Steven Allen authored
-
Adin Schmahmann authored
-
- 25 Nov, 2019 1 commit
-
-
Oli Evans authored
- Make `ipfs files rm --force /nonexistant` succeed when the path does not exist. - Add shaness test for removing nonexistant paths - Refactor duplicated code to find a parent dir into a function I've been writing scripts against the files api, and having to stat things before removing them is a pain. So this PR aims to make --force do what I'd expect it to. License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
-
- 15 Nov, 2019 1 commit
-
-
Steven Allen authored
-
- 29 Oct, 2019 3 commits
-
-
Steven Allen authored
Just make sure we've removed all the blocks. We can't guarantee that the size will revert.
-
Steven Allen authored
-
Steven Allen authored
Write the PID file after listening.
-
- 08 Oct, 2019 1 commit
-
-
Steven Allen authored
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes #4650
-
- 07 Oct, 2019 2 commits
-
-
Steven Allen authored
-
Jakub Sztandera authored
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
-
- 01 Oct, 2019 2 commits
-
-
Steven Allen authored
We no longer spit out the annoying http error.
-
Steven Allen authored
All the work was client-side. Unix domain socket multiaddrs already worked server-side. fixes #4218
-