Compare commits

..

1 Commits

2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "site-gateway", "name": "site-gateway",
"version": "0.11.89", "version": "0.11.90",
"private": true, "private": true,
"description": "Site Gateway: simple self-hosted website publishing, reverse proxying, and automatic HTTPS.", "description": "Site Gateway: simple self-hosted website publishing, reverse proxying, and automatic HTTPS.",
"type": "module", "type": "module",
+6 -1
View File
@@ -328,7 +328,12 @@ function caddySiteAddress(item) {
} }
function caddyQuote(value) { function caddyQuote(value) {
return `"${String(value).replaceAll("\\", "\\\\").replaceAll('"', '\\"').replaceAll("\n", " ")}"`; // Caddy's Caddyfile lexer only special-cases \" inside a quoted string — it does NOT
// collapse \\ into a single backslash (confirmed in caddyconfig/caddyfile/lexer.go: "all is
// literal in quoted area, so only escape quotes"). Doubling backslashes here, as this used to,
// corrupts any value that legitimately contains one (e.g. a regex like eval\( becomes eval\\(,
// which Caddy then reads as an escaped backslash followed by an unclosed real group).
return `"${String(value).replaceAll('"', '\\"').replaceAll("\n", " ")}"`;
} }
function accessDirectives(accessListId) { function accessDirectives(accessListId) {