-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix(Core/DB) - Correct the max length of a username #21183
Merged
sudlud
merged 4 commits into
azerothcore:master
from
TheSCREWEDSoftware:fix_accountCreation_length
Jan 19, 2025
Merged
fix(Core/DB) - Correct the max length of a username #21183
sudlud
merged 4 commits into
azerothcore:master
from
TheSCREWEDSoftware:fix_accountCreation_length
Jan 19, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tested on 2 clean clients. 3.3.5 (12340) enGB 3.3.5 (12340) enUS Upon creating a user with higher than 17 It's an auto disconnect. Password is unchanged from TC or Mangos which is 16, higher does the same error.
LANG_PASSWORD_TOO_LONG` gets addition to French and Russian. `LANG_ACCOUNT_TOO_LONG` gets addition to French, Spain Spanish, Mexican Spanish and Russian. Corrected german grammer and all from 20 to 17 (characters max)
Changed the max of a username length to match the client limit.
github-actions
bot
added
DB
related to the SQL database
CORE
Related to the core
file-cpp
Used to trigger the matrix build
labels
Jan 15, 2025
Kitzunu
reviewed
Jan 15, 2025
@@ -0,0 +1,3 @@ | |||
-- | |||
-- Changes the Length of `username` from 32 to 17 characters as it the client limit. | |||
ALTER TABLE `account` CHANGE COLUMN `username` `username` VARCHAR(17) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci' AFTER `id`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving it varchar(32) could have some benefits and save us from headaches.
- Changing it would error for everyone who for some reason has a username > 17
- It doesn't really matter as
- The client would crash
- Creating a new account/changing username through the console it would send AOR_NAME_TOO_LONG anyways
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you and sud suggested, i've removed changes to the column
sudlud
approved these changes
Jan 19, 2025
skelUA
pushed a commit
to skelUA/wotlk
that referenced
this pull request
Jan 26, 2025
…zerothcore#21183) (cherry picked from commit eb37cd8)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CORE
Related to the core
DB
related to the SQL database
file-cpp
Used to trigger the matrix build
Ready to be Reviewed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Warning
If any existing username have more than 17 characters after this PR or testing I don't know how SQL database reacts to that (when i had it active and tried lowering it didnt allow me until i changed or removed the username with more than 17 characters.Client limitation on creating username is of 17 characters. (AC has it set to 20).
Tested on 2 clean clients.
3.3.5 (12340) enGB
3.3.5 (12340) enUS
Updated acore_world.
acore_string
55
and1005
(LANG_PASSWORD_TOO_LONG
andLANG_ACCOUNT_TOO_LONG
)55
.1005
1005
.20
character max in1005
to17
.Updated the acore_auth.account
username
field from 32 to 17 chracters length.Note: I do not know if this size does or not changes for non-latin characters like russian.
No changes to the password in core as it set correctly (max of 16 chracters).
Thanks @r-o-b-o-t-o for the french translation and @55Honey for the correction on the grammar.
Changes Proposed:
This PR proposes changes to:
Issues Addressed:
SOURCE:
The changes have been validated through:
Tests Performed:
This PR has been:
.account create AccountWithEnough 123
// 17 chars.account create AccountWithEnoughs 123
// 18 charsHow to Test the Changes:
Known Issues and TODO List:
How to Test AzerothCore PRs
When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].
You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:
http://www.azerothcore.org/wiki/How-to-test-a-PR
REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).
For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.