Commit Graph

642 Commits

Author SHA1 Message Date
Stephen Whitmore
3876f1b98e More thorough ipfs add test.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-04-12 13:03:11 -07:00
Stephen Whitmore
d30152cfe9 Adds tests for "ipfs add -rn"
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-04-12 13:03:11 -07:00
Jeromy Johnson
6c8bebbedd Merge pull request #2257 from ipfs/feat/promise-fail
allow promises to fail
2016-04-12 11:52:13 -07:00
Jeromy
5a0b6e593a small sharness test for promise failure checking
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-04-12 11:21:34 -07:00
Jeromy
bdc5456d52 update libp2p dep to fix hanging listeners problem
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-11 12:52:54 -07:00
Jeromy
e9edd2d884 use nc -w instead of -q because osx is slow
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-07 15:55:41 -07:00
Jeromy
42455d27b3 multistream tests use data from file
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-07 15:55:41 -07:00
Jeromy
3148f4c34f fix tests that check swarm port knocking
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-07 15:55:41 -07:00
Jeromy
8f3a51ac42 switch to new libp2p with mss crypto
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-07 15:55:41 -07:00
Jeromy
e661832575 hide fd adjusting code behind daemon feature flag
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-07 07:41:09 -07:00
Lars Gierth
09937f84b6 gateway: enforce allowlist for path prefixes
The gateway accepts an X-Ipfs-Path-Prefix header,
and assumes that it is mounted in a reverse proxy
like nginx, at this path. Links in directory listings,
as well as trailing-slash redirects need to be rewritten
with that prefix in mind.

We don't want a potential attacker to be able to
pass in arbitrary path prefixes, which would end up
in redirects and directory listings, which is why
every prefix has to be explicitly allowed in the config.

Previously, we'd accept *any* X-Ipfs-Path-Prefix header.

Example:

We mount blog.ipfs.io (a dnslink page) at ipfs.io/blog.

nginx_ipfs.conf:

    location /blog/ {
        rewrite "^/blog(/.*)$" $1 break;
        proxy_set_header Host blog.ipfs.io;
        proxy_set_header X-Ipfs-Gateway-Prefix /blog;
        proxy_pass http://127.0.0.1:8080;
    }

.ipfs/config:

    "Gateway": {
        "PathPrefixes": ["/blog"],
        // ...
    },

