Skip to content

Commit f72bc68

Browse files
committed
Sanitize commander inputs in buildScripts/tools/createExample.mjs #7990
1 parent 8a334dc commit f72bc68

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

buildScripts/tools/createExample.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import fs from 'fs-extra';
55
import os from 'os';
66
import path from 'path';
77
import {fileURLToPath} from 'url';
8+
import {sanitizeInput} from '../util/Sanitizer.mjs';
89

910
const
1011
__dirname = fileURLToPath(new URL('../../', import.meta.url)),
@@ -15,8 +16,8 @@ const
1516

1617
program
1718
.version(packageJson.version)
18-
.option('-b, --baseClass <value>')
19-
.option('-c, --className <value>')
19+
.option('-b, --baseClass <value>', 'The base class to extend', sanitizeInput)
20+
.option('-c, --className <value>', 'The class name', sanitizeInput)
2021
.allowUnknownOption()
2122
.parse(process.argv);
2223

0 commit comments

Comments
 (0)