Skip to content

Add .NET 10 support#15

Open
okramarenko wants to merge 21 commits intomasterfrom
add10support
Open

Add .NET 10 support#15
okramarenko wants to merge 21 commits intomasterfrom
add10support

Conversation

@okramarenko
Copy link
Copy Markdown
Collaborator

@okramarenko okramarenko commented Apr 6, 2026

Note

High Risk
High risk because it changes connection/authentication handshake logic (adds caching_sha2_password handling, new parsec auth, and refactors password-hash flow used for TLS fingerprint validation), plus introduces a new binary VECTOR column type and related parameter/bulk-copy serialization paths.

Overview
Adds .NET 10 support across the repo (CI builds/tests, net10.0 TFM, updated language version, and dependency bumps), and replaces the legacy solution file with a new SingleStoreConnector.slnx.

Extends authentication support by introducing IAuthenticationPlugin3 (response + password hash), updating Ed25519 to implement it, adding a new PARSEC authentication plugin, and updating ServerSession/handshake payload creation to support caching_sha2_password, improved RSA public-key retrieval, and certificate-fingerprint validation based on stored password hashes.

Adds VECTOR type support end-to-end: new protocol ColumnType.Vector, type mapping to ReadOnlyMemory<float>, a VectorColumnReader, float-array parameter/bulk-load/bulk-copy serialization, and GUID out-parameter casting/size propagation to preserve correct result typing. Also includes several reliability tweaks (pool payload cache trimming, better reset/OK verification helper, XA rollback edge cases, proxy detection updates) and an opt-outable tracing event via SingleStoreDataSourceBuilder.ConfigureTracing.

Reviewed by Cursor Bugbot for commit 85899ab. Bugbot is set up for automated code reviews on this repo. Configure here.

signature.CopyTo(authenticationResponse.AsSpan(clientScramble.Length));

// "password hash" for parsec is the extended salt followed by the public key
passwordHash = [(byte) 'P', (byte) iterationCount, .. salt, .. publicKey];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iteration count byte truncation corrupts password hash

High Severity

(byte) iterationCount always evaluates to 0 because iterationCount is 1024 << extendedSalt[1], producing values 1024, 2048, 4096, or 8192 — all multiples of 256. The second byte of passwordHash will always be 0 regardless of the actual iteration exponent. The intent is to store the original exponent byte (extendedSalt[1]), not the computed iterationCount cast to byte.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit dfb6ad7. Configure here.

Comment thread Directory.Build.props Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 501f031. Configure here.

{
var schema = reader.GetColumnSchema();
for (var i = 0; i < Math.Min(m_valuesEnumerator!.FieldCount, schema.Count); i++)
for (var i = 0; i < schema.Count; i++)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bulk copy throws for tables with extra special columns

Medium Severity

The loop bound changed from Math.Min(m_valuesEnumerator!.FieldCount, schema.Count) to schema.Count. When the destination table has more columns than the source and addDefaultMappings is true, AddColumnMapping creates mappings with SourceOrdinal equal to the destination schema index (which exceeds FieldCount). The validation at line 290 then throws InvalidOperationException because SourceOrdinal >= m_valuesEnumerator.FieldCount.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 501f031. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant