Skip to content

Make sure all endpoints do proper encoding #51807

Open

Description

@raisedadead

Example:

const response = await superRequest('/update-my-email', {
          method: 'PUT',
          setCookies
        }).send({ email: unusedEmailOne });

We should encode entities like emails, or other values that can have non-standard / out-of-spec characters with base64.

We do this here as an example:

export function getEncodedEmail(email) {
if (!email) {
return null;
}
return Buffer.from(email).toString('base64');
}
export const decodeEmail = email => Buffer.from(email, 'base64').toString();

This issue should track doing so across all the endpoints and not just email.

Activity

  1. converted this from a draft issue on Oct 4, 2023
  2. ojeytonwilliams commented on Oct 4, 2023

    @ojeytonwilliams
    Contributor

    @raisedadead could you share one or two email addresses that need this encoding? Just so we can incorporate them in our tests.

  3. added
    platform: api
    on Oct 4, 2023
  4. nadine-krista commented on Oct 5, 2023

    @nadine-krista

    Hello @raisedadead: Can you assign me something related to UI? I would like to contribute

  5. mohdafzal11 commented on Oct 5, 2023

    @mohdafzal11

    Hello @raisedadead :Can you assign me this issue

  6. camperbot commented on Oct 5, 2023

    @camperbot
    Contributor

    Please stop and read our contributing guide.

    https://contribute.freecodecamp.org/

    This issue is not marked as ready for contributions or help wanted. Also, we do not assign issues.

  7. Uwanaaa commented on Oct 20, 2023

    @Uwanaaa

    Hey @raisedadead can I be assigned this issue?

  8. locked as spam and limited conversation to collaborators on Oct 23, 2023
  9. added
    status: on the roadmap
    on Nov 22, 2025
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

    platform: apistatus: on the roadmap

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions