sanitize-html
[Node.js] module로 내보내기 / 입력 정보에 대한 보안 / 출력 정보에 대한 보안
[Node.js] module로 내보내기 / 입력 정보에 대한 보안 / 출력 정보에 대한 보안 module로 내보내는 법 //module file module.exports = 객체; //using module var module = require(경로); 입력 정보에 대한 보안 var path = require('path'); var filteredId = path.parse(queryData.id).base; fs.readFile(`data/${filteredID}`, 'utf8', function(){}... path라는 모듈을 이용해서 path.parse.base를 하면 ../password.js와 같이 경로를 탐색하는 입력값이 들어와도 password.js라는 값만 filteredId에 보내게 ..