sourcecode/nsd/uuencode.c maybe

On Sun, May 24, 2020 at 11:23 PM Iuri de Araujo Sampaio <i...@iurix.com>
wrote:

> Hi there,
>
> It looks like *[ns_base64encode]* generates a wrong payload when message
> size contains more than 63 characters.
>
>
> https://tools.ietf.org/html/rfc4648#section-5
>
> An alternative alphabet has been suggested that would use "~" as the
>    63rd character.
>
>
>
> (1) Payload, which generates a proper encryption.
>
> set payload [ns_base64encode "{'sub': '$user(user_id)', 'it': [ns_time]}”]
>
> eydzdWInOiAnNzA0JywgJ2lhdCc6IDE1OTAzNjU2ODF9
>
> (2) Payload, which generates a wrong encryption
>
> set payload [ns_base64encode "{'iss': '26973410000102', 'aud': '
> iurix.com/REST', 'sub': '$user(user_id)', 'iat': [ns_time]}”]
>
> eydpc3MnOiAnMjY5NzM0MTAwMDAxMDInLCAnYXVkJzogJ2l1cml4LmNvbS9S
> RVNUJywgJ3N1Yic6ICc3MDQnLCAnaWF0JzogMTU5MDM2NTY1MH0=
>
>
> item (2) is not encoded correctly using base64url (
> https://tools.ietf.org/html/rfc4648#section-5). Note that padding ("=")
> must be omitted as per https://tools.ietf.org/html/rfc7515#section-2
>
> How would I use [ns_base64encoding], if i decide to add more content in
> the payload message? Is it possible?
>
>
> I was trying find where ns_base64encoding is implemented, within
> Naviserver source code. But I haven’t found yet.
> Then I’d be able to go deeper into the problem to identify the actual
> cause and try to write a solution to it.
>
> Does anyone know where is the implementation of [ns_base64encode] ?
>
> Best wishes,
> I
> _______________________________________________
> naviserver-devel mailing list
> naviserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/naviserver-devel
>
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to