gk
const type = path.extname(config);
const filepath = path.resolve(process.cwd(), config);
const data = fs.readFileSync(filepath, 'utf8');
return [data, type];
};
Size: a a a
gk
gk
gk
d
gk
d
gk
d
KS
d
C
../../../../etc/passwd
?gk
gk
d
gk
gk
gk
d
const getData = (config) => {
const type = path.extname(config);
if (path.isAbsolute(config) && !config.includes(process.cwd())) config = '.' + config;
const pathFile = path.resolve(config);
const data = fs.readFileSync(pathFile, 'utf8');
return [data, type];
};
d
gk