Commit graph

42330 commits

Author SHA1 Message Date
usa
1beda2970b merge revision(s) 60172,60189,60208,60210,60211: [Backport #14005]
webrick: do not hang acceptor on slow TLS connections

	OpenSSL::SSL::SSLSocket#accept may block indefinitely on clients
	which negotiate the TCP connection, but fail (or are slow) to
	negotiate the subsequent TLS handshake.  This prevents the
	multi-threaded WEBrick server from accepting other connections.

	Since the TLS handshake (via OpenSSL::SSL::SSLSocket#accept)
	consists of normal read/write traffic over TCP, handle it in the
	per-client thread, instead.

	Furthermore, using non-blocking accept() is useful for non-TLS
	sockets anyways because spurious wakeups are possible from
	select(2).

	* lib/webrick/server.rb (accept_client): use TCPServer#accept_nonblock
	  and remove OpenSSL::SSL::SSLSocket#accept call
	* lib/webrick/server.rb (start_thread): call OpenSSL::SSL::SSLSocket#accept
	* test/webrick/test_ssl_server.rb (test_slow_connect): new test
	  [ruby-core:83221] [Bug #14005]

	webrick: fix up r60172

	By making the socket non-blocking in r60172, TLS/SSL negotiation
	via the SSL_accept function must handle non-blocking sockets
	properly and retry on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE.
	OpenSSL::SSL::SSLSocket#accept cannot do that properly with a
	non-blocking socket, so it must use non-blocking logic of
	OpenSSL::SSL::SSLSocket#accept_nonblock.

	Thanks to MSP-Greg (Greg L) for finding this.

	* lib/webrick/server.rb (start_thread): use SSL_accept properly
	  with non-blocking socket.
	  [Bug #14013] [Bug #14005]

	webrick: fix up r60172 and revert r60189

	Thanks to MSP-Greg (Greg L) for helping with this.

	* lib/webrick/server.rb (start_thread): ignore ECONNRESET, ECONNABORTED,
	  EPROTO, and EINVAL on TLS negotiation errors the same way they
	  were ignored before r60172 in the accept_client method of the
	  main acceptor thread.
	  [Bug #14013] [Bug #14005]

	webrick: fix up r60172 and r60208

	Thanks to MSP-Greg (Greg L) for helping with this.

	* lib/webrick/server.rb (start_thread): fix non-local return
	  introduced in r60208

	webrick: fix up r60172 and r60210

	Thanks to MSP-Greg (Greg L) for helping with this.

	* lib/webrick/server.rb (start_thread): properly fix non-local return
	  introduced in r60208 and r60210

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@61240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14 13:33:54 +00:00
usa
d69b1e3b30 merge revision(s) 58499,58500: [Backport #13181]
parse.y: fix line in rescue

	* parse.y (set_line_body, primary): fix line number of bodystmt as
	  the beginning of the block.  [ruby-core:79388] [Bug #13181]

	parse.y: set_line_body is not used in ripper

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@60947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-30 14:38:15 +00:00
usa
9ad0239992 merge revision(s) 60149: [Backport #14003]
Merge rubygems-2.6.14 changes.

	  It fixed http://blog.rubygems.org/2017/10/09/unsafe-object-deserialization-vulnerability.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@60946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-30 14:29:32 +00:00
usa
463a56d14b merge revision(s) 58254: [Backport #13402]
fix --with-gmp (broken by r57490)

	Looking at the generated shell script (also the autoconf manual), it
	seems AC_SEARCH_LIBS() m4 macro does not define HAVE_LIBsomething C
	preprocessor macros, unlike AC_CHECK_LIB() which does define them.
	This previous change effectively killed building with GMP because
	building that mode depends on existence of HAVE_LIBGMP. [Bug #13402]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 20:41:49 +00:00
usa
ea73cb5cb8 * version.h: bump to 2.3.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 14:32:18 +00:00
usa
3896b48678 merge revision(s) 59897:
lib/webrick/log.rb: sanitize any type of logs

	It had failed to sanitize some type of exception messages.  Reported and
	patched by Yusuke Endoh (mame) at https://hackerone.com/reports/223363

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 11:26:53 +00:00
usa
ac6f2894ea merge revision(s) 59375: [Backport #13756]
parse.y: empty hash in defined

	* parse.y (command): NODE_ARRAY with NULL is invalid.  traversal
	  in defined_expr0 is simplified than iseq_compile_each0.
	  [ruby-core:82113] [Bug #13756]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 04:32:54 +00:00
usa
04667398c9 merge revision(s) 59763: [Backport #13874]
string.c: fix false coderange

	* string.c (rb_enc_str_scrub): enc can differ from the actual
	  encoding of the string, the cached coderange is useless then.
	  [ruby-core:82674] [Bug #13874]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 04:31:25 +00:00
usa
fdeb8dc28d * ChangeLog: forgotten entries for r59880 and r59881.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 04:26:07 +00:00
usa
9b3e0ca63c merge revision(s) 59644: [Backport #13836]
parse.y: primary should not be 0

	* parse.y (primary): should not be 0, since it can be a receiver.
	  [ruby-core:82447] [Bug #13836]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 04:21:43 +00:00
usa
ddda4baf71 merge revision(s) 59613: [Backport #13817]
vm_method.c: alias warning at refined method

	* vm_method.c (rb_method_entry_make): suppress a warning at
	  refined method which will not be redefined.
	  [ruby-core:82385] [Bug #13817]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 04:19:30 +00:00
usa
95c9c1dc15 * ext/bigdecimal/bigdecimal.c (BigDecimal_hash): st_index_t may not be
fixable on 64bit mswin/mingw.

* ext/date/date_core.c (d_lite_hash): ditto.
  [Backport #13877]

* ext/openssl/ossl_bn.c (ossl_bn_hash): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 04:16:51 +00:00
usa
1433d4337c asn1: fix out-of-bounds read in decoding constructed objects
* OpenSSL::ASN1.{decode,decode_all,traverse}: have a bug of
  out-of-bounds read. int_ossl_asn1_decode0_cons() does not give the
  correct available length to ossl_asn1_decode() when decoding the
  inner components of a constructed object. This can cause
  out-of-bounds read if a crafted input given.

Reference: https://hackerone.com/reports/170316
1648afef33



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-09 14:06:50 +00:00
usa
842d5cff6a * ext/json: bump to version 1.8.3.1. [Backport #13853]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-09 13:58:58 +00:00
usa
c01bca25a7 * ChangeLog: forgotten to commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-09 13:57:17 +00:00
usa
add060094c merge revision(s) 59693,59695: [Backport #13852]
A HTTP Header value must not contain CR or LF.
	to_str -> to_s

	* lib/net/http/header.rb (set_field): `val` can not have `to_str`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-09 13:50:10 +00:00
usa
dbe8e9c578 merge revision(s) 59584: [Backport #13850]
REXML: Fix a bug that unexpected methods can be called as a XPath function

	[HackerOne:249295]

	Reported by Andrea Jegher. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-09 13:42:22 +00:00
usa
afc45931e8 * lib/rubygems: fix several vulnerabilities in RubyGems; bump to version
2.5.2.1. [Backport #13842]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-09 13:37:16 +00:00
usa
e55b415c2f merge revision(s) 59202: [Backport #13690]
compile.c: disallow next in once

	* compile.c (iseq_compile_each0): turned dregx context in "once"
	  into "guarded" type from "block" type, to disallow `next`,
	  `break`, `redo` as well as outside "once".
	  [ruby-core:81805] [Bug #13690]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 13:29:42 +00:00
usa
12474f0347 * test/ruby/test_process.rb (test_rlimit_{name,value}): test in UTF-8
encoding.  fix test failures introduced at r59531 on some platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 12:30:12 +00:00
usa
ecc889b1c8 merge revision(s) 57634: [Backport #13150]
marshal.c: revert r57631 partially

	* marshal.c (rb_marshal_dump_limited): do not free dump_arg, which
	  may be dereferenced in check_dump_arg due to continuation, and
	  get rid of dangling pointers.

	* marshal.c (rb_marshal_load_with_proc): ditto for load_arg.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 12:17:24 +00:00
usa
8bf48ec307 * compile.c (iseq_compile_each): remove unused definition of unused
variable derived from original patch.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 12:14:31 +00:00
usa
8138214392 merge revision(s) 58205: [Backport #13380]
Remove unused Init_frozen_strings declaration

	Init_frozen_strings definition is removed in r51511.
	https://bugs.ruby-lang.org/issues/11423

	Patch by Kohei Suzuki <eagletmt@gmail.com>

	* internal.h: Remove declaration of unexist function
	  [Fix GH-1558]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 10:45:55 +00:00
usa
fd8fbe37fd merge revision(s) 58262,58263: [Backport #13369]
fix TracePoint#return_value with non-local exits

	* vm.c: get return_value from imemo_throw_data object (THROW_DATA_VAL()).
	  imemo_throw_data (TAG_BREAK) contains returned value.
	  However, imemo_throw_data (TAG_BREAK) can skip several frames so that
	  we need to use it only once (at most internal frame). To record it,
	  we introduced THROW_DATA_CONSUMED and check it.

	* internal.h: define THROW_DATA_CONSUMED flag.

	* test/ruby/test_settracefunc.rb: add tests for [Bug #13369]

	* vm_insnhelper.h: add THROW_DATA_CONSUMED_P() and
	  THROW_DATA_CONSUMED_SET().

	internal.h: parenthesize macro argument

	* internal.h (THROW_DATA_P): parenthesize the argument which is
	  casted.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 10:43:57 +00:00
usa
86024f70cf merge revision(s) 59368: [Backport #13753]
random.c: ensure initialized

	* random.c (get_rnd, try_get_rnd): ensure initialized to get rid
	  of crash in forked processes.  [ruby-core:82100] [Bug #13753]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 10:32:37 +00:00
usa
6b330d8fb0 merge revision(s) 59384: [Backport #13759]
strscan.c: fix segfault in aref

	* ext/strscan/strscan.c (strscan_aref): fix segfault after
	  get_byte or getch which do not apply regexp.
	  [ruby-core:82116] [Bug #13759]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 10:30:58 +00:00
usa
3825bbfca9 merge revision(s) 58287: [Backport #13411]
configure.in: rpath with OPTDIR

	* configure.in: add rpath flags which is needed for OPTDIR as well
	  as -L options, when it is given.  [ruby-dev:50065] [Bug #13411]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 10:28:56 +00:00
usa
1a150fe07f merge revision(s) 59181: [Backport #13680]
vm_insnhelper.c: break in once

	* vm_insnhelper.c (vm_throw_start): size of catch table has been
	  included in iseq_catch_table struct, which could be NULL, since
	  2.2.  e.g., proc-closure in `once'.
	  [ruby-core:81775] [Bug #13680]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 10:14:33 +00:00
usa
048a82a99d * ChangeLog: for the previous commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 10:12:34 +00:00
usa
c2a7a82a69 merge revision(s) 58503: [Backport #13523]
node.h: sign-extend

	* node.h (nd_line): should sign-extend.  shifting `VALUE` extends
	  with zero bits if `sizeof(VALUE)` equals to `sizeof(int)`.  the
	  zero bits are truncated if `sizeof(VALUE)` is bigger enough.
	  [ruby-core:80920] [Bug #13523]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 10:09:20 +00:00
usa
9ea6f49b4a * compile.c (iseq_compile_each): the lifetime of new_opt have to be
until this case block is end.  this is a part of r57971.
  [Backport #13766]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 08:56:15 +00:00
usa
c3205d65e7 [Backport #13150]
this patch contains r54158, r57410, r57631 and r57954.

	Prevent GC by volatile [Bug #13150]

	test/ruby/test_marshal.rb test_context_switch (load) and test_gc (dump)
	are failed on FreeBSD 10.3 and gcc7 (FreeBSD Ports Collection) 7.0.0
	20170115 (experimental); RB_GC_GUARD looks not worked well.

	* include/ruby/ruby.h (RB_GC_GUARD): prevent guarded pointer from
	  optimization by using as an input to inline asm.

	* ruby.h: remove comment

	* include/ruby/ruby.h (RB_GC_GUARD): remove comment unsupported by
	  Solaris AS.

	Hidden objects (klass == 0) are not visible to Ruby code invoked
	from other threads or signal handlers, so they can never be
	accessed from other contexts.  This makes it safe to call
	rb_gc_force_recycle on the object slot after releasing malloc
	memory.

	* marshal.c (rb_marshal_dump_limited): hide dump_arg and recycle when
	  done (rb_marshal_load_with_proc): hide load_arg and recycle when done
	  [ruby-core:79518]

	* marshal.c (rb_marshal_dump_limited): do not free dump_arg, which
	  may be dereferenced in check_dump_arg due to continuation, and
	  get rid of dangling pointers.

	* marshal.c (rb_marshal_load_with_proc): ditto for load_arg.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 08:40:46 +00:00
usa
2132fb9fd1 merge revision(s) 57415,57474: [Backport #13239]
eval.c: copy special exception

	* eval.c (setup_exception): make unfrozen copy of special
	  exception before setting up a cause.
	test_io.rb: separate a test

	* test/ruby/test_io.rb (test_closed_stream_in_rescue): run in a
	  separated process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 08:31:28 +00:00
usa
f6d9f6fd2a merge revision(s) 59307: [Backport #13284]
a64: fix crash on register stack mark/sweep pass

	* thread_pthread.c: move 'register_stack_start' earlier.
	  [ruby-core:79928] [Bug #13284] [Fix GH-1625]

	Author:    Sergei Trofimovich <slyfox@gentoo.org>


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 08:24:37 +00:00
usa
380a1e6773 * ChangeLog: forgotten to commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 08:16:17 +00:00
usa
87cacf7e68 merge revision(s) 56576,56623: [Backport #12678] [Backport #13429]
* lib/net/smtp.rb (tlsconnect): support timeout for TLS handshake.
	  [ruby-core:76893] [Bug #12678]

	* lib/net/protocol.rb (ssl_socket_connect): new method to implement
	  timeout for TLS handshake.

	* lib/net/http.rb (connect): use Net::Protocol#ssl_socket_connect.

	* test/net/smtp/test_smtp.rb (test_tls_connect, test_tls_connect):
	  use Socket.tcp_server_sockets in case localhost is resolved to ::1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 08:10:56 +00:00
usa
f4a8004e31 merge revision(s) 59333,59337: [Backport #13616]
Zlib::GzipReader#pos underflows after calling #ungetbyte or #ungetc at start of file [Bug #13616]

	patched by Andrew Haines <andrew@haines.org.nz> [ruby-core:81488]
	zlib.c: fix unnormalized Fixnum

	* ext/zlib/zlib.c (rb_gzfile_total_out): cast to long not to
	  result in an unsigned long to normalized to Fixnum on LLP64
	  platforms.  [ruby-core:81488]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 08:08:01 +00:00
usa
640e708dee merge revision(s) 59322,59325: [Backport #13744]
process.c: handle dynamic :rlimit_* symbols in spawn execopts

	* process.c (rb_execarg_addopt_rlimit): hoist out of rb_execarg_addopt
	  (rlimit_type_by_sym): new wrapper for dynamic symbol
	  (rb_execarg_addopt): check for dsym via rlimit_type_by_sym
	* test/ruby/test_process.rb (test_execopts_rlimit): check dsym w/o pindown
	  Add extra check for bogus rlimit args, too.
	  [ruby-core:82033] [Bug #13744]
	process.c: null bytes

	* process.c (rlimit_type_by_sym): prohibit null bytes in key
	  names.  [ruby-core:82033] [Bug #13744]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 08:03:00 +00:00
usa
177cb2c15b merge revision(s) 59312: [Backport #13739]
optparse.rb: get rid of eval

	* lib/optparse.rb: try Float() and Integer() instead of eval,
	  which does too much things.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 07:56:52 +00:00
usa
e1f73c3219 merge revision(s) 57446: [Backport #13413]
mkmf.rb: fix script installation

	* lib/mkmf.rb (MakeMakefile): fix condition to install script
	  files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-07 06:00:04 +00:00
usa
651990fa73 This backport of r58812 is necessary to ease backporting r59028,
which fixes a real bug.

* thread.c (struct waiting_fd): declare
  (rb_thread_io_blocking_region): use on-stack list waiter
  (rb_notify_fd_close): walk vm->waiting_fds instead
  (call_without_gvl): remove old field setting
  (th_init): ditto
  [Feature #9632]

* vm_core.h (typedef struct rb_vm_struct): add waiting_fds list

* (typedef struct rb_thread_struct): remove waiting_fd field
  (rb_vm_living_threads_init): initialize waiting_fds list

This should fix bad interactions with test_race_gets_and_close
in test/ruby/test_io.rb since we ensure rb_notify_fd_close
continues returning the busy flag after enqueuing the interrupt.

* thread.c (rb_notify_fd_close): do not enqueue multiple interrupts
  [ruby-core:81581] [Bug #13632]

* test/ruby/test_io.rb (test_single_exception_on_close):
  new test based on script from Nikolay


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-07 02:03:22 +00:00
usa
739782e37a * ext/openssl/ossl_cipher.c: remove the encryption key initialization
from Cipher#initialize. This is effectively a revert of r32723
  ("Avoid possible SEGV from AES encryption/decryption", 2011-07-28).
  the patch is derived from 8108e0a6db,
  written by Kazuki Yamaguchi.
  [Backport #8221]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-05 07:06:45 +00:00
usa
f16590ba1d * ext/psych/yaml: update libyaml to 0.1.7.
* ext/psych/psych.gemspec: bump version to 2.1.0.1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 15:30:03 +00:00
usa
5974191113 merge revision(s) 59161: [Backport #13672]
parse.y: check multibyte char

	* parse.y (parser_precise_mbclen): check invalid multibyte char at
	  skipping strings following `?x` literal string, not to stuck in
	  a infinite loop.  [ruby-core:81746] [Bug #13672]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 13:05:58 +00:00
usa
25a2e376bb merge revision(s) 59102: [Backport #13515]
pathname.rb: UNC root pathname needs a separator

	* ext/pathname/lib/pathname.rb (Pathname#plus): UNC root pathname
	  needs a separator.  File.basename returns "/" on UNC root, as
	  well as sole drive letter, even if it does not end with a
	  separator.  [ruby-core:80900] [Bug #13515]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 13:01:26 +00:00
usa
971b99f3ed merge revision(s) 59033,59034: [Backport #13636]
rexml: add close tag check on end of document to StreamParser

	[ruby-core:81593] [Bug #13636]

	Reported by Anton Sivakov. Thanks!!!

	* properties.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:58:41 +00:00
usa
79e239cbd8 merge revision(s) 58693: [Backport #13558]
array.c: check position to insert

	* array.c (rb_ary_insert): check position to insert even if no
	  elements to be inserted.  [ruby-core:81125] [Bug #13558]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:54:50 +00:00
usa
c42f46bfc7 merge revision(s) 58643: [Backport #13231]
date_core.c: fix docs for %Z format

	* ext/date/date_core.c: [DOC] fix documentation for %Z format
	  of {Date,DateTime}.strftime.

	  Reported by Damon Timm.  Based on a patch by nano.
	  [ruby-core:79602] [Bug #13231] [Fix GH-1565]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:52:42 +00:00
usa
30519c0b6a merge revision(s) 58552: [Backport #13531]
rss: Accept empty text element as valid element

	Parser has been accepted it but XML serializer wasn't accepted.

	Reported by stefano frabetti. Thanks!!!

	[ruby-core:80965] [Bug #13531]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:48:27 +00:00
usa
127c8a219f * ext/openssl/ossl_x509store.c: clear error queue after calling
X509_LOOKUP_load_file()

  X509_LOOKUP_load_file(), which ends up calling
  X509_load_cert_crl_file()
  internally, may leave error entries in the queue even when it returns
  non-zero value (which indicates success).

  This will be fixed by OpenSSL 1.1.1, but can be worked around by
  clearing the error queue ourselves.

  Fixes: [Backport #11033]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:42:31 +00:00