fix(js): probe SMBv1 support after SMB2 negotiation - #7430
Conversation
`ConnectSMBInfoMode` only tried SMBv1 when SMB2/3 negotiation failed so dual-stack servers could report `SupportV1` as false even when SMBv1 was enabled. Run a same-target SMBv1 probe after successful SMB2/3 negotiation and merge the support flag into the returned log w/o changing the negotiated SMB2/3 version. Fixes #4832 Signed-off-by: Dwi Siswanto <git@dw1.io>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe PR refactors SMB version detection to properly detect SMBv1 support. A new type abstraction and probe function are introduced to test SMBv1 capability after SMBv2/v3 negotiation succeeds. The main connection handler is simplified by centralizing dialing logic and integrating the new probe. Unit tests cover successful probes and error conditions. ChangesSMBv1 Probe Detection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Proposed changes
ConnectSMBInfoModeonly tried SMBv1 when SMB2/3negotiation failed so dual-stack servers could
report
SupportV1as false even when SMBv1 wasenabled.
Run a same-target SMBv1 probe after successful
SMB2/3 negotiation and merge the support flag into
the returned log w/o changing the negotiated
SMB2/3 version.
Fixes #4832
Proof
Checklist
Summary by CodeRabbit
Bug Fixes
Tests