api: paths that are not valid UTF-8 come back changed in JSON
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- go, json
- Ambito
- api, backend-api-design
Direzione di ricerca
The issue identifies Go's encoding/json behavior and says every endpoint that returns paths is affected, but it names no files or tests. Start by locating the API path fields and their JSON serialization, then review the open linked pull request #729 and its discussion. Done means agreeing on a wire format for non-UTF-8 paths, documenting it, and ensuring clients can round-trip the original path bytes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
A tree entry name may hold bytes that are not valid UTF-8 (git accepts any byte except NUL and /). The API returns such a path changed: Go's encoding/json writes each invalid byte as U+FFFD, so a<0xff>b comes back as "a\ufffdb". A client cannot send that path back (for example in grep paths, file?path=, blame?path=), because it no longer names the file. This affects every endpoint that returns paths. Main has the same behavior.
The grep cursor is not affected: it base64-encodes the raw path bytes, so paging still works.
Found
By the clean-context advisor on PR #585 (#583, newline paths in grep), 2026-10-28. The advisor checked the encoding/json behavior. I did not call the API with such a path.
Possible fix
Decide on a wire form for non-UTF-8 paths (for example, an extra base64 field next to path, as some git hosting APIs do), and document it. This is an API design decision.
Trigger
A user report of a path that cannot be read back, or the next API change that adds a path field.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Lingua principale
- Go
- Stelle
- 0
- Fork
- 0
- Merge medio
- 6h 16m
- PR unite (30g)
- 243
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/openstorage
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
coder/openstorage#807 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 49/100
coder/openstorage#806 ·
I maintainer di solito rispondono entro 1 giorno
-
api: merge/preview ignores strategy, squash and allow_unrelated_historiesForse già presa @ThomasK33 l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
coder/openstorage#805 ·
I maintainer di solito rispondono entro 1 giorno
-
githttp: +import remote serves clone and fetch, and its pushes stay out of the normal branch listForse già presa @ThomasK33 l’ha presa oggi. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
coder/openstorage#804 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
api: branches/create ignores expected_target_sha, so a guarded create or move can overwrite a branchForse già presa @ThomasK33 l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
coder/openstorage#803 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di coder/openstorage
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
coder/coder-logstream-kube#255 · 1 commento ·
-
[FEATURE]: 录入 AIDEV Agent Package v1 接入参考文档Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertakind/features
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
TencentBlueKing/bk-nodemgr#3991 ·
I maintainer di solito rispondono entro 1 giorno
-
meta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
last9/last9-mcp-server#554 ·
I maintainer di solito rispondono entro 1 giorno