728x90 Security1 [Node] 입출력 보안 Security path nodejs path parse node > var path = require('path'); undefined > path.parse('../password.js'); {root: '', dir: '..', base: 'password.js', ext: '.js', name: ''password' } > path.parse('../password.js').base; 'password.js' 사용자로부터 모든 경로가 들어오는 곳을 변경해 줍니다. var path = require('path'); var filteredId = path.parse(queryDate.id).base; fs.readFile(`data/${filteredId}`, 'utf8', function(err, .. 2021. 5. 2. 이전 1 다음 728x90