File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -317,17 +317,19 @@ added: v0.11.2
317317* ` path ` {string}
318318* Returns: {boolean}
319319
320- The ` path.isAbsolute() ` method determines if ` path ` is an absolute path.
320+ The ` path.isAbsolute() ` method determines if the literal ` path ` is absolute.
321+ Therefore, it’s not safe for mitigating path traversals.
321322
322323If the given ` path ` is a zero-length string, ` false ` will be returned.
323324
324325For example, on POSIX:
325326
326327``` js
327- path .isAbsolute (' /foo/bar' ); // true
328- path .isAbsolute (' /baz/..' ); // true
329- path .isAbsolute (' qux/' ); // false
330- path .isAbsolute (' .' ); // false
328+ path .isAbsolute (' /foo/bar' ); // true
329+ path .isAbsolute (' /baz/..' ); // true
330+ path .isAbsolute (' /baz/../..' ); // true
331+ path .isAbsolute (' qux/' ); // false
332+ path .isAbsolute (' .' ); // false
331333```
332334
333335On Windows:
You can’t perform that action at this time.
0 commit comments