Skip to content

Fix path errors in moderated SFTP#62281

Merged
atburke merged 1 commit intomasterfrom
atburke/moderated-sftp-paths
Dec 22, 2025
Merged

Fix path errors in moderated SFTP#62281
atburke merged 1 commit intomasterfrom
atburke/moderated-sftp-paths

Conversation

@atburke
Copy link
Copy Markdown
Contributor

@atburke atburke commented Dec 15, 2025

This change fixes a few bugs in moderated SFTP related to paths:

  • Fixed missing tilde expansion blocking transfers in sftp command (/home/alice/foo/bar and ~/foo/bar are now treated as the same path)
  • Fixed premature tilde expansion when creating an upload request (causing the client to not be able to find the file object after approval)
  • Expanded error messages for sftp request validation

Related: #62165

Changelog: Fixed tilde expansion for moderated SFTP

Test plan

Ensure all transfers succeed in a moderated session:

  • Upload
    • Absolute path (/home/foo/bar/baz.txt)
    • Relative path (bar/baz.txt)
    • Relative path with tilde (~/bar/baz.txt)
  • Download
    • Absolute path (/home/foo/bar/baz.txt)
    • Relative path (bar/baz.txt)
    • Relative path with tilde (~/bar/baz.txt)

Comment thread lib/srv/sess.go
Comment thread tool/teleport/common/sftp.go Outdated
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from boxofrad December 22, 2025 17:51
@atburke atburke force-pushed the atburke/moderated-sftp-paths branch from b8c24d8 to ad81e6e Compare December 22, 2025 19:50
@atburke atburke enabled auto-merge December 22, 2025 19:50
This change fixes handling non-absolute paths in
moderated sftp.
@atburke atburke force-pushed the atburke/moderated-sftp-paths branch from ad81e6e to cb5fa7f Compare December 22, 2025 21:10
@atburke atburke added this pull request to the merge queue Dec 22, 2025
Merged via the queue into master with commit b7158a4 Dec 22, 2025
42 checks passed
@atburke atburke deleted the atburke/moderated-sftp-paths branch December 22, 2025 21:54
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@atburke See the table below for backport results.

Branch Result
branch/v17 Failed
branch/v18 Create PR

atburke added a commit that referenced this pull request Dec 22, 2025
This change fixes handling non-absolute paths in
moderated sftp.
github-merge-queue bot pushed a commit that referenced this pull request Dec 30, 2025
This change fixes handling non-absolute paths in
moderated sftp.
21KennethTran pushed a commit that referenced this pull request Jan 6, 2026
This change fixes handling non-absolute paths in
moderated sftp.
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.

3 participants