diff --git a/.changeset/kind-showers-exist.md b/.changeset/kind-showers-exist.md new file mode 100644 index 0000000000..1434a62b2f --- /dev/null +++ b/.changeset/kind-showers-exist.md @@ -0,0 +1,5 @@ +--- +"react-email": patch +--- + +fix static file serving security issue with logging diff --git a/packages/react-email/src/utils/preview/serve-static-file.ts b/packages/react-email/src/utils/preview/serve-static-file.ts index 1b68e36a6c..3c2c960fcd 100644 --- a/packages/react-email/src/utils/preview/serve-static-file.ts +++ b/packages/react-email/src/utils/preview/serve-static-file.ts @@ -38,7 +38,8 @@ export const serveStaticFile = async ( } else { const sanitizedFilePath = fileAbsolutePath.replace(/\n|\r/g, ''); console.error( - `Could not read file at ${sanitizedFilePath} to be served, here's the exception:`, + `Could not read file at %s to be served, here's the exception:`, + sanitizedFilePath, exception, );