Skip to content

Harden against invalid messages #1

@olafmandel

Description

@olafmandel

The code currently assumes that the received data is valid:

  • any received message contains a JSON object: BasicQWebChannel<Json>::message_handler
  • that any message object contains the fields required by QtWebChannel: e.g. data["type"] instead of data.value("type", "")
  • callbacks are executed without checking if they actually exist: BasicQWebChannel<Json>::handle_response()
  • maybe / probably more I don't see now: e.g. are the .template get<int>() calls safe if the element is not convertible to integer?

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