-
Notifications
You must be signed in to change notification settings - Fork 42
Fix connections to server on different locales #329
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
Conversation
* ToUpper is not enough, we need to use InvariantCulture to be sure that the string is converted to uppercase in a way that is consistent with the server.
@Zerpet I would like to have a review if possible. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #329 +/- ##
==========================================
- Coverage 92.60% 92.49% -0.11%
==========================================
Files 113 113
Lines 9964 9946 -18
Branches 825 825
==========================================
- Hits 9227 9200 -27
- Misses 560 567 +7
- Partials 177 179 +2 ☔ View full report in Codecov by Sentry. |
Thank you @Noonlord. |
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.
I echo Gabriele's thought. Where does the current implementation fail?
From what I read in Microsoft documentation, the upper invariant seems important for consistent sorting. However, we are not sorting the authentication mechanism array, we just iterate it.
@Noonlord That's interesting.
But Thank you |
@Gsantomaggio although I can not provide you a configuration file at the moment, I can show something else to reproduce the bug locally. This is the auth mechanisms response from server: And this is the client parameters: Issue is from client parameters authentication method enumeration, Plain, converts to string as "Plain" and using TR-tr culture ToUpper() method transforms this into "PLAİN" those two strings get compared and it results to false, because of this client thinks that server does not support "Plain" authentication method. Thanks for quick responses! |
Thank you for the detailed explanation and the contribution! |
ToUpper is not enough, we need to use InvariantCulture to be sure that the string is converted to uppercase in a way that is consistent with the server.