Skip to content

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

@amoseev

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);

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