Skip to content

Conversation

@roji
Copy link
Member

@roji roji commented Aug 1, 2022

Backport of #73149

Description

System.Data.Odbc currently validates that connection strings are a most 1024 characters long; this removes that restriction.

Customer impact

The 1024-char restriction prevents some ODBC providers from being used in certain scenarios. Specifically, in modern cloud environments, a rotating authentication token is frequently used instead of a password, and it's sometimes quite long. The 1024-char restriction makes it impossible to use System.Data.Odbc in those scenarios..

How found

Reported by multiple users, both in #63630 and in internal channels

Regression

No.

Testing

Manual and verified by one customer.

Risk

Very low - this removes a check in the code, so that long connection strings don't cause an exception to be thrown.

Fixes #63630

/cc @ajcvickers

@ghost ghost assigned roji Aug 1, 2022
@ghost
Copy link

ghost commented Aug 1, 2022

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #73149

Description

System.Data.Odbc currently validates that connection strings are a most 1024 characters long; this removes that restriction.

Customer impact

The 1024-char restriction prevents some ODBC providers from being used in certain scenarios. Specifically, in modern cloud environments, a rotating authentication token is frequently used instead of a password, and it's sometimes quite long. The 1024-char restriction makes it impossible to use System.Data.Odbc in those scenarios..

How found

Reported by multiple users, both in #63630 and in internal channels

Regression

No.

Testing

Manual and verified by one customer.

Risk

Very low - this removes a check in the code, so that long connection strings don't cause an exception to be thrown.

Fixes #27474

Author: roji
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@roji roji added Servicing-consider Issue for next servicing release review area-System.Data.Odbc and removed area-Infrastructure-libraries labels Aug 1, 2022
@ghost
Copy link

ghost commented Aug 1, 2022

Tagging subscribers to this area: @roji, @ajcvickers
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #73149

Description

System.Data.Odbc currently validates that connection strings are a most 1024 characters long; this removes that restriction.

Customer impact

The 1024-char restriction prevents some ODBC providers from being used in certain scenarios. Specifically, in modern cloud environments, a rotating authentication token is frequently used instead of a password, and it's sometimes quite long. The 1024-char restriction makes it impossible to use System.Data.Odbc in those scenarios..

How found

Reported by multiple users, both in #63630 and in internal channels

Regression

No.

Testing

Manual and verified by one customer.

Risk

Very low - this removes a check in the code, so that long connection strings don't cause an exception to be thrown.

Fixes #27474

Author: roji
Assignees: roji
Labels:

Servicing-consider, area-Infrastructure-libraries, area-System.Data.Odbc

Milestone: -

@roji roji changed the title Remove 1024 character limit on ODBC connection strings (#73149) [release/6.0] Remove 1024 character limit on ODBC connection strings Aug 1, 2022
@stephentoub
Copy link
Member

this removes a check in the code, so that long connection strings don't cause an exception to be thrown

I should have asked this on the original PR. Do we have any tests that prove that, i.e. that validate longer strings can actually now be used and there's not some additional blocker this will hit?

@roji
Copy link
Member Author

roji commented Aug 1, 2022

@stephentoub I ran tests myself against some of the major providers (SQL Server, SQLite, PostgreSQL, MySQL), setting the "Server" parameter to a huge 1025-char string; after this change they all throw a driver-specific error saying the host could not be found (as expecteD). So this indicates that in general things are working fine.

More importantly, I have confirmation from one customer which used a patched version and could successfully connect.

@ViktorHofer
Copy link
Member

As System.Data.Odbc ships via a package only, you also need to update the project file to increment the ServicingVersion property and set GeneratePackageOnBuild to true, according to https://github.com/dotnet/runtime/blob/main/docs/project/library-servicing.md.

Otherwise this fix wouldn't reach customers.

cc @ericstj @carlossanlop

@roji
Copy link
Member Author

roji commented Aug 1, 2022

Thanks @ViktorHofer - added the two properties, I can confirm that a System.Data.Odbc.6.0.1.nupkg appears under artifacts/packages/Debug/Shipping after building.

@leecow leecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 2, 2022
@leecow leecow added this to the 6.0.9 milestone Aug 2, 2022
Copy link
Contributor

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

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

Tactics approved.
Correct milestone applied.
CI failures are unrelated to System.Data.
Required OOB package authoring changes included and verified by PR submitter.
Signed off by area owner.
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 3c45cd7 into dotnet:release/6.0 Aug 12, 2022
@roji roji deleted the release/6.0 branch August 12, 2022 06:49
@ghost ghost locked as resolved and limited conversation to collaborators Sep 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Data.Odbc Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants