snowplow / snowplow-gtm-server-side-client

A Google Tag Manager Server-side Client template for collecting events using the Snowplow JavaScript Tracker
https://snowplowanalytics.com
Apache License 2.0
9 stars 3 forks source link

Remove unecessary case in base64urldecode #46

Closed adatzer closed 7 months ago

adatzer commented 7 months ago

When decoding from base64url we take into account the case where 4 - (str.length % 4) is equal to 3. However, since str.length % 4 cannot be equal to 1 in base 64, this case cannot happen and could be removed.