Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Dec 15, 2021

Backport of #62807 to release/6.0

/cc @joperezr

Customer Impact

This PR is fixing a customer reported regression on this issue: #61683
The regression is present only on NuGet package System.DirectoryServices.Protocols version 6.0.0

The problem here is that if a consumer is running on Linux, and tries to Bind to a LDAP server using AuthType.Anonymous then we will throw a NullReferenceException due to a bug we have where we try to de-reference the user's password which in Anonymous case, will be null. There is no good workaround for this for using Anonymous AuthType today, other than downgrading the NuGet package version to 5.0.1 which doesn't have the regression.

Testing

We've added unit test for regression coverage, and the fix has been validated by the customer that first reported the issue and said it fixed the issue for them. (cc. @JasonDebug)

Risk

Low. This is fixing a regression from 5.0->6.0 and currently we have no good workaround to avoid throwing NullReferenceException. The risks here are basically the same as shipping a new version of any of our NuGet packages.

@ghost
Copy link

ghost commented Dec 15, 2021

Tagging subscribers to this area: @dotnet/area-system-directoryservices, @jay98014
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #62807 to release/6.0

/cc @joperezr

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-System.DirectoryServices

Milestone: -

@joperezr joperezr added the Servicing-consider Issue for next servicing release review label Dec 15, 2021
@joperezr joperezr self-assigned this Dec 15, 2021
@joperezr joperezr requested review from buyaa-n and ericstj December 15, 2021 00:44
@joperezr joperezr requested a review from safern December 15, 2021 17:54
Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

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

LGTM

@joperezr joperezr added this to the 6.0.x milestone Dec 16, 2021
@leecow leecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Dec 16, 2021
@leecow leecow modified the milestones: 6.0.x, 6.0.2 Dec 16, 2021
@ericstj ericstj merged commit 423936a into release/6.0 Dec 16, 2021
var connection = new LdapConnection("server");
connection.AuthType = AuthType.Anonymous;
// When calling Bind we make sure that the exception thrown is not that there was a NullReferenceException
// trying to retrive a null password's lenght, but instead an LdapException given the server cannot be reached.
Copy link
Member

Choose a reason for hiding this comment

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

Just noticed a typo here: lenght

Copy link
Member

Choose a reason for hiding this comment

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

good catch, will fix in main

@safern safern deleted the backport/pr-62807-to-release/6.0 branch December 16, 2021 21:32
@ghost ghost locked as resolved and limited conversation to collaborators Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants