1. 05 Apr, 2020 1 commit
    • Hector Sanjuan's avatar
      HTTP API: Disallow GET requests on API · 1b490476
      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: default avatarSteven Allen <steven@stebalien.com>
      Co-Authored-By: default avatarMarcin Rataj <lidel@lidel.org>
      1b490476
  2. 31 Mar, 2020 1 commit
    • Steven Allen's avatar
      fix: remove internal relay discovery · 06ba6d0f
      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.
      06ba6d0f
  3. 25 Mar, 2020 1 commit
  4. 20 Mar, 2020 1 commit
  5. 18 Mar, 2020 3 commits
  6. 17 Mar, 2020 1 commit
  7. 15 Mar, 2020 1 commit
  8. 13 Mar, 2020 1 commit
  9. 12 Mar, 2020 1 commit
  10. 09 Mar, 2020 1 commit
  11. 26 Feb, 2020 1 commit
  12. 18 Feb, 2020 1 commit
    • Steven Allen's avatar
      test(sharness): test our tests · 6e8c25ea
      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.
      6e8c25ea
  13. 17 Jan, 2020 1 commit
  14. 08 Jan, 2020 2 commits
    • Steven Allen's avatar
      feat(commands/cid): add a flag for setting the codec · e58a32ab
      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.
      e58a32ab
    • Steven Allen's avatar
  15. 06 Jan, 2020 1 commit
  16. 25 Dec, 2019 1 commit
  17. 23 Dec, 2019 6 commits
  18. 17 Dec, 2019 1 commit
  19. 14 Dec, 2019 1 commit
  20. 05 Dec, 2019 3 commits
  21. 25 Nov, 2019 1 commit
    • Oli Evans's avatar
      fix: ignore nonexistant when force rm · 25694d02
      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: default avatarOli Evans <oli@tableflip.io>
      25694d02
  22. 15 Nov, 2019 1 commit
  23. 29 Oct, 2019 3 commits
  24. 08 Oct, 2019 1 commit
  25. 07 Oct, 2019 2 commits
  26. 01 Oct, 2019 2 commits