Skip to content

Commit

Permalink
fix: escape HTML in error response body
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Nov 27, 2020
1 parent 9ff07fa commit 8f89163
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -51,7 +51,7 @@ require (
github.com/ipfs/go-metrics-prometheus v0.0.2
github.com/ipfs/go-mfs v0.1.2
github.com/ipfs/go-path v0.0.8
github.com/ipfs/go-pinning-service-http-client v0.0.0-20201119193934-34aa0b8a7959
github.com/ipfs/go-pinning-service-http-client v0.0.0-20201127004627-34a6066675f7
github.com/ipfs/go-unixfs v0.2.4
github.com/ipfs/go-verifcid v0.0.1
github.com/ipfs/interface-go-ipfs-core v0.4.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -454,8 +454,8 @@ github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3
github.com/ipfs/go-peertaskqueue v0.1.1/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U=
github.com/ipfs/go-peertaskqueue v0.2.0 h1:2cSr7exUGKYyDeUyQ7P/nHPs9P7Ht/B+ROrpN1EJOjc=
github.com/ipfs/go-peertaskqueue v0.2.0/go.mod h1:5/eNrBEbtSKWCG+kQK8K8fGNixoYUnr+P7jivavs9lY=
github.com/ipfs/go-pinning-service-http-client v0.0.0-20201119193934-34aa0b8a7959 h1:+7p/zpQWfElnHKzbjzks7VRuQtnUg2+8FhX43hyf8c8=
github.com/ipfs/go-pinning-service-http-client v0.0.0-20201119193934-34aa0b8a7959/go.mod h1:7aOggtq0hGoNLsv5pV7zfvrDDaqqNd1/GxdnS4MkSZA=
github.com/ipfs/go-pinning-service-http-client v0.0.0-20201127004627-34a6066675f7 h1:2rh10QEOOES5g5W+n+e/NAMQmw2OAml3ZKyjgFeC6B8=
github.com/ipfs/go-pinning-service-http-client v0.0.0-20201127004627-34a6066675f7/go.mod h1:7aOggtq0hGoNLsv5pV7zfvrDDaqqNd1/GxdnS4MkSZA=
github.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8=
github.com/ipfs/go-unixfs v0.1.0/go.mod h1:lysk5ELhOso8+Fed9U1QTGey2ocsfaZ18h0NCO2Fj9s=
github.com/ipfs/go-unixfs v0.2.4 h1:6NwppOXefWIyysZ4LR/qUBPvXd5//8J3jiMdvpbw6Lo=
Expand Down
5 changes: 0 additions & 5 deletions test/sharness/t0700-remotepin.sh
Expand Up @@ -101,17 +101,14 @@ test_expect_success "check connection to test pinning service" '
ipfs pin remote ls --service=test_pin_svc --enc=json
'

# TODO: improve error returned below
test_expect_success "unathorized pinning service calls fail" '
test_expect_code 1 ipfs pin remote ls --service=test_invalid_key_svc
'

# TODO: improve error returned below
test_expect_success "misconfigured pinning service calls fail (wrong path)" '
test_expect_code 1 ipfs pin remote ls --service=test_invalid_url_path_svc
'

# TODO: improve error returned below (panic when offline mode)
test_expect_success "misconfigured pinning service calls fail (dns error)" '
test_expect_code 1 ipfs pin remote ls --service=test_invalid_url_dns_svc
'
Expand Down Expand Up @@ -182,7 +179,6 @@ test_remote_pins() {
test_expect_code 0 grep -q $HASH_B ls_out
'

# TODO: this does not seem to find $HASH_MISSING
test_expect_success "'ipfs pin remote ls' for existing pins by multiple statuses" '
ipfs pin remote ls --service=test_pin_svc --enc=json --status=queued,pinning,pinned,failed | tee ls_out &&
test_expect_code 0 grep -q $HASH_A ls_out &&
Expand All @@ -205,7 +201,6 @@ test_remote_pins() {
test_expect_code 0 grep -q $HASH_A ls_out
'

# TODO: this does not seem to find $HASH_MISSING
test_expect_success "'ipfs pin remote ls' for ongoing pins by status" '
ipfs pin remote ls --service=test_pin_svc --status=queued,pinning | tee ls_out &&
test_expect_code 0 grep -q $HASH_MISSING ls_out
Expand Down

0 comments on commit 8f89163

Please sign in to comment.