File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -356,9 +356,10 @@ exports.getSupportFiles = (bsConfig, isA11y) => {
356
356
fs . mkdirSync ( supportFolderPath ) ;
357
357
cleanupParams . deleteSupportDir = true ;
358
358
}
359
- const supportFilePath = path . join ( supportFolderPath , `tmpBstackSupportFile.${ extension } ` ) ;
359
+ const sanitizedExtension = extension . replace ( / ( \. \. \/ | \. \/ | \/ \/ ) / g, '' ) ;
360
+ const supportFilePath = path . join ( supportFolderPath , `tmpBstackSupportFile.${ sanitizedExtension } ` ) ;
360
361
fs . writeFileSync ( supportFilePath , "" ) ;
361
- supportFile = `/cypress/support/tmpBstackSupportFile.${ extension } ` ;
362
+ supportFile = `/cypress/support/tmpBstackSupportFile.${ sanitizedExtension } ` ;
362
363
const currEnvVars = bsConfig . run_settings . system_env_vars ;
363
364
const supportFileEnv = `CYPRESS_SUPPORT_FILE=${ supportFile . substring ( 1 ) } ` ;
364
365
if ( ! currEnvVars ) {
You can’t perform that action at this time.
0 commit comments