Go SDK: validate personal access token name length before serialization
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- Rust
- Estrellas
- 5.2k
- Forks
- 516
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 155
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/iggy
-
Go examples: add a message envelope producer and consumerPosiblemente ocupada @ThunderGod77 la tomó hace 6 días. Abiertogo good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/iggy#4694 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
HTTP client treats a consumer group as a plain consumerPosiblemente ocupada @mohitduhan19 la tomó hace 24 días. Abiertobug rust server
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
apache/iggy#4408 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Add the fail-fast connection option to the Rust and Python quick-startsPosiblemente ocupada @QIW9 la tomó hace 11 días. Abiertodocs good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
apache/iggy#4261 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
ResourceNotFound from the binary protocol prints an empty keyPosiblemente ocupada @xalestar la tomó hace 2 días. Abiertoapi python rust
apache/iggy#4767 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
CI/CD connectors
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/iggy
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
RustCrypto/utils#1597 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Non-`main` default branchesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
max-sixty/worktrunk#4727 · 7 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
follow-up
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
carrick-sh/carrick#1859 ·
Los mantenedores suelen responder en 1 día