Go SDK: validate personal access token name length before serialization
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Bug description
In foreign/go/internal/command/access_token.go, the Go SDK does not validate personal access token name lengths in CreatePersonalAccessToken or DeletePersonalAccessToken.
The server’s WireName type requires names to contain 1–255 bytes, as defined in core/binary_protocol/src/primitives/identifier.rs.
Both Go commands serialize invalid names without returning an error:
- Empty names produce a zero length prefix, which the server rejects.
- Names longer than 255 bytes cause
byte(len(c.Name))to wrap while the full name is still written. For example, a 256-byte name produces a zero length prefix, which the server rejects.
Affected area / component
Go SDK
Related pull request
Follow-up to the review of #4640.
Reproduction
Call MarshalBinary() on either command with:
- Name: ""
- Name: strings.Repeat("t", 256)
Both return a request body without an error, but the server rejects these requests.
Proposed solution
Validate the name’s byte length before serialization in both commands and return an error when it falls outside the 1–255 range. Follow the existing name-length validation pattern in foreign/go/internal/command/update_resource.go.
Contribution
- I'm willing to submit a pull request to fix this bug
Good first issue
- I think this could be a good first issue for a new contributor
- Lingua principale
- Rust
- Stelle
- 5.2k
- Fork
- 502
- Merge medio
- 2g 21h
- PR unite (30g)
- 159
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un 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 apache/iggy
-
Go examples: add a message envelope producer and consumerForse già presa @ThunderGod77 l’ha presa 4 giorni fa. Apertago good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
apache/iggy#4694 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
HTTP client treats a consumer group as a plain consumerForse già presa @mohitduhan19 l’ha presa 22 giorni fa. Apertabug rust server
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/iggy#4408 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Add the fail-fast connection option to the Rust and Python quick-startsForse già presa @QIW9 l’ha presa 10 giorni fa. Apertadocs good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
apache/iggy#4261 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
ResourceNotFound from the binary protocol prints an empty keyForse già presa @xalestar l’ha presa 1 giorno fa. Apertaapi python rust
apache/iggy#4767 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Node SDK: send accepts malformed user headers that fail during pollingForse già presa @Subham-KRLX l’ha presa 2 giorni fa. Apertabug good first issue javascript
apache/iggy#4750 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
bug order-flow studies ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
userFRM/egui-charts#2417 ·
I maintainer di solito rispondono entro 1 giorno
-
In a plain-text message, Font, Font Size, Font Color and Text Highlight Color stay liveForse già presa @ragelfundionctrumnar l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
UCS-Care-Group/mailcraft#862 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
smoltcp-rs/smoltcp#1243 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 4 giorni