Summary
The error page that Quasar CLI shows when an SSR or SSG render throws in development serializes every variable in process.env, every request header and every cookie into the HTTP response, and the dev server binds 0.0.0.0 by default. Any host that can reach the port therefore gets the developer's cloud keys, registry tokens and database URLs from a single unauthenticated GET. The same page embeds that data inside a <script> element behind a replaceAll('</script>', ...) guard that is ASCII-case-sensitive and requires a literal >, so </SCRIPT>, </script > and </script/> all escape the element and give script execution in the dev server's origin.
Details
renderSSRError() builds the page by splicing a JSON blob into a prebuilt bundle (utils/render-ssr-error/src/index.js):
errorHtml:
before +
JSON.stringify(data).replaceAll('</script>', String.raw`<\/script>`) +
after
before and after are the two halves of the compiled error-page UI, split inside a <script type="module"> element, so data is emitted as a JS object literal in raw script text. The data itself comes from utils/render-ssr-error/src/env.js:
function getEnvironmentVariablesData () {
return Object.keys(process.env).reduce((acc, name) => {
acc[ name ] = process.env[ name ]
return acc
}, {})
}
export function getEnv (req) {
return {
Request: getRequestData(req),
Headers: getHeadersData(req),
Cookies: getCookiesData(req),
'Shell environment variables': getEnvironmentVariablesData()
}
}
The page is served by serve.devError({ err, req }) in app-vite/lib/modes/ssr/ssr-devserver.js and by the SSG equivalent, which the generated render middleware calls on any render exception. The dev server listens on every interface because overrides Vite's default: