[core] Share paths and errors: decode once and refuse invalid UTF-8 and any NFKC look-alike of path structure, dots before any escape; hide everything before the last @ of a URL
This commit is contained in:
@@ -420,6 +420,17 @@ fn no_path_trick_escapes_the_prefix() {
|
||||
("/a", "/a/.;x/b"),
|
||||
("/a", "/a;/../b"),
|
||||
("/a", "/a/%2E./b"),
|
||||
// QC fix round 2: NFKC look-alikes and dots before an encoded byte.
|
||||
("/a", "/a/%e2%80%a5/b"),
|
||||
("/a", "/a/%E2%80%A5/b"),
|
||||
("/a", "/a/%ef%b8%b0/b"),
|
||||
("/a", "/a/..%ef%b9%a8secret"),
|
||||
("/a", "/a/..%3f/b"),
|
||||
("/a", "/a/..%3F"),
|
||||
("/a", "/a/..%23/b"),
|
||||
("/a", "/a/%e3%80%80/b"),
|
||||
("/a", "/a/%zz/b"),
|
||||
("/a", "/a/%e2%9c"),
|
||||
];
|
||||
for (prefix, path) in cases {
|
||||
assert!(
|
||||
|
||||
Reference in New Issue
Block a user