Repository navigation
Conversation
bagder
force-pushed
the
bagder/ssh-opts-unconditional
branch
2 times, most recently
from
September 5, 2026 20:31
dafdf24 to
4a9c0bb
Compare
This comment was marked as resolved.
This comment was marked as resolved.
If the protocols are built-in
Since we don't know that SCP or SFTP will be used
bagder
force-pushed
the
bagder/ssh-opts-unconditional
branch
from
September 5, 2026 21:56
25d0e1b to
12a0936
Compare
There was a problem hiding this comment.
🟡 Changes recommended
ssh_setopts() gating and known-hosts fallback path handling currently introduce incorrect/non-portable behavior and cause SSH options to be emitted for non-SSH transfers.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates curl’s config2setopts SSH option handling to ensure SCP/SFTP security-related options (notably known-hosts handling) are always configured, and adjusts an existing --libcurl test fixture to tolerate newly emitted SSH options.
Changes:
- Modified
ssh_setopts()invocation/signature and its known-hosts fallback behavior insrc/config2setopts.c. - Updated
tests/data/test1679to stripCURLOPT_SSH_KNOWNHOSTSfrom generated--libcurloutput.
File summaries
| File | Description |
|---|---|
| src/config2setopts.c | Alters when/how SSH-related libcurl options (known-hosts and hostkey settings) are applied during option setup. |
| tests/data/test1679 | Updates --libcurl output normalization by stripping CURLOPT_SSH_KNOWNHOSTS. |
Review details
Suppressed comments (1)
src/config2setopts.c:1046
- protocol_setopts() was updated to call ssh_setopts(config, curl) without passing use_proto. If ssh_setopts is gated on use_proto (as it should be), this call site needs to pass it through so SSH options are only set for SCP/SFTP transfers.
result = ssh_setopts(config, curl);
if(setopt_bad(result))
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
No description provided.