🐛 `QUOTA` support is broken for types other than `STORAGE`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- ruby
- Ambito
- api, networking
Direzione di ricerca
Inizia con il parser delle risposte sulle quote e con gli entry point Net::IMAP #getquota, #getquotaroot e #setquota, utilizzando RFC2087 e RFC9208 come riferimenti del protocollo. Il lavoro è completato quando più tipi di risorse vengono analizzati senza crash, QuotaResponse e il comportamento retrocompatibile sono supportati tramite la configurazione e l’impostazione delle quote accetta i tipi di risorse richiesti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Support for the QUOTA extension is broken in several ways: it assumes STORAGE is the only possible quota resource type (which was not true, even for RFC2087) and the response parser will crash the connection if multiple resource types are returned. Fixing this is backward incompatible, so it will need to be hidden behind new config attribute.
Response Parser
Currently, the response parser for quota-response only allows zero or one quota-resource. It implicitly assumes that resource type is STORAGE, so it doesn't store the resource type. And it crashes for more than one resource type.
-
QUOTAresponse should be parsed consistently withRFC2087andRFC9208, into a newQuotaResponsetype.
Response Data
MailboxQuota must be deprecated: the #mailbox attribute is misleadingly named (it should be #quota_root), the class is misleadingly named (again: it provides information about a "quota root", which does not have a 1-to-1 relationship with mailbox), and it can only list usage and limit for a single resource type
-
QuotaResponse = Data.define(:quota_root, :resources)-
#to_deprecated_mailbox_quotafor backwards compatibility
-
-
QuotaResponse::Resource = Data.define(:name, :usage, :limit)
Net::IMAP command methods
-
#getquota: Useuse_deprecated_mailbox_quotaconfig:- when
:silent, return only theSTORAGEresource (nilif noSTORAGEresource) - when
true, same as:silentbut issue a warning for nonSTORAGEresource types - when
false, returnQuotaResponserather thanMailboxQuota
- when
-
#getquotaroot: Useuse_deprecated_mailbox_quotaconfig (same as#getquota) -
#setquota: support any number of any resource types via*restargs
Additional
Separately from this bug, there are some other QUOTA related issues (TODO: move these to separate issues/PRs):
- RFC9208 support
- new capabilities:
QUOTA=RES-*andQUOTASET- document at class level, and on all three quota methods
-
QuotaResponse: Add accessors "attributes" for every type in the IANA quota resource type registry:-
def storage = resources.find { "STORAGE".casecmp?(it.name) } -
def message = resources.find { "MESSAGE".casecmp?(it.name) } -
def mailbox = resources.find { "MAILBOX".casecmp?(it.name) } -
def annotation_storage = resources.find { "ANNOTATION-STORAGE".casecmp?(it.name) }
-
- new response code:
OVERQUOTA- document on
ResponseCodeclass - add (trivial) support in response parser
- document on
-
#setquota:- support IANA-registered resource types via keyword args
- new capabilities:
-
#getquotaroot:- Rather than return an array of mixed
MailboxQuotaRootandQuotaResponseobjects, return a single hash-like object that combines them.-
Config#getquotaroot_returns_quotaroot_data
-
-
Config#setquota_returns_quota_responses=> return matching untaggedQUOTAresponses
- Rather than return an array of mixed
- Lingua principale
- Ruby
- Stelle
- 121
- Fork
- 47
- Merge medio
- 19h 25m
- PR unite (30g)
- 3
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 ruby/net-imap
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
-
Cannot use FakeServerAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di ruby/net-imap
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Websockify heartbeat for vnc_containerForse già presa @robinkar l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
needs verification
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
akitaonrails/ai-book-2026#13 ·
-
Mend: dependency security vulnerability
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno