Commit 2e760e3
Subpath: simplify parsing
This PR:
- Moves the check for `.` and `..` segments after UTF-8 decoding. This ensures that overlong encoding of `.` (like `%C0%AE`, `%E0%80%AE`, `%F0%80%80%AE`) are also discarded.
- Requires the parser to throw an error if an (percent-encoded) solidus `/` is encountered in any path segment.
Signed-off-by: Piotr P. Karwasz <piotr@github.copernik.eu>
Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>1 parent 4d2de7e commit 2e760e3
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
17 | 15 | | |
18 | | - | |
19 | 16 | | |
| 17 | + | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
0 commit comments