Skip to content
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

keep trailing delimiter with SFTP open #743

Merged
merged 3 commits into from
Nov 1, 2024
Merged

Conversation

JacobBarthelmeh
Copy link
Contributor

@JacobBarthelmeh JacobBarthelmeh commented Sep 30, 2024

ZD 18566

Fix for SFTP cases with trailing delimiter.

OpenSSH client 9.6 (which does a SFTP command instead of SCP, -O restores using SCP protocol)

mkdir /tmp/subfolder
scp /tmp/test.txt [email protected]:/tmp/subfolder/test/

Before this change wolfSSH would allow test.txt to be copied to /tmp/subfolder/test. After this change the command correctly fails.

@JacobBarthelmeh JacobBarthelmeh self-assigned this Sep 30, 2024
@JacobBarthelmeh JacobBarthelmeh changed the title keep trailing delimiter with SFTP path clean keep trailing delimiter with SFTP open Oct 4, 2024
src/internal.c Outdated
out[0] = '/';
curSz++;
}
out[curSz] = 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

sanity checks needed on curSz before use (thanks @douzzer )

src/internal.c Show resolved Hide resolved
@douzzer douzzer merged commit d3a8ec6 into wolfSSL:master Nov 1, 2024
67 checks passed
jefferyq2 pushed a commit to jefferyq2/wolfssh that referenced this pull request Nov 4, 2024
keep trailing delimiter with SFTP open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants