comparison tests/test-audit-path @ 5141:d316124ebbea

Make audit_path more stringent. The following properties of a path are now checked for: - under top-level .hg - starts at the root of a windows drive - contains ".." - traverses a symlink (e.g. a/symlink_here/b) - inside a nested repository If any of these is true, the path is rejected. The check for traversing a symlink is arguably stricter than necessary; perhaps we should be checking for symlinks that point outside the repository.
author Bryan O'Sullivan <bos@serpentine.com>
date Fri, 10 Aug 2007 10:46:03 -0700
parents
children
comparison
equal deleted inserted replaced
5140:f6c520fd70cf 5141:d316124ebbea
1 #!/bin/sh
2
3 hg init
4
5 echo % should fail
6 hg add .hg/00changelog.i
7
8 mkdir a
9 echo a > a/a
10 hg ci -Ama
11 ln -s a b
12 echo b > a/b
13
14 echo % should fail
15 hg add b/b
16
17 echo % should succeed
18 hg add b
19
20 echo % should still fail - maybe
21 hg add b/b
22
23 exit 0