Skip to content

Conversation

patrikjuvonen
Copy link
Contributor

@patrikjuvonen patrikjuvonen commented Jan 10, 2021

At the moment our database code already limits usernames to 64 characters long, but is not enforced elsewhere in the code, causing potential buffer overflows when handling usernames. To fix this let's limit the usernames to max length.

Note that whether the limit should be changed is out-of-scope for this PR. This PR only wants to get rid of potential issues caused by overlong usernames.

Should be backwards compatible as far as I can see.

Database code already limits usernames to 64 characters. See the
CAccountManager::load function for more info about db upgrade.
@patrikjuvonen patrikjuvonen added the enhancement New feature or request label Jan 10, 2021
@patrikjuvonen patrikjuvonen added this to the 1.6 milestone Jan 10, 2021
@patrikjuvonen patrikjuvonen requested a review from botder January 10, 2021 14:26
@patrikjuvonen

This comment has been minimized.

@patrikjuvonen patrikjuvonen requested a review from botder January 10, 2021 19:43
@patrikjuvonen

This comment has been minimized.

@patrikjuvonen patrikjuvonen requested a review from botder January 10, 2021 22:08
@patrikjuvonen patrikjuvonen merged commit ce63ba6 into multitheftauto:master Jan 13, 2021
@patrikjuvonen patrikjuvonen deleted the feature/limit-username-length branch January 13, 2021 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants