Conversation
|
Hi @redvers, The changelog - fixed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do. Release notes are added by creating a uniquely named file in the The basic format of the release notes (using markdown) should be: Thanks. |
ebb9efc to
6d20582
Compare
|
This is really two different changes. The release notes even state it with a "o btw". I think this should be broken into two different discussions. The bug fix and the API widening. |
|
Please replace the new example based test with property based tests. |
Remove superfloruous arguments to `Base64.encode` which allowed it to
generate output that was contrary to RFC4648.
RFC4648 "base64url" encoding (RFC4648 §5) permits the result to be
padded or not. Previously, if you asked for a non-padded output the
function would return NUL characters where the padding character would
have been if it were padded.
As Pony Strings do not terminate on NUL, this resulted in incorrect results:
```pony
use "encode/base64"
actor Main
new create(env: Env) =>
let a: String = Base64.encode_url("pony")
/* Outputs: [cG9ueQ]: size=8 */
env.out.print("[" + a + "]: size=" + a.size().string())
```
6d20582 to
9cd737c
Compare
|
@redvers is this ready for another review? |
|
I do not rememeber. Skip it for today and I'll check after this school appointment I have for the kid. |
Previously, instead of omitting the padding (default '='), it would pad with NUL. Pony Strings do not terminate on NUL, so this resulted in incorrect results: