<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/net, branch ruby_2_7</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Fix StartTLS stripping vulnerability</title>
<updated>2021-07-07T10:48:22+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2021-07-07T03:06:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a21a3b7d23704a01d34bd79d09dc37897e00922a'/>
<id>a21a3b7d23704a01d34bd79d09dc37897e00922a</id>
<content type='text'>
Reported by Alexandr Savca in https://hackerone.com/reports/1178562

Co-authored-by: Shugo Maeda &lt;shugo@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported by Alexandr Savca in https://hackerone.com/reports/1178562

Co-authored-by: Shugo Maeda &lt;shugo@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Ignore IP addresses in PASV responses by default, and add new option use_pasv_ip</title>
<updated>2021-07-07T10:47:46+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2021-07-07T03:05:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3ca1399150ed4eacfd2fe1ee251b966f8d1ee469'/>
<id>3ca1399150ed4eacfd2fe1ee251b966f8d1ee469</id>
<content type='text'>
This fixes CVE-2021-81810.
Reported by Alexandr Savca.

Co-authored-by: Shugo Maeda &lt;shugo@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes CVE-2021-81810.
Reported by Alexandr Savca.

Co-authored-by: Shugo Maeda &lt;shugo@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 07786edd66f59a529d6febb2e0fe901782991755,1917afa34bca55ba1ea578234132b7e4479ea3c9,0c611d7f4fce67c64bee4815f263c55ef15561c4:</title>
<updated>2020-09-29T22:50:06+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2020-09-29T22:50:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ea347990a5416c73a74f7dfa8a13b5ad5b7e79d4'/>
<id>ea347990a5416c73a74f7dfa8a13b5ad5b7e79d4</id>
<content type='text'>
	test/net/http/test_https.rb: Stop the error due to openssl 1.1.1h

	On some environments that uses OpenSSL 1.1.1h, the two tests now fail.

	http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z.fail.html.gz
	https://github.com/ruby/ruby/runs/1159288773?check_suite_focus=true

	```
	  1) Failure:
	TestNetHTTPS#test_get [/data/data/com.termux/files/home/cb/tmp/build/20200924T062352Z/ruby/test/net/http/test_https.rb:47]:
	&lt;"0\x82\x03\xED0\x82\x02\xD5\xA0\x03..."&gt; expected but was
	&lt;"0\x82\x03\xE30\x82\x02\xCB\xA0\x03..."&gt;.
	```

	Not sure why, but verify_callback now seems to receive only SERVER_CERT
	but not CA_CERT.
	It would be good to investigate the issue furthermore, but tentatively,
	I want to stop the failures.

	test/net/http/test_https.rb: the order of verify_callback seems to
	 vary

	... depending upon the environment.

	test/net/http/test_https.rb: The test logic was buggy

	The expected certs must be `[CA_CERT, SERVER_CERT]` before 1.1.1g and
	`[SERVER_CERT]` after 1.1.1h.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	test/net/http/test_https.rb: Stop the error due to openssl 1.1.1h

	On some environments that uses OpenSSL 1.1.1h, the two tests now fail.

	http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z.fail.html.gz
	https://github.com/ruby/ruby/runs/1159288773?check_suite_focus=true

	```
	  1) Failure:
	TestNetHTTPS#test_get [/data/data/com.termux/files/home/cb/tmp/build/20200924T062352Z/ruby/test/net/http/test_https.rb:47]:
	&lt;"0\x82\x03\xED0\x82\x02\xD5\xA0\x03..."&gt; expected but was
	&lt;"0\x82\x03\xE30\x82\x02\xCB\xA0\x03..."&gt;.
	```

	Not sure why, but verify_callback now seems to receive only SERVER_CERT
	but not CA_CERT.
	It would be good to investigate the issue furthermore, but tentatively,
	I want to stop the failures.

	test/net/http/test_https.rb: the order of verify_callback seems to
	 vary

	... depending upon the environment.

	test/net/http/test_https.rb: The test logic was buggy

	The expected certs must be `[CA_CERT, SERVER_CERT]` before 1.1.1g and
	`[SERVER_CERT]` after 1.1.1h.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "lib/net/http/response.rb: support raw deflate correctly"</title>
<updated>2019-12-16T14:39:10+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2019-12-16T14:39:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=251f5d8226dbde06ba06e980e3b741b45ae3826d'/>
<id>251f5d8226dbde06ba06e980e3b741b45ae3826d</id>
<content type='text'>
This reverts commit 5105240b1e851410020b3b3f1a2bead7ffdd4291.

In RFC 2616:

```
   deflate
        The "zlib" format defined in RFC 1950 [31] in combination with
        the "deflate" compression mechanism described in RFC 1951 [29].
```

So "Content-Encoding: deflate" means zlib format, not raw deflate.

[Bug #11268]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 5105240b1e851410020b3b3f1a2bead7ffdd4291.

In RFC 2616:

```
   deflate
        The "zlib" format defined in RFC 1950 [31] in combination with
        the "deflate" compression mechanism described in RFC 1951 [29].
```

So "Content-Encoding: deflate" means zlib format, not raw deflate.

[Bug #11268]
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/net/http/response.rb: support raw deflate correctly</title>
<updated>2019-12-16T14:20:42+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2019-12-16T14:20:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5105240b1e851410020b3b3f1a2bead7ffdd4291'/>
<id>5105240b1e851410020b3b3f1a2bead7ffdd4291</id>
<content type='text'>
Net::HTTP had used `Zlib::Inflate.new(32 + Zlib::MAX_WBITS)` for all
content encoding (deflate, zlib, and gzip).
But the argument `32 + Zlib::MAX_WBITS` means zlib and gzip decoding
with automatic header detection, so (raw) deflate compression had not
been supported.

This change makes it support raw deflate correctly by passing an
argument `-Zlib::MAX_WBITS` (which means raw deflate) to
`Zlib::Inflate.new`.  All deflate-mode tests are fixed too.

[Bug #11268]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Net::HTTP had used `Zlib::Inflate.new(32 + Zlib::MAX_WBITS)` for all
content encoding (deflate, zlib, and gzip).
But the argument `32 + Zlib::MAX_WBITS` means zlib and gzip decoding
with automatic header detection, so (raw) deflate compression had not
been supported.

This change makes it support raw deflate correctly by passing an
argument `-Zlib::MAX_WBITS` (which means raw deflate) to
`Zlib::Inflate.new`.  All deflate-mode tests are fixed too.

[Bug #11268]
</pre>
</div>
</content>
</entry>
<entry>
<title>Add more debug info</title>
<updated>2019-12-15T11:09:24+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2019-12-15T11:03:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a83c46e3fd1e3480404c6dda4c4cda73533a6a1d'/>
<id>a83c46e3fd1e3480404c6dda4c4cda73533a6a1d</id>
<content type='text'>
closed server doesn't have useful info.
So call inspect before close.
And add local debug code in comment.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20191215T092405Z.fail.html.gz
```
  1) Failure:
IMAPTest#test_connection_closed_without_greeting [/export/home/rubyci/chkbuild-tmp/tmp/build/20191215T092405Z/ruby/test/net/imap/test_imap.rb:483]:
[Net::IMAP::Error] exception expected, not #&lt;RuntimeError: {:e=&gt;#&lt;Errno::EINVAL: Invalid argument - connect(2) for [::1]:41748&gt;, :server=&gt;#&lt;TCPServer:(closed)&gt;, :port=&gt;41748, :server_addr=&gt;"::1"}&gt;.
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closed server doesn't have useful info.
So call inspect before close.
And add local debug code in comment.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20191215T092405Z.fail.html.gz
```
  1) Failure:
IMAPTest#test_connection_closed_without_greeting [/export/home/rubyci/chkbuild-tmp/tmp/build/20191215T092405Z/ruby/test/net/imap/test_imap.rb:483]:
[Net::IMAP::Error] exception expected, not #&lt;RuntimeError: {:e=&gt;#&lt;Errno::EINVAL: Invalid argument - connect(2) for [::1]:41748&gt;, :server=&gt;#&lt;TCPServer:(closed)&gt;, :port=&gt;41748, :server_addr=&gt;"::1"}&gt;.
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Move `rescue` for debug into block of assert_raise</title>
<updated>2019-12-12T13:05:14+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2019-12-12T13:04:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=68321dd1fa6f55e578bc9776f906ee1f948c7095'/>
<id>68321dd1fa6f55e578bc9776f906ee1f948c7095</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add more debug info when Errno::EINVAL</title>
<updated>2019-12-12T08:38:27+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2019-12-12T08:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c20dd2f75491fc6e78dab55b492c507ee3bb670d'/>
<id>c20dd2f75491fc6e78dab55b492c507ee3bb670d</id>
<content type='text'>
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20191212T072406Z.fail.html.gz
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20191212T072406Z.fail.html.gz
</pre>
</div>
</content>
</entry>
<entry>
<title>fix ipaddr parameter of Net::HTTP.start to support proxy</title>
<updated>2019-12-10T10:12:21+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2019-12-10T10:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=af11efd377965b6601bb54aa79072ef0789dc525'/>
<id>af11efd377965b6601bb54aa79072ef0789dc525</id>
<content type='text'>
54072e329cab7207fba133caba4fc12b45add8f9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
54072e329cab7207fba133caba4fc12b45add8f9
</pre>
</div>
</content>
</entry>
<entry>
<title>test/net/http/test_https.rb (test_get_SNI_failure): stop proxy settings</title>
<updated>2019-12-10T00:41:33+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2019-12-10T00:41:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=660388f6c5b148ea6f84d589482391bf78f35c6b'/>
<id>660388f6c5b148ea6f84d589482391bf78f35c6b</id>
<content type='text'>
Because the test fails under HTTP proxy settings.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20191210T000004Z.fail.html.gz
```
  1) Failure:
TestNetHTTPS#test_get_SNI_failure [/export/home/users/chkbuild/cb-gcc/tmp/build/20191210T000004Z/ruby/test/net/http/test_https.rb:81]:
[OpenSSL::SSL::SSLError] exception expected, not #&lt;Net::HTTPServerException: 403 "Forbidden"&gt;.
```

The new SNI feature introduced at 54072e329c may need to be improved for
HTTP proxy environment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because the test fails under HTTP proxy settings.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20191210T000004Z.fail.html.gz
```
  1) Failure:
TestNetHTTPS#test_get_SNI_failure [/export/home/users/chkbuild/cb-gcc/tmp/build/20191210T000004Z/ruby/test/net/http/test_https.rb:81]:
[OpenSSL::SSL::SSLError] exception expected, not #&lt;Net::HTTPServerException: 403 "Forbidden"&gt;.
```

The new SNI feature introduced at 54072e329c may need to be improved for
HTTP proxy environment.
</pre>
</div>
</content>
</entry>
</feed>
