mirror of
https://github.com/goldbergyoni/nodebestpractices.git
synced 2025-10-28 03:25:55 +08:00
Reflecion of #589
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// insecure, as helperPath variable may have been modified by user input
|
// insecure, as helperPath variable may have been modified by user input
|
||||||
const uploadHelpers = require(helperPath);
|
const badWayToRequireUploadHelpers = require(helperPath);
|
||||||
|
|
||||||
// secure
|
// secure
|
||||||
const uploadHelpers = require('./helpers/upload');
|
const uploadHelpers = require('./helpers/upload');
|
||||||
|
|||||||
Reference in New Issue
Block a user