[BUG] NAMESPACE accepts extra arguments instead of returning BAD
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
Línea de trabajo
Lee el despacho de NAMESPACE en internal/server/connection.go, su handler en internal/server/extension/extension.go y el helper de pruebas y las pruebas existentes en internal/server/testing_interface.go. Sigue el patrón indicado en #263 y #260: pasa las partes tokenizadas y rechaza los argumentos adicionales antes de realizar cualquier otro trabajo. Añade una prueba para A1 NAMESPACE extra que compruebe la respuesta BAD y confirme que no se realizó ningún otro trabajo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Steps to Reproduce
- Connect to the IMAP server and log in.
- Send
NAMESPACEwith an extra argument, e.g.A1 NAMESPACE extra.
Expected Behavior
RFC 2342 defines NAMESPACE with no arguments, so a command with extra arguments is malformed and the server should reply A1 BAD NAMESPACE takes no arguments without doing anything else.
Actual Behavior
The dispatcher in internal/server/connection.go calls extension.HandleNamespace without passing the tokenized parts, so the handler (internal/server/extension/extension.go) can't see the extra arguments. It ignores them and runs the command as normal.
Impact: A1 NAMESPACE extra returns the * NAMESPACE response and OK instead of BAD.
Relevant Logs / Screenshots
Same bug as #263 (NOOP, fixed in #315) and #260 (CAPABILITY). The fix follows the same pattern:
- Pass
partsfromhandleClientininternal/server/connection.gotoextension.HandleNamespace. - At the top of the handler, if
len(parts) > 2, send<tag> BAD NAMESPACE takes no argumentsand return before any other work. - Update the test helper in
internal/server/testing_interface.goand the existing tests to the new signature. - Add a test for
A1 NAMESPACE extrathat checks for theBADreply and that nothing else happened.
- Lenguaje dominante
- Go
- Estrellas
- 12
- Forks
- 13
- Merge medio
- 2 d 3 h
- PR fusionados (30 d)
- 8
Preparar el entorno
- 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 OpenGovMail/raven
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OpenGovMail/raven#338 ·
Los mantenedores suelen responder en 1 día
-
[BUG] UNSELECT accepts extra arguments instead of returning BADPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
OpenGovMail/raven#322 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
OpenGovMail/raven#320 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
OpenGovMail/raven#319 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
OpenGovMail/raven#318 ·
Los mantenedores suelen responder en 1 día
Todos los issues de OpenGovMail/raven
Issues similares
-
Add rebaseWhen: conflicted to major Go module Renovate updatesPosiblemente ocupada @WadekarPrashant la tomó hoy. Abiertoenhancement feature good first issue ready-for-triage triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
konflux-ci/build-definitions#3943 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
-
Typos Check fails when the typos binary download failsPosiblemente ocupada @akshat-kumar-singhal la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nats-io/nats-server#8966 ·
Los mantenedores suelen responder en 1 día
-
cmd/fix, x/tools/go/analysis/passes/modernize: mapsloop moves comments out of the range operandPosiblemente ocupada @muratmirgun la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día