We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2d4a7d3 + ad0a974 commit a2c0921Copy full SHA for a2c0921
apps/OpenSignServer/cloud/parsefunction/pdf/PDF.js
@@ -384,7 +384,7 @@ async function PDF(req) {
384
isCompleted = true;
385
}
386
const randomNumber = Math.floor(Math.random() * 5000);
387
- const docName = _resDoc?.Name?.replace(/\s+/g, '_')?.toLowerCase();
+ const docName = _resDoc?.Name?.replace(/[^a-zA-Z0-9._-]/g, '_')?.toLowerCase();
388
const name = `signed_${docName}_${randomNumber}.pdf`;
389
const filePath = `./exports/${name}`;
390
let pdfSize = PdfBuffer.length;
0 commit comments