Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private validateAndDecodeFilename(fileList: string[], entry: any) : string {
let validName = entry.fileName.toString().split('\\').join(path.sep);
validName = decodeURI(validName);
const errorMessage = yauzl.validateFileName(validName);
if (errorMessage != null) {
throw new ExtractError("unzip filename validation failed");
}
fileList.push(validName);
return validName;
}
}