Skip to content

urldecode in parse Payload from ServerRequest cause error in certain scenarios #13

Description

@amoseev

Hello,
urldecode in slack-php/slack-app-framework/src/Contexts/Payload.php:44

In same cases urldecode + json_decode not work and cause error: Control character error, possibly incorrectly encoded

Example to reproduce simplest way:

        $data = [
            "text" => "<%12>"
        ];
        $jsonString = json_encode($data);
        $payload = json_decode(urldecode($jsonString), true, 512, JSON_THROW_ON_ERROR);

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions