Skip to content

Format injection in help thread titles #561

Closed

Description

@Zabuzard

Issue

There is a bug where the help-thread flow breaks down for the bot when giving a title that contains stuff relevant to string formatting.

For example a title like bad %s text %s %. test or simply test %s:

issue1

issue2

Threads are created though, so nobody is blocked.

Exception is this:

exception

Coming from the string formatting here:

code

Fix

The source of the issue is that we do format twice. Hence the first format may introduce a %, which is then interpreted by the second format. Thats obviously not intended and two successive formats are dangerous anyways. It was an elegant approach, but it shouldnt be done.

We should split the text formatting so that it doesnt run format twice on the same string.

Activity

  1. added
    bug
    on Sep 7, 2022
  2. github-actions commented on Oct 7, 2022

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.

  3. added
    valid
    and removed on Oct 7, 2022
  4. self-assigned this
    on Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugpriority: normalvalid

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions