diff --git a/server.js b/server.js index 095f561..4999089 100644 --- a/server.js +++ b/server.js @@ -1414,7 +1414,12 @@ class ScriptExecutionHandler { // Build env export commands (e.g. for PHS_SILENT=1) const envExports = Object.entries(envVars) .filter(([key]) => key.startsWith('PHS_') || key.startsWith('var_')) - .map(([key, value]) => `export ${key}="${String(value).replace(/"/g, '\\"')}"`) + .map(([key, value]) => { + const safeValue = String(value) + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"'); + return `export ${key}="${safeValue}"`; + }) .join('; '); // Send the update command after a delay to ensure we're in the container @@ -1489,7 +1494,12 @@ class ScriptExecutionHandler { // Build env export commands (e.g. for PHS_SILENT=1) const envExports = Object.entries(envVars) .filter(([key]) => key.startsWith('PHS_') || key.startsWith('var_')) - .map(([key, value]) => `export ${key}="${String(value).replace(/"/g, '\\"')}"`) + .map(([key, value]) => { + const safeValue = String(value) + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"'); + return `export ${key}="${safeValue}"`; + }) .join('; '); // Send the update command after a delay to ensure we're in the container diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 9f09e0f..551522e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -14,10 +14,11 @@ export const metadata: Metadata = { description: "Manage and execute Proxmox helper scripts locally with live output streaming", icons: [ - { rel: "icon", url: "/favicon.png", type: "image/png" }, - { rel: "icon", url: "/favicon.ico", sizes: "any" }, - { rel: "apple-touch-icon", url: "/favicon.png" }, + { rel: "icon", url: "/favicon/favicon.png", type: "image/png" }, + { rel: "icon", url: "/favicon/favicon.ico", sizes: "any" }, + { rel: "apple-touch-icon", url: "/favicon/apple-touch-icon.png" }, ], + manifest: "/favicon/site.webmanifest", }; export const viewport: Viewport = { diff --git a/src/app/page.tsx b/src/app/page.tsx index abbc9ce..b6076aa 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,6 +1,7 @@ "use client"; import { useState, useRef, useEffect } from "react"; +import Image from "next/image"; import { ScriptsGrid } from "./_components/ScriptsGrid"; import { DownloadedScriptsTab } from "./_components/DownloadedScriptsTab"; import { InstalledScriptsTab } from "./_components/InstalledScriptsTab"; @@ -243,8 +244,15 @@ export default function Home() {