Skip to content

Format injection in help thread titles #615

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

Merged
merged 1 commit into from
Oct 8, 2022

Conversation

Zabuzard
Copy link
Member

@Zabuzard Zabuzard commented Oct 7, 2022

Fixed #561 which is about a bug where its possible for an user to do a format-injection on help thread titles.

The source of this is us doing .formatted(...) twice on the same string. The second invocation will then pick up injected %s by the user, leading to a crash.

The fix is to split the formatting section into two isolated pieces. The code, while being more verbose and less elegant, is also more readable now.

@Zabuzard Zabuzard added bug Something isn't working priority: normal labels Oct 7, 2022
@Zabuzard Zabuzard requested a review from a team as a code owner October 7, 2022 10:50
@Zabuzard Zabuzard self-assigned this Oct 7, 2022
@Zabuzard Zabuzard requested a review from a team as a code owner October 7, 2022 10:50
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Zabuzard Zabuzard merged commit f91953e into develop Oct 8, 2022
@Zabuzard Zabuzard deleted the bugfix/format_injection_help_titles branch October 8, 2022 18:40
@Zabuzard Zabuzard mentioned this pull request Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Format injection in help thread titles
3 participants