Commit 896dcff
committed
Polish GHSA-r98x-p6m8-xcrv fix
Three small follow-ups to c7517ab:
1. Hoist the duplicate `./` guard above the if/elsif. The guard is a
no-op when neither base_uri nor persistent is set, so it's safe to
factor out — and it lets the two-branch comment collapse into one.
2. Strengthen the persistent regression test. Asserting only on
`req.uri.host` hides an intermediate where make_request_uri returns
a URI with host "example.com." (trailing dot), which only normalises
away because HTTP::URI#normalize_host strips trailing dots. Pin the
full URI (`origin` + `to_s`) so a future change to normalize_host
that lets the dot leak through is caught here.
3. CHANGELOG accuracy. The persistent branch never called `URI#merge`
— it was string concatenation. Distinguish the two branches and
reference RFC 3986 §5.2 for the underlying rule.1 parent c7517ab commit 896dcff
3 files changed
Lines changed: 19 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
86 | 94 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | 97 | | |
100 | 98 | | |
101 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
664 | 669 | | |
665 | 670 | | |
666 | 671 | | |
| |||
0 commit comments