dnslink:

    > dig TXT _dnslink.blog.ipfs.io
    dnslink=/ipfs/QmWcBjXPAEdhXDATV4ghUpkAonNBbiyFx1VmmHcQe9HEGd

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-04 16:31:57 -04:00
Jeromy
9f75ac4d75 update utp and cleanup more godeps along the way
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-29 19:18:14 -07:00
Jeromy
e9b1fe4cef clean up dependencies
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-23 11:54:26 -07:00
Jeromy Johnson
573b191df2 Merge pull request #2465 from ipfs/fix/double-encoding-header
fix double transfer encoding header problem
2016-03-15 10:22:14 -07:00
Jeromy Johnson
655804c5ef fix whitespace trimming
License: MIT
Signed-off-by: Jeromy Johnson <why@ipfs.io>
2016-03-14 16:36:31 -07:00
Jeromy Johnson
850602361d fix double transfer encoding head problem
License: MIT
Signed-off-by: Jeromy Johnson <why@ipfs.io>
2016-03-14 16:26:49 -07:00
Jeromy Johnson
102a6dde22 Merge pull request #2451 from ipfs/t0300-improve-debug-message
t0300: improve docker_build debug message
2016-03-14 16:15:59 -07:00
Jeromy Johnson
286a5968c5 Merge pull request #2430 from diasdavid/feat/repo-stat
Feature: `ipfs repo stat`
2016-03-11 12:51:11 -08:00
Jeromy
97d583dd8f update libp2p dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-09 09:53:19 -08:00
Jeromy
d8be357087 add new test to show problem
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-09 09:50:00 -08:00
Christian Couder
94083ae624 t0300: improve docker_build debug message
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-03-07 10:35:52 +01:00
David Dias
c10e329b78 repo-stat
License: MIT
Signed-off-by: David Dias <daviddias.p@gmail.com>
2016-03-04 23:45:03 +00:00
Jeromy
7072dab396 grab daemon pid into its own variable
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-03 22:47:50 -08:00
Jeromy
63a9ed202c make t0060 use port zero
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-02 15:00:04 -08:00
Stephen Whitmore
f4367f6831 t0031: ensure iptb init happens
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-02-29 16:05:48 -08:00
Stephen Whitmore
b66e089ec1 trailing whitespace
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-02-29 16:05:48 -08:00
Stephen Whitmore
b4bd604426 uses iptb exclusively for mount-publish test
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-02-29 16:05:48 -08:00
Stephen Whitmore
0afbd1857f Prevents 'ipfs name publish' when /ipns is mounted.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-02-29 16:05:48 -08:00
Jeromy Johnson
922ad3cde5 Merge pull request #2392 from ipfs/std-err-msg-prereq
sharness: replace POSIX prereq with STD_ERR_MSG
2016-02-29 15:11:17 -08:00
Jeromy Johnson
dede20eab4 Merge pull request #2384 from ipfs/feat/dag-refactor
refactor merkledag fetching methods
2016-02-29 10:04:34 -08:00
Stephen Whitmore
2f64de0d61 Uses preset API_MADDR and GWAY_ADDR globals.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-02-23 13:22:58 -08:00
Stephen Whitmore
c342d57347 Updates uses of *_ADDR -> *_MADDR
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-02-23 13:22:58 -08:00
Stephen Whitmore
31f4ef02c2 Use test_launch_ipfs_daemon
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-02-23 13:22:58 -08:00
Stephen Whitmore
597d684160 Adds arbitrary port support to t0060-daemon.sh.
Removes all of the hardcoded ports and defaults to non-standard API,
Gateway, and Swarm ports.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-02-23 13:22:58 -08:00
Jeromy Johnson
f630f9d92a Merge pull request #2382 from ipfs/fix/mfs-truncate
fix minor mfs truncate bug
2016-02-23 10:42:06 -08:00
Christian Couder
00e03404d8 sharness: replace POSIX prereq with STD_ERR_MSG
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-22 22:13:30 +01:00
Christian Couder
73e76dca56 files: make 'files ls' defaults to /
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-22 19:15:49 +01:00
Jeromy
d2931d70a6 fix test now that dag batches can more properly fail
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-20 16:21:04 -08:00
Jeromy
973707a884 fix minor mfs truncate bug
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-19 18:57:41 -08:00
Jeromy Johnson
662625318a Merge pull request #2374 from ipfs/t0062-indentation-fix
t0062: fix indentation
2016-02-19 08:42:08 -08:00
Christian Couder
c6a7b51f0c t0062: fix indentation
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-19 04:24:12 +01:00
Christian Couder
ad71b15e36 sharness: remove xt0130-multinode.sh
xt0130 test is already in as t0130.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-19 03:32:07 +01:00
Christian Couder
fa57fb7349 sharness: remove x0045-add-cat-iptb.sh
x0045 can be removed since we do the same stuff in other tests.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-19 03:31:39 +01:00
Jeromy
11f9e7f647 add a pause to fix timing on t0065
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-15 19:16:03 -08:00
Jeromy Johnson
6b76e2a41a Merge pull request #2319 from ipfs/cleanup/gx-godeps
use gx vendored packages instead of godeps ones
2016-02-13 14:46:19 -08:00
Jeromy
d7dab3afea Use gx vendored go-ipfs-utils where possible
For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
Christian Couder
ce5eac46d4 t0020: improve error message
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-12 17:20:23 -08:00
Christian Couder
7d80512a4c test-lib: add test_path_cmp()
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-12 17:20:23 -08:00
Christian Couder
ea8d8aaa13 appveyor: use a POSIX prereq
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-12 17:20:23 -08:00
Jeromy
0c7595b65b Use port zero for all ipfs daemon addresses in sharness testing
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 14:04:32 -08:00