Skip to content

Verify the player name is escaped before it reaches the SVG card #27

Description

@CyberSunil

/api/setname accepts any string up to 14 chars with no character filtering, and it flows into card_svg.render() and into /card.svg, which is served as image/svg+xml. If card_svg.py interpolates the name without escaping, a name containing markup would be injected into the rendered SVG. Check whether escaping happens; if not, add it, and add a test covering a name with <, > and &.

Files: card_svg.py, app.py, tests/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions