BASE64URL is not compliant with rfc4648 #30854
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
library-convert
type-enhancement
A request for a change that isn't a bug
RFC4648, chapter 5, states in the description of Base64Url that the padding can be skipped.
BASE64URL.decode('AA') raises an exception ("FormatException: Invalid length, must be multiple of four (at character 3)"), when it should return [0], as the padding in 'AA==' is optional.
This could either be fixed in the code (my preference), or in the comments, by saying that contrary to the rfc specifications, this implementation requires padding, and that the user should call the normalize() method before decode() if the padding can be missing.
The text was updated successfully, but these errors were encountered: