The behavior of `Date.parse` is implementation-dependent and hence cannot be relied on for security purposes. In particular, the implementation in Node.js does accept strings such as `../../../etc/foobar-0` as valid (thanks to the trailing digit). The failure to properly validate the filename is not exploitable, as slashes will never be contained in `parts[2]` thanks to the foregoing `split`, but it is probably still better to have a proper validation in place.dev_h
|
||
89 | 89 |
|
90 | 90 |
|
91 | 91 |
|
92 |
|
|
92 |
|
|
93 | 93 |
|
94 | 94 |
|
95 | 95 |
|