[BUG] IDLE accepts extra arguments instead of returning BAD

Aperta Adatta ai principianti
#320 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api, backend

Direzione di ricerca

Leggi internal/server/connection.go per seguire come handleClient smista IDLE, poi esamina internal/server/extension/extension.go e i test IDLE. Segui il pattern di convalida degli argomenti descritto per NOOP e CAPABILITY, aggiorna l’helper di test e le chiamate esistenti per la nuova firma e aggiungi un caso per A1 IDLE extra. Il lavoro è completato quando restituisce la risposta BAD taggata senza entrare in modalità IDLE e i test pertinenti passano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug good first issue
Steps to Reproduce
  1. Connect to the IMAP server and select a mailbox.
  2. Send IDLE with an extra argument, e.g. A1 IDLE extra.
Expected Behavior

RFC 2177 defines IDLE with no arguments, so a command with extra arguments is malformed and the server should reply A1 BAD IDLE takes no arguments without doing anything else.

Actual Behavior

The dispatcher in internal/server/connection.go calls extension.HandleIdle 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 IDLE extra replies + idling and enters IDLE mode instead of returning BAD.

Relevant Logs / Screenshots

Same bug as #263 (NOOP, fixed in #315) and #260 (CAPABILITY). The fix follows the same pattern:

  • Pass parts from handleClient in internal/server/connection.go to extension.HandleIdle.
  • At the top of the handler, if len(parts) > 2, send <tag> BAD IDLE takes no arguments and return before any other work.
  • Update the test helper in internal/server/testing_interface.go and the existing tests to the new signature.
  • Add a test for A1 IDLE extra that checks for the BAD reply and that nothing else happened.
Lingua principale
Go
Stelle
12
Fork
13
Merge medio
2g 3h
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenGovMail/raven

Tutte le issue di OpenGovMail/raven

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.