Skip to content

fix(traefik): preserve remote YAML shell quotes#4725

Open
yusoofsh wants to merge 1 commit into
Dokploy:canaryfrom
yusoofsh:fix/remote-traefik-yaml-writer
Open

fix(traefik): preserve remote YAML shell quotes#4725
yusoofsh wants to merge 1 commit into
Dokploy:canaryfrom
yusoofsh:fix/remote-traefik-yaml-writer

Conversation

@yusoofsh

@yusoofsh yusoofsh commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • write remote Traefik YAML via a base64 payload instead of single-quoted echo
  • preserve shell-sensitive YAML values such as CSP keywords ('unsafe-inline', 'self', 'none')
  • add a regression test that decodes the generated remote command payload and asserts the quotes survive

Why

writeTraefikConfigRemote currently serializes YAML and sends it through:

echo '${yaml}' > ${configPath}

If the YAML contains single quotes, the remote shell consumes them before writing the file. This corrupts valid values such as Content-Security-Policy directives.

Verification

  • git diff --check
  • Node self-check confirmed the base64 command decodes to a CSP value containing 'unsafe-inline' and 'self'

Could not run the focused Vitest/Biome checks locally because dependency installation failed before dev binaries were available:

ERR_NUB_TRUST_DOWNGRADE for @octokit/plugin-paginate-rest@9.2.2

Write remote Traefik YAML through a base64 payload instead of a single-quoted shell echo. This prevents shell parsing from stripping quotes in values such as CSP keywords.

Co-Authored-By: Codex <noreply@openai.com>
@yusoofsh
yusoofsh requested a review from Siumauricio as a code owner July 5, 2026 03:55
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Jul 5, 2026
@Dokploy Dokploy deleted a comment from AminDhouib Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant