More test cases

This commit is contained in:
Valentin Brandl 2024-08-17 15:38:23 +02:00
parent 019d1d2e62
commit 1557d2cca9
Signed by: vbrandl
GPG Key ID: CAD4DA1A789125F9

View File

@ -21,4 +21,12 @@ describe('safe path', () => {
it('accept names starting with `..`', () => { it('accept names starting with `..`', () => {
expect(safePath('./uplodas', '..foobar')).toBe(true); expect(safePath('./uplodas', '..foobar')).toBe(true);
}); });
it('accept names ending with `..`', () => {
expect(safePath('./uplodas', 'foobar..')).toBe(true);
});
it('accept names starting and ending with `..`', () => {
expect(safePath('./uplodas', '..foobar..')).toBe(true);
});
}); });