Skip to content

Incorrectly decoding data #26

@Robin481

Description

@Robin481

We haven't pinned down the reason 100% but it seems that the ccli can come to a point when syncing secrets that it tries to Base64-decode non-Base64 encoded strings.

This method:

def decoded_data(data)
    return {} unless data

    data.transform_values do |value|
      Base64.strict_decode64(value)
    rescue ArgumentError
      value
    end
end

is probably the biggest culprit as normally a non Base64 encoded String will just throw an error and return its value but in my case a non-Base64 encoded string was recognized as Base64, was therefore decoded and broke everything.

I have an example string for this case that I can share when needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions