It is possible to create usernames which contain NULL characters. It is not possible to log in to these accounts. It seems like if we wanted we could accept these characters. However https://tools.ietf.org/html/rfc5802 defines `value-safe-char`, which is used in the username and authzid, as:
value-safe-char = %x01-2B / %x2D-3C / %x3E-7F / UTF8-2 / UTF8-3 / UTF8-4 ;; UTF8-char except NUL, "=", and ",".
There seem to be no provisions for encoding NULL characters.
The authenticate command seems to have an unrelated bug that manifests itself in the same way.
It seems likely that we do not want to be able to store usernames containing this character.