image scp: preserve usernames containing an "@"#28897
Open
ROKUMATE wants to merge 1 commit into
Open
Conversation
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
danishprakash
left a comment
Member
There was a problem hiding this comment.
Overall LGTM, but can you squash your commits into one and sign it?
d2bd334 to
6c69383
Compare
Author
|
check now |
Honny1
reviewed
Jun 10, 2026
Honny1
left a comment
Contributor
There was a problem hiding this comment.
I did a fast check, and it seems good. Can you please add an integration test?
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
6c69383 to
c1a1ffb
Compare
Author
|
Added the integration test as well 👍 |
|
OP from the original issue here, I'd just like to say thanks a lot for implementing this ❤️ |
Author
|
@runiq thanks to you to for helping me find my first issue for contributation 🙇🏼 |
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.
Problem
podman image scpparses theuser@localhost::imageargument by cutting on thefirst
@. When the username itself contains an@— e.g. an Active Directoryaccount like
user@domain— it gets truncated to justuser:Impact
Users on AD-joined (or any
user@domain) machines can't usepodman image scpto copy images between users — the local user lookup fails before the transfer
even starts.
Fix
In
ParseImageSCPArg, the@localhost::case only ever matches that exactseparator, so split the argument on
@localhost::instead of the bare@. Thiskeeps the full username (including any
@domain) and leaves the remoteuser@host::SSH path unchanged.Test
Added
TestParseImageSCPArginpkg/domain/utils/scp_test.gocovering both theplain
userand theuser@domaincases.go test ./pkg/domain/utils/passes.Fixes: #27655