Commit 4f51f62
[rubygems/rubygems] Restrict what schemes are acceptable in the remote fetcher
The remote fetcher only works with certain schemes (`http`, `https`,
`s3`, and `file`). It's possible for other schemes to show up in this
code and it can cause bugs.
Before this patch, doing `gem install path:///hello` would result in an
infinite loop because this function would do `send "fetch_path"`,
calling itself forever. Now we see an exception.
I think we should validate gem names earlier, but it's really best
practice to restrict the possible strings passed to `send`.
ruby/rubygems@54e2781b731 parent 9a80258 commit 4f51f62
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
253 | 256 | | |
254 | 257 | | |
255 | 258 | | |
| |||
0 commit comments