ipfs / ipfs/kubo

ipfs api ignores content-transfer-encoding header

Open
#1,714 1 comment 0 reactions 0 assignees View on GitHub
kind/bug topic/gateway
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

I tried `POST`ing a `multipart/form-data` request to the ipfs http api which contained a part with base64 encoded content:

```
--=====8252e0e51c6346e395185d392e7a7502=====
Content-Type: image/png
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-disposition: file; filename="sample/screenshot.png"

iVBORw0KGgoAAAANSUhEUgAAAGQAAAA8CAIAAAAfXYiZAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
[...]
```

If IPFS isn't going go handle the `Content-transfer-encoding` header
then it should reject the request, rather than silently accepting it
and storing the base64 encoded content.

Contributor guide

Open the contributing guide

Research direction

Start by tracing Kubo's HTTP API handling for multipart/form-data uploads and reproduce the request described in the issue. Check how the Content-Transfer-Encoding header is treated; done means the API no longer silently stores base64 text as file content and instead handles or rejects the encoding explicitly.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.