Re: Opsdir last call review of draft-ietf-webpush-vapid-03

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



base64 classic seems to need padding and reacts differently on different versions when that is missing.

(I’d like to meet someone who can explain what they were thinking when they invented padding.)

Grüße, Carsten


> On Jul 4, 2017, at 02:14, Martin Thomson <martin.thomson@xxxxxxxxx> wrote:
> 
> On 4 July 2017 at 03:31, Adam Roach <adam@xxxxxxxxxxx> wrote:
>> # echo
>> eyJhdWQiOiJodHRwczovL3B1c2guZXhhbXBsZS5uZXQiLCJleHAiOjE0NTM1MjM3NjgsInN1YiI6Im1haWx0bzpwdXNoQGV4YW1wbGUuY29tIn0
>> | base64 --decode
>> 
>> {"aud":"https://push.example.net","exp":1453523768,"sub":"mailto:push@xxxxxxxxxxx
> 
> I get this:
> 
> $ echo eyJhdWQiOiJodHRwczovL3B1c2guZXhhbXBsZS5uZXQiLCJleHAiOjE0NTM1MjM3NjgsInN1YiI6Im1haWx0bzpwdXNoQGV4YW1wbGUuY29tIn0
> | base64 --decode
> {"aud":"https://push.example.net","exp":1453523768,"sub":"mailto:push@xxxxxxxxxxx"}base64:
> invalid input
> 
> Which fills me with confidence in the base64 tool.  You'll note that
> the trailing quote and curly brace are present here, but there is an
> inexplicable error that adding the -i option doesn't remove.
> 
> I built this using my own implementation and verified it, but you will
> see that this works too:
> 
> $ npm install base64url;node -e
> 'console.log(require("base64url").decode("eyJhdWQiOiJodHRwczovL3B1c2guZXhhbXBsZS5uZXQiLCJleHAiOjE0NTM1MjM3NjgsInN1YiI6Im1haWx0bzpwdXNoQGV4YW1wbGUuY29tIn0"))'
> {"aud":"https://push.example.net","exp":1453523768,"sub":"mailto:push@xxxxxxxxxxx"}
> 
> (note that running this leaves a node_modules lying around).
> 
> https://www.base64decode.org/ also agrees.
> 
> 





[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Fedora Users]