You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P2] share upload generates an invalid curl command for content types with shell metacharacters #69
share upload interpolates form fields into a shell command without quoting. Ordinary content types containing a semicolon produce a command that cannot be executed.
Reproduction
mcli share upload --content-type 'text/plain; charset=utf-8' ALIAS/BUCKET/object
# replace <FILE> in the generated command and execute it with bash
Observed
The generated command contains:
-F Content-Type=text/plain; charset=utf-8
When executed, the shell treats the semicolon as a command separator. The generated command returns 127 and the upload request is malformed.
Generated commands must be valid shell commands for all supported values. Every URL, form name, and form value must be quoted safely; text fields should use --form-string where appropriate.
Acceptance
Content types with parameters, spaces, quotes, backslashes, dollar signs, and shell metacharacters generate executable commands.
Recursive key templates continue to work.
Add unit tests for generated command parsing/execution or compare against a shell-safe argv construction.
Do not expose credentials beyond the existing share URL contract.
Confirmed on current main 07753f7efc5036465bb79dadde031ec07f172505 with an actual generated curl command execution.
Generated upload commands now quote every complete POSIX-shell argument and use --form-string for literal fields. Tests execute the generated command and verify both argv and multipart content; HTTP/TLS functional tests and live SILO uploads pass. The changelog documents the execution change: use a POSIX shell (or sh -c "$upload" for a stored command), not direct variable expansion or cmd.exe. Bilingual reference updates are prepared in pgsty/silo.pgsty.com#52.
Activity
docs: clarify release-candidate behavior and compatibility boundaries
Vonng commentedon Nov 8, 2026
Fixed on
mainin #74 (bfb58768).Generated upload commands now quote every complete POSIX-shell argument and use
--form-stringfor literal fields. Tests execute the generated command and verify both argv and multipart content; HTTP/TLS functional tests and live SILO uploads pass. The changelog documents the execution change: use a POSIX shell (orsh -c "$upload"for a stored command), not direct variable expansion orcmd.exe. Bilingual reference updates are prepared in pgsty/silo.pgsty.com#52.