Platform independent path validation
This commit is contained in:
parent
6615e2788a
commit
10d6be5f82
@ -17,4 +17,8 @@ describe('safe path', () => {
|
|||||||
it('accept happy path', () => {
|
it('accept happy path', () => {
|
||||||
expect(safePath('./uplodas', 'foobar')).toBe(true);
|
expect(safePath('./uplodas', 'foobar')).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('accept names starting with `..`', () => {
|
||||||
|
expect(safePath('./uplodas', '..foobar')).toBe(true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user