Skip to content

resolve-type=false not working for ls in API #3231

@dokterbob

Description

@dokterbob

Version information:

go-ipfs version: 0.4.3-rc4-db509ec
Repo version: 4
System version: amd64/darwin
Golang version: go1.7.1

Type: bug

Priority: P3

Description:

In order to make link resolution for files relatively fast (to work around #3120), it should be possible to use the API equivalent of --resolve-type=false on the ls command. However, requesting a URL of the form /api/v0/ls?arg=<really_good_hasj>&resolve-type=false happily returns type information.

The likely perpetrator would be the command argument parsing in https://github.com/ipfs/go-ipfs/blob/master/commands/http/parse.go, where arguments are (very) generically parsed to be interpreted as shell commands. As it seems to work for other arguments, it might be related to the - in flag.

I have also tried with resolve-type, resolvetype and resolve_type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)status/deferredConscious decision to pause or backlogtopic/apiTopic api

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions