You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that decode_base64_field is using base64.StdEncoding.DecodeString to decode the string, but that function only supports unpadded strings. There also is a base64.RawStdEncoding.DecodeString function, but this one only supports unpadded strings.
#25817 tried to solve this by appending =-signs until the string was fully padded, but another solution could be to strip all the =-signs, and using base64.RawStdEncoding.DecodeString.
The use-case for this is to decode a JWT Authorisation header to extract the user_id field, like has been documented here. This example is using a script processor to add the padding however, and this isn't available in all *beat projects.
Version: packetbeat-7.13.4 (but actually all the latest libbeat-projects)
Operating System: Ubuntu 20.04
The text was updated successfully, but these errors were encountered:
It seems that
decode_base64_field
is usingbase64.StdEncoding.DecodeString
to decode the string, but that function only supports unpadded strings. There also is abase64.RawStdEncoding.DecodeString
function, but this one only supports unpadded strings.#25817 tried to solve this by appending
=
-signs until the string was fully padded, but another solution could be to strip all the=
-signs, and usingbase64.RawStdEncoding.DecodeString
.The use-case for this is to decode a JWT Authorisation header to extract the
user_id
field, like has been documented here. This example is using a script processor to add the padding however, and this isn't available in all *beat projects.Version: packetbeat-7.13.4 (but actually all the latest libbeat-projects)
Operating System: Ubuntu 20.04
The text was updated successfully, but these errors were encountered: