Commit fc0ff9d
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 fc0ff9d
4 files changed
Lines changed: 33 additions & 15 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 | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 87 | | |
94 | 88 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | 89 | | |
100 | 90 | | |
101 | 91 | | |
| |||
111 | 101 | | |
112 | 102 | | |
113 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
114 | 124 | | |
115 | 125 | | |
116 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
| 821 | + | |
821 | 822 | | |
822 | 823 | | |
823 | 824 | | |
| |||
| 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