Skip to content

Escape player names #16

@JacobFischer

Description

@JacobFischer

to_send += ai_->get_name();

Currently player names are appended to the json "raw", no characters are escaped.

So if you have a " in your name, that will terminate the JSON structure being built, and the game server might reject you for invalid JSON. Or maybe even be open to attacks (however the game server does try to guard against malicious clients so hopefully not).

We need to escape any strings the AIs can generate for safety.

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