Fix breaking dependency issue #38 and bug #74 (Mitigates CVE-2022-25896)#75
Open
HNA-JP wants to merge 2 commits intoauth0:masterfrom
Open
Fix breaking dependency issue #38 and bug #74 (Mitigates CVE-2022-25896)#75HNA-JP wants to merge 2 commits intoauth0:masterfrom
HNA-JP wants to merge 2 commits intoauth0:masterfrom
Conversation
71e1aa7 to
28ade10
Compare
Author
nikolasdymchenko
approved these changes
Mar 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR includes 2x single-line fixes for issues #38 and #74.
Fix A resolves or supersedes:
Fix B resolves or supersedes:
Issue #38
At the present moment, breaking changes in
passport v0.5.1cause Passport-WindowsAuth to fail authentication completely. This appears to be caused by changes in session handling betweenpassportandexpress-session.More information on that issue can be found in my comment in issue #38
This PR fixes the issue by bumping
passportfrom~0.1.15to~0.7.0, which is the latest version at the time of writing.Code changed:
Issue #74
This PR also resolves a bug with an error code check in
/lib/LdapLookup.jsthat causes it to check the wrong object key.More information on that issue can be found in my comment in issue #74
Code changed:
An alternative could have been to change
ECONNRESETto the error code shown in the console (-104), however this would have been less clear to anybody unfamiliar with the codebase.References
This PR aims to supersede PR #65 as that PR implements the same fix but did not use the PR template.
This PR also aims to supersede PR #68 as that PR has gone unapproved/unresolved
Testing
Testing for these changes should be pretty straightforward
Testing changes for #38
At this point in time, if you try to use the examples shown in
readme.md, Passport-WindowsAuth never responds to the client, nor does it print any errors to the console.If you're able to successfully authenticate after this PR, you'll know it's working as intended.
Testing changes for #74
You'll need to wait for LDAP to receive a connection reset event from the LDAP server. In an Active Directory environment, this should default to 15 minutes or 900 seconds. Once this timeout window occurs, as long as you added
options.reconnectin your LDAP client settings, you shouldn't see anything in the console. Prior to this PR, you would have seen an error event logged to the consoleExample error you shouldn't see:
Checklist