Skip to content

Server converts a forwarded --files-from list with --iconv even without -s; invalid bytes become U+FFFD #8864

Done

Description

@oferchen

An oc-rsync server converts a forwarded --files-from list with --iconv even when the client did not send -s (--protect-args). rsync 3.5.2 converts that list only under protect-args: compat.c:820-827 sets filesfrom_convert only when protect_args && files_from.

Measured with a UTF-8 client, an ISO-8859-1 server tree, --iconv and no -s, pulling a name with a non-ASCII byte:

exit result
rsync 3.5.2 23 the sender looks up the unconverted name and reports it missing
oc-rsync 0 converts the name and copies the file

The conversion is also lossy: a byte that is invalid in the source charset becomes U+FFFD (the link_stat line shows caf\357\277\275), where rsync 3.5.2's iconvbufs passes bad bytes through (ICB_INCLUDE_BAD) and shows caf\351.

Expected: the server converts a forwarded list exactly when rsync 3.5.2 does, and passes invalid bytes through unchanged, checked against 3.5.2 in both directions (with and without -s).

Activity

  1. added this to the v0.6.5 milestone on Nov 26, 2026
  2. added
    bug
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions