Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Base64 encoder shouldn't trim the input #13

Open

Description

@mahmoudmohsen213

The base64 encoding plugin disregard any leading or trailing new line characters, which may be important in the original input, for example, encoding chunks of a csv file, where a new line character denotes the end of a record.

If it happened that the end of a chunk aligned with the end of a record (a new line character), it will be removed in the encoding, producing a corrupted file when decoded back.

Example input 01:

str01
str02
str03

Expected and actual:
c3RyMDEKc3RyMDIKc3RyMDM=

Example input 02:



str01
str02
str03

Expected:
CgpzdHIwMQpzdHIwMgpzdHIwMw==
Actual:
c3RyMDEKc3RyMDIKc3RyMDM=

Example input 03:

str01
str02
str03


Expected:
c3RyMDEKc3RyMDIKc3RyMDMKCg==
Actual:
c3RyMDEKc3RyMDIKc3RyMDM=

Activity

  1. tomscript commented on Apr 18, 2020

    @tomscript
    Owner

    hi @mahmoudmohsen213 thanks for reporting this! also sorry for my delay. good catch. ive been (slowly) migrating to a modern version of angular and moving to golang from python., it looks like this issue has been resolved in the newer version @ https://babbage.codes

    image

    unfortunately that newer version is missing a few other features like file download, upload and a few other things. hopefully that works for you but let me know if those features are really important to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions