Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harden against invalid messages #1

Open
olafmandel opened this issue Aug 23, 2021 · 0 comments
Open

Harden against invalid messages #1

olafmandel opened this issue Aug 23, 2021 · 0 comments

Comments

@olafmandel
Copy link
Member

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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant