#68 Fix base64 padding mismatch when decoding PDS $bytes fields

closed critical · sable · 2026-03-02 23:37 · closed 2026-03-02 23:37 · bug · Phase 2: Sharing

Comments — 1

sable note 2026-03-02 23:37

The PDS stores $bytes in CBOR and re-encodes to unpadded base64 on JSON read. Our decode uses STANDARD (requires padding), causing 'Invalid padding' errors on every round-trip. Affects: resolve.rs public key decode, documents/download.rs nonce decode, crypto.rs unwrap_key ciphertext decode. Fix: create a padding-indifferent base64 engine in atproto.rs and use it at every decode site. Encode can stay padded (STANDARD).

Generated 2026-03-03 02:53 UTC