duesee / imap-codec

Rock-solid and complete codec for IMAP
Apache License 2.0
35 stars 13 forks source link

docs: `AuthMechanism::Plain` has wrong order of authzid/authcid #384

Closed duesee closed 7 months ago

duesee commented 7 months ago
base64(b"<authenticate-id>\x00<authorize-id>\x00<password>")

->

base64(b"<authorization identity>\x00<authentication identity>\x00<password>")
message   = [authzid] UTF8NUL authcid UTF8NUL passwd
authcid   = 1*SAFE ; MUST accept up to 255 octets
authzid   = 1*SAFE ; MUST accept up to 255 octets
passwd    = 1*SAFE ; MUST accept up to 255 octets
UTF8NUL   = %x00 ; [UTF-8](https://datatracker.ietf.org/doc/html/rfc4616#ref-UTF-8) encoded NUL character

SAFE      = UTF1 / UTF2 / UTF3 / UTF4
               ;; any UTF-8 encoded [Unicode](https://datatracker.ietf.org/doc/html/rfc4616#ref-Unicode) character except NUL

UTF1      = %x01-7F ;; except NUL
UTF2      = %xC2-DF UTF0
UTF3      = %xE0 %xA0-BF UTF0 / %xE1-EC 2(UTF0) / %xED %x80-9F UTF0 / %xEE-EF 2(UTF0)
UTF4      = %xF0 %x90-BF 2(UTF0) / %xF1-F3 3(UTF0) / %xF4 %x80-8F 2(UTF0)
UTF0      = %x80-BF

The authorization identity (authzid), authentication identity (authcid), password (passwd), and NUL character deliminators SHALL be transferred as [UTF-8] encoded strings of [Unicode] characters.

duesee commented 7 months ago

Fixed on v2.