NUL-termination for files-from-raw lists · Issue #9537 · rclone/rclone · GitHub
Skip to content

NUL-termination for files-from-raw lists #9537

Description

@Hawk777

Before you start

  • I have searched the forum and the existing issues and this hasn't already been requested.
  • I have checked the latest beta and this feature doesn't already exist.

Associated forum post URL

No response

rclone version

rclone 1.74.2

  • os/version: gentoo 2.18 (64 bit)
  • os/kernel: 6.18.35-gentoo-r1 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.26.3-X:nodwarf5
  • go/linking: dynamic
  • go/tags: none

What problem are you trying to solve?

It is pretty much a Linux standard that, if you want to put a list of filenames (or indeed any strings) in a file in a really seriously robust, bullet-proof way, you do it by NUL-terminating each filename, because NUL is the only thing that can’t be part of one (for example, find -print0, xargs -0, mapfile -d'', and so on). As far as I can see from the documentation, rclone’s --files-from-raw uses newline-terminated filenames, and has no similar option, making it not fully general (e.g. if you’re trying to transfer files created by untrusted users).

How do you think rclone should be changed to solve that?

Have an option to treat the entries in a --files-from-raw file as being NUL-terminated rather than NL-terminated.

Getting involved

  • I'm willing to help implement, test or fund this feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions