forked from adamelders/trinity-projects
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Improvements for account creation script #6
Open
anzz1
wants to merge
17
commits into
TrinityCore:master
Choose a base branch
from
anzz1:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
* Properly return error messages instead of hanging in "Please wait ..." indefinitely * Add check if database connection succeeded before advancing, return error if not * Add timeout for database connection, 5 seconds (configurable) * Add database port option
example spot for realmlist info
* Use php_mbstring to properly calculate length * TrinityCore limits usernames to 16 bytes which can be low as 8 utf-8 characters, adhere to this * Password input field in 3.3.5.12340 allows max 16 characters, but it can be 16-32 bytes depending on encoding. SRP6 does not impose such a limitation so this is an oversight on the client. Have to adhere to it nevertheless
* Scrap php_mbstring * Make absolutely sure all php options use utf-8 * fix strtoupper implementation , use own
* Add CAPICOM crypto provider for Windows
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Properly return error messages instead of hanging in "Please wait ..." indefinitely
Add check if database connection succeeded before advancing, return error if not
Add timeout for database connection, 5 seconds (configurable)
Add database port option
Fix a lot of the implementation
Throw errors properly (they were all-over-the-place and mishandled before)
Show the errors to users properly when it's their fault (invalid input) and show "unknown error" to the user on a database/whatever else error and error_log the detailed errors for the administrator
Fix validation of inputs, throw error on invalid instead, old implementation is all wrong
Check length of inputs (wasn't checked at all)
Also use the proper implementation of utf-8 character sets for pdo and php both. Make sure that php uses utf-8 for its' functions for this script and also make sure that mbstrinc_func_overload is not used (which could happen if this was dropped in some Drupal/whatever CMS server. All languages which are supported by the client and the server should be now supported by this script too.
That being said, I'm still not 100% positive it covers all problems which arise with multilingual usernames and their encoding. In any case it's a massive improvement over the original.