-
Notifications
You must be signed in to change notification settings - Fork 149
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
Website binding certificate subject compare fails with multiple entries #413
Conversation
Merging release pull request
Release of version 1.16.0.0 of xWebAdministration
Release of version 1.17.0.0 of xWebAdministration
Release of version 1.18.0.0 of xWebAdministration
Release of version 1.19.0.0 of xWebAdministration
Release of version 1.20.0.0 of xWebAdministration
Release of version 2.0.0.0 of xWebAdministration
Release of version 2.1.0.0 of xWebAdministration
Release of version 2.2.0.0 of xWebAdministration
Release of version 2.3.0.0 of xWebAdministration
Release of version 2.4.0.0 of xWebAdministration
I also added tests for the different scenario's I encountered |
Codecov Report
@@ Coverage Diff @@
## dev #413 +/- ##
=======================================
Coverage 90.77% 90.77%
=======================================
Files 17 17
Lines 2438 2438
=======================================
Hits 2213 2213
Misses 225 225
Continue to review full report at Codecov.
|
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.
Reviewed 2 of 2 files at r1, 1 of 1 files at r3.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @wh33ly)
README.md, line 319 at r3 (raw file):
* Helper: Fixed subject comparison for multiple entries
Can you also add the name of the function to be more specific?
DSCResources/Helper.psm1, line 168 at r3 (raw file):
$certFilters += @('(@(Compare-Object -ReferenceObject (($_.Subject -split ", ").trim()|sort-object) -DifferenceObject (($subject -split ",").trim()|sort-object)| Where-Object -Property SideIndicator -eq "=>").Count -eq 0)')
There's a lot of logic in this one line and we should avoid extensive piping. Breaking this out will make it more readable and easier for debugging and testing. I see there are other older parts of this helper that are doing it this way, but we don't have to continue that practice.
@wh33ly Thanks for submitting a fix for this issue. Just small feedback provided and I think it'll be ready. |
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.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @regedit32)
README.md, line 319 at r3 (raw file):
Previously, regedit32 (Reggie Gibson) wrote…
* Helper: Fixed subject comparison for multiple entries
Can you also add the name of the function to be more specific?
Updated the unreleased infomation
DSCResources/Helper.psm1, line 168 at r3 (raw file):
Previously, regedit32 (Reggie Gibson) wrote…
$certFilters += @('(@(Compare-Object -ReferenceObject (($_.Subject -split ", ").trim()|sort-object) -DifferenceObject (($subject -split ",").trim()|sort-object)| Where-Object -Property SideIndicator -eq "=>").Count -eq 0)')
There's a lot of logic in this one line and we should avoid extensive piping. Breaking this out will make it more readable and easier for debugging and testing. I see there are other older parts of this helper that are doing it this way, but we don't have to continue that practice.
Thanks for your feedback.
Would you prefer something like this ? Or do you have another suggestion how to improve this. Breaking out makes it definitely more readable but there still is a lot of logic in one line.
I also broke out the other lines in the function
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.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @regedit32)
README.md, line 319 at r3 (raw file):
Previously, wh33ly wrote…
Updated the unreleased infomation
Done.
DSCResources/Helper.psm1, line 168 at r3 (raw file):
Previously, wh33ly wrote…
Thanks for your feedback.
Would you prefer something like this ? Or do you have another suggestion how to improve this. Breaking out makes it definitely more readable but there still is a lot of logic in one line.
I also broke out the other lines in the function
Done.
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.
Updated according to comments
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @regedit32)
@regedit32 Think I'm done, is there anything from my side I need to do now ? |
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
@regedit32 Bump |
@wh33ly Sorry for the delay, let me take a look today. |
Pull Request (PR) description
Website binding certificate subject compare fails with multiple entries
As described in the issue, this will fix an issue where the binding needs the correct certificate. Search for the certificate failed when a subject contains more then one property and the order differs from the original subject.
This Pull Request (PR) fixes the following issues
Task list
Entry should say what was changed, and how that affects users (if applicable).
and comment-based help.
This change is