-
Notifications
You must be signed in to change notification settings - Fork 4
fix: excption #6
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
(1) Modify the branch enumeration for MD5SHA256. (2) Remove unsupported syntax keywords in test cases for GaussDB.
/// MD5 SHA256. | ||
/// </summary> | ||
MD5SHA256 = 64, | ||
/// <summary> | ||
/// All authentication methods. For internal use. | ||
/// </summary> | ||
All = Password | MD5 | GSS | SSPI | ScramSHA256 | None |
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.
Should All
includes the MD5SHA256
also
@@ -2315,13 +2316,13 @@ void GenerateResetMessage() | |||
} | |||
if (DatabaseInfo.SupportsDiscardSequences) |
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.
Is it possible to set the value to false
?
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.
Pull Request Overview
This PR aims to update the authentication branch to include MD5SHA256 support and remove unsupported syntax keywords from test cases (such as the CASCADE clause on DROP statements). Key changes include:
- Removing the CASCADE keyword from DROP statements in several test cases.
- Introducing a new MD5SHA256 enumeration and updating authentication handling accordingly.
- Commenting out DISCARD commands in tests and internal connector code to accommodate unsupported syntax.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
test/Npgsql.Tests/TestUtil.cs | Removed CASCADE in DROP statements for temporary tables, schemas, views, functions, procedures, and types. |
test/Npgsql.Tests/SecurityTests.cs & CommandTests.cs | Commented out DISCARD ALL commands in tests. |
test/Npgsql.Tests/BugTests.cs | Removed CASCADE from DROP TYPE statement. |
test/Npgsql.Tests/AsyncTests.cs | Updated temporary table creation syntax and command organization. |
src/Npgsql/NpgsqlConnectionStringBuilder.cs | Added MD5SHA256 enumeration value. |
src/Npgsql/Internal/NpgsqlConnector.cs | Enabled MD5SHA256 authentication and commented out unsupported DISCARD reset commands. |
src/Npgsql/Internal/NpgsqlConnector.Auth.cs | Updated authentication check to use MD5SHA256 instead of ScramSHA256. |
src/Npgsql/BackendMessages/AuthenticationMessages.cs | Replaced switch expression with a direct construction of AuthenticationSHA256PasswordMessage. |
Comments suppressed due to low confidence (2)
src/Npgsql/Internal/NpgsqlConnector.cs:2319
- [nitpick] Consider removing or cleaning up the commented-out DISCARD commands in the reset message generation to improve code clarity and reduce future maintenance confusion.
//sb.Append("DISCARD SEQUENCES");
src/Npgsql/BackendMessages/AuthenticationMessages.cs:69
- Replacing the switch expression with a direct instantiation of AuthenticationSHA256PasswordMessage means PlainText and MD5 cases are no longer handled explicitly; verify that this change is intentional and that no unexpected passwordStoreType values will be encountered.
return new AuthenticationSHA256PasswordMessage(passwordStoreType, buf);
(1) Modify the branch enumeration for MD5SHA256.
(2) Remove unsupported syntax keywords in test cases for GaussDB.