Skip to content

Curl POST payload generation logic does not do url escape the values #7

Description

@arun-madhavan-013

The payload generated at https://github.com/rdkcentral/rdkfwupdater/blob/develop/src/device_status_helper.c#L824 does not care about the special characters being present. This may cause Server to interpret the data wrongly. In this case; the UTC time string retrieved will have SPACE characters in it which may cause issues.

Also the function size_t createJsonString(char *pPostFieldOut, size_t szPostFieldOut) does not create a JSON object which makes it quite confusing.

When using the curl library to send POST requests, it is generally recommended to URL-encode (also known as percent-encode) the POST parameters to ensure that the data is transmitted correctly and interpreted properly by the server. URL-encoding is necessary because certain characters have special meanings in URLs and HTTP requests, and encoding them ensures that they are treated as data rather than control characters.

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