passenger 6.2.1 → 6.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +37 -15
  3. data/build/cxx_tests.rb +2 -0
  4. data/build/support/cxx_dependency_map.rb +3 -63
  5. data/src/agent/Core/Config.h +1 -1
  6. data/src/agent/Core/Controller/Config.h +1 -1
  7. data/src/agent/Shared/ApiServerUtils.h +1 -1
  8. data/src/agent/Watchdog/Config.h +1 -1
  9. data/src/apache2_module/Hooks.cpp +13 -0
  10. data/src/apache2_module/Utils.h +14 -0
  11. data/src/cxx_supportlib/Constants.h +1 -1
  12. data/src/cxx_supportlib/FileTools/FileManip.cpp +27 -3
  13. data/src/cxx_supportlib/InstanceDirectory.h +30 -3
  14. data/src/cxx_supportlib/ServerKit/Errors.h +1 -1
  15. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +1 -1
  16. data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +1 -1
  17. data/src/cxx_supportlib/ServerKit/HttpRequest.h +1 -1
  18. data/src/cxx_supportlib/ServerKit/llerrors.h +3 -3
  19. data/src/cxx_supportlib/ServerKit/llversion.h +1 -1
  20. data/src/cxx_supportlib/{ServerKit/llhttp_api.c → vendor-copy/llhttp/api.c} +30 -23
  21. data/src/cxx_supportlib/{ServerKit → vendor-copy/llhttp}/llhttp.c +1756 -1645
  22. data/src/cxx_supportlib/{ServerKit → vendor-copy/llhttp}/llhttp.h +35 -13
  23. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/classification.hpp +19 -0
  24. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/formatter.hpp +1 -1
  25. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/trim_all.hpp +0 -2
  26. data/src/cxx_supportlib/vendor-modified/boost/assert.hpp +20 -13
  27. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_x86.hpp +2 -2
  28. data/src/cxx_supportlib/vendor-modified/boost/atomic/thread_pause.hpp +4 -0
  29. data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn.hpp +1 -1
  30. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/debug.hpp +4 -0
  31. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx03.hpp +1 -1
  32. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx11.hpp +1 -1
  33. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx14.hpp +1 -1
  34. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx17.hpp +1 -1
  35. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx20.hpp +1 -1
  36. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx23.hpp +1 -1
  37. data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +6 -1
  38. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang_version.hpp +10 -1
  39. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +5 -3
  40. data/src/cxx_supportlib/vendor-modified/boost/config/detail/cxx_composite.hpp +1 -1
  41. data/src/cxx_supportlib/vendor-modified/boost/config/workaround.hpp +5 -0
  42. data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +57 -53
  43. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +10 -10
  44. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +34 -2
  45. data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +14 -2
  46. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +176 -2287
  47. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool.hpp +13 -9
  48. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +186 -70
  49. data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithm.hpp +2 -2
  50. data/src/cxx_supportlib/vendor-modified/boost/container/detail/aligned_allocation.hpp +149 -0
  51. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_helpers.hpp +35 -0
  52. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_lib.h +1 -0
  53. data/src/cxx_supportlib/vendor-modified/boost/container/detail/bit_utilities.hpp +133 -0
  54. data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +18 -3
  55. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +5 -0
  56. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_end.hpp +4 -0
  57. data/src/cxx_supportlib/vendor-modified/boost/container/detail/container_rebind.hpp +1 -1
  58. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +20 -10
  59. data/src/cxx_supportlib/vendor-modified/boost/container/detail/deque_impl.hpp +2744 -0
  60. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +202 -104
  61. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dlmalloc.hpp +5 -4
  62. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +161 -85
  63. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_constructible.hpp +180 -0
  64. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +3 -2
  65. data/src/cxx_supportlib/vendor-modified/boost/container/detail/math_functions.hpp +12 -0
  66. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +16 -0
  67. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +1 -1
  68. data/src/cxx_supportlib/vendor-modified/boost/container/detail/next_capacity.hpp +9 -1
  69. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool.hpp +18 -14
  70. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +256 -41
  71. data/src/cxx_supportlib/vendor-modified/boost/container/detail/operator_new_helpers.hpp +75 -24
  72. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +1 -56
  73. data/src/cxx_supportlib/vendor-modified/boost/container/detail/placement_new.hpp +16 -3
  74. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common_alloc.hpp +1 -7
  75. data/src/cxx_supportlib/vendor-modified/boost/container/detail/range_utils.hpp +196 -0
  76. data/src/cxx_supportlib/vendor-modified/boost/container/detail/std_fwd.hpp +33 -1
  77. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +124 -69
  78. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +109 -7
  79. data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +168 -162
  80. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/nest.hpp +2978 -0
  81. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/pmr/nest.hpp +45 -0
  82. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_all_of.hpp +43 -0
  83. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_any_of.hpp +42 -0
  84. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_copy.hpp +229 -0
  85. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_copy_if.hpp +270 -0
  86. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_copy_n.hpp +308 -0
  87. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_count.hpp +101 -0
  88. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_count_if.hpp +100 -0
  89. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_equal.hpp +268 -0
  90. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_fill.hpp +101 -0
  91. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_fill_n.hpp +171 -0
  92. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find.hpp +110 -0
  93. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_if.hpp +110 -0
  94. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_if_not.hpp +43 -0
  95. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_last.hpp +179 -0
  96. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_last_if.hpp +179 -0
  97. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_last_if_not.hpp +43 -0
  98. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_for_each.hpp +92 -0
  99. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_generate.hpp +90 -0
  100. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_generate_n.hpp +162 -0
  101. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_is_partitioned.hpp +46 -0
  102. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_is_sorted.hpp +49 -0
  103. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_is_sorted_until.hpp +169 -0
  104. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_iterator_traits.hpp +382 -0
  105. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_merge.hpp +428 -0
  106. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_mismatch.hpp +350 -0
  107. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_none_of.hpp +98 -0
  108. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_partition.hpp +296 -0
  109. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_partition_copy.hpp +105 -0
  110. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_partition_point.hpp +116 -0
  111. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove.hpp +57 -0
  112. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove_copy.hpp +207 -0
  113. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove_copy_if.hpp +223 -0
  114. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove_if.hpp +57 -0
  115. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_replace.hpp +90 -0
  116. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_replace_if.hpp +90 -0
  117. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_reverse.hpp +245 -0
  118. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_reverse_copy.hpp +229 -0
  119. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_search.hpp +211 -0
  120. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_search_n.hpp +476 -0
  121. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_difference.hpp +300 -0
  122. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_intersection.hpp +287 -0
  123. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_symmetric_difference.hpp +306 -0
  124. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_union.hpp +294 -0
  125. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_stable_partition.hpp +153 -0
  126. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_swap_ranges.hpp +92 -0
  127. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_transform.hpp +93 -0
  128. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/wrapped_iterator.hpp +142 -0
  129. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +642 -417
  130. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +141 -30
  131. data/src/cxx_supportlib/vendor-modified/boost/container/hub.hpp +2426 -0
  132. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +65 -57
  133. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +247 -68
  134. data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +7 -0
  135. data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +39 -33
  136. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +156 -23
  137. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/global_resource.hpp +3 -3
  138. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/hub.hpp +43 -0
  139. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +5 -3
  140. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/monotonic_buffer_resource.hpp +1 -0
  141. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/polymorphic_allocator.hpp +1 -1
  142. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +4 -0
  143. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/segtor.hpp +45 -0
  144. data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +5 -4
  145. data/src/cxx_supportlib/vendor-modified/boost/container/segtor.hpp +905 -0
  146. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +148 -35
  147. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +59 -52
  148. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +632 -5
  149. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +66 -60
  150. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +46 -1
  151. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +612 -317
  152. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator.hpp +54 -111
  153. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_construction.hpp +100 -0
  154. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_fwd.hpp +1 -3
  155. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +233 -116
  156. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +5 -1
  157. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +17 -10
  158. data/src/cxx_supportlib/vendor-modified/boost/date_time/period.hpp +1 -3
  159. data/src/cxx_supportlib/vendor-modified/boost/describe/detail/config.hpp +16 -0
  160. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/encoder.hpp +114 -0
  161. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/error_info_impl.hpp +4 -0
  162. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/requires_cxx11.hpp +1 -1
  163. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/type_info.hpp +211 -1
  164. data/src/cxx_supportlib/vendor-modified/boost/exception/diagnostic_information.hpp +59 -0
  165. data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +6 -0
  166. data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +34 -0
  167. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +0 -1
  168. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +12 -3
  169. data/src/cxx_supportlib/vendor-modified/boost/intrusive/derivation_value_traits.hpp +1 -1
  170. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +29 -174
  171. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +18 -2
  172. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +0 -1
  173. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +4 -5
  174. data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +20 -11
  175. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +42 -14
  176. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +58 -22
  177. data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +3 -1
  178. data/src/cxx_supportlib/vendor-modified/boost/iterator/advance.hpp +5 -1
  179. data/src/cxx_supportlib/vendor-modified/boost/iterator/distance.hpp +8 -2
  180. data/src/cxx_supportlib/vendor-modified/boost/iterator/is_iterator.hpp +9 -0
  181. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +11 -1
  182. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/buffer_view.hpp +9 -1
  183. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/config.hpp +22 -0
  184. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +15 -7
  185. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +23 -11
  186. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +11 -1
  187. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +9 -1
  188. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +11 -2
  189. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_basic_unlockedbuf.hpp +10 -1
  190. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +8 -1
  191. data/src/cxx_supportlib/vendor-modified/boost/{detail → lexical_cast/detail}/lcast_precision.hpp +13 -1
  192. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +11 -1
  193. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +10 -2
  194. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +15 -2
  195. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +11 -1
  196. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once_atomic.cpp +1 -1
  197. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +48 -46
  198. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +23 -0
  199. data/src/cxx_supportlib/vendor-modified/boost/move/detail/move_helpers.hpp +24 -24
  200. data/src/cxx_supportlib/vendor-modified/boost/move/detail/nsec_clock.hpp +12 -4
  201. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +76 -0
  202. data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +1 -1
  203. data/src/cxx_supportlib/vendor-modified/boost/move/traits.hpp +11 -0
  204. data/src/cxx_supportlib/vendor-modified/boost/mp11/algorithm.hpp +58 -37
  205. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_copy_if.hpp +1 -2
  206. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_map_find.hpp +17 -9
  207. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_remove_if.hpp +1 -2
  208. data/src/cxx_supportlib/vendor-modified/boost/mp11/integer_sequence.hpp +6 -0
  209. data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
  210. data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +6 -1
  211. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_common_defs.hpp +188 -0
  212. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_factory_support.hpp +0 -6
  213. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_hash.hpp +1 -1
  214. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_nonmember_interface.hpp +117 -0
  215. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +108 -83
  216. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +39 -39
  217. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_select_implementation.hpp +37 -0
  218. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_swap.hpp +1 -1
  219. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp +8 -8
  220. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/union_optional.hpp +724 -0
  221. data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +93 -220
  222. data/src/cxx_supportlib/vendor-modified/boost/optional/optional_fwd.hpp +14 -4
  223. data/src/cxx_supportlib/vendor-modified/boost/optional/optional_io.hpp +1 -1
  224. data/src/cxx_supportlib/vendor-modified/boost/random/binomial_distribution.hpp +1 -1
  225. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_int_distribution.hpp +1 -1
  226. data/src/cxx_supportlib/vendor-modified/boost/rational.hpp +1 -1
  227. data/src/cxx_supportlib/vendor-modified/boost/static_assert.hpp +4 -6
  228. data/src/cxx_supportlib/vendor-modified/boost/system/api_config.hpp +1 -1
  229. data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +16 -0
  230. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category.hpp +13 -13
  231. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category_impl.hpp +5 -5
  232. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_deque_base.hpp +3 -2
  233. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_queue_base.hpp +3 -2
  234. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +2 -1
  235. data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v2/task_region.hpp +1 -1
  236. data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +30 -28
  237. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once.hpp +6 -3
  238. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once_atomic.hpp +5 -1
  239. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/pthread_helpers.hpp +1 -0
  240. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/shared_mutex.hpp +16 -16
  241. data/src/cxx_supportlib/vendor-modified/boost/thread/v2/shared_mutex.hpp +26 -26
  242. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map.hpp +196 -6
  243. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_set.hpp +191 -6
  244. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_node_map.hpp +196 -5
  245. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_node_set.hpp +192 -5
  246. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/concurrent_table.hpp +3 -3
  247. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/core.hpp +2 -2
  248. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/table.hpp +3 -3
  249. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +52 -16
  250. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/ranges_support.hpp +104 -0
  251. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/type_traits.hpp +1 -14
  252. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/unordered_printers.hpp +10 -4
  253. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +121 -3
  254. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +118 -3
  255. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +338 -1
  256. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +121 -3
  257. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +118 -3
  258. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +333 -1
  259. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  260. data/src/cxx_supportlib/vendor-modified/jsoncpp/json-forwards.h +276 -143
  261. data/src/cxx_supportlib/vendor-modified/jsoncpp/json.h +1262 -771
  262. data/src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp +1704 -1586
  263. data/src/nginx_module/ContentHandler.c +35 -0
  264. data/src/ruby_supportlib/phusion_passenger/common_library.rb +6 -6
  265. data/src/ruby_supportlib/phusion_passenger/utils/json.rb +25 -2
  266. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +12 -1
  267. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  268. metadata +73 -8
  269. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_utility.hpp +0 -41
  270. /data/src/cxx_supportlib/{ServerKit/llhttp_http.c → vendor-copy/llhttp/http.c} +0 -0
@@ -612,6 +612,19 @@ private:
612
612
  return ReportFileSystemError(e).report(r);
613
613
  }
614
614
 
615
+ /* These values can contain request-derived data. For example, the
616
+ * document root can be computed by mod_vhost_alias, mod_auth_form
617
+ * URL-decodes the user name, and mod_authn_anon can accept any user name.
618
+ */
619
+ if (containsHeaderDelimiter(ap_document_root(r))) {
620
+ P_WARN("Rejecting request because the document root contains a CR or LF character");
621
+ return HTTP_BAD_REQUEST;
622
+ }
623
+ if (containsHeaderDelimiter(r->user)) {
624
+ P_WARN("Rejecting request because the authenticated user name contains a CR or LF character");
625
+ return HTTP_BAD_REQUEST;
626
+ }
627
+
615
628
 
616
629
  UPDATE_TRACE_POINT();
617
630
  try {
@@ -27,6 +27,7 @@
27
27
  #define _PASSENGER_APACHE2_MODULE_UTILS_H_
28
28
 
29
29
  #include <string>
30
+ #include <cstring>
30
31
  #include <boost/function.hpp>
31
32
  #include <StaticString.h>
32
33
 
@@ -67,6 +68,19 @@ typedef boost::function<void (
67
68
  )> DirConfigTraverser;
68
69
 
69
70
 
71
+ /**
72
+ * Whether `value` contains a CR or LF. The request that we send to the Core is
73
+ * a CRLF-delimited HTTP header block. The Core trusts every secure header
74
+ * ("!~" prefix) that comes after the Core password header. So if a
75
+ * request-derived value that we serialize as a secure header contains CR or LF,
76
+ * then the client can inject arbitrary secure headers, such as an app start
77
+ * command. Such values must be rejected.
78
+ */
79
+ inline bool
80
+ containsHeaderDelimiter(const char *value) {
81
+ return value != NULL && strpbrk(value, "\r\n") != NULL;
82
+ }
83
+
70
84
  inline void
71
85
  addHeader(string &headers, const StaticString &name, const char *value) {
72
86
  if (value != NULL) {
@@ -84,7 +84,7 @@
84
84
  #define PASSENGER_API_VERSION_MAJOR 0
85
85
  #define PASSENGER_API_VERSION_MINOR 3
86
86
  #define PASSENGER_DEFAULT_USER "nobody"
87
- #define PASSENGER_VERSION "6.2.1"
87
+ #define PASSENGER_VERSION "6.2.2"
88
88
  #define POOL_HELPER_THREAD_STACK_SIZE 262144
89
89
  #define PROCESS_SHUTDOWN_TIMEOUT 60
90
90
  #define PROCESS_SHUTDOWN_TIMEOUT_DISPLAY "1 minute"
@@ -252,8 +252,12 @@ makeDirTree(const string &path, const StaticString &mode, uid_t owner, gid_t gro
252
252
  for (rit = paths.rbegin(); rit != paths.rend(); rit++) {
253
253
  current = *rit;
254
254
 
255
+ /* Create the directory accessible only to us. We need to open() it
256
+ * below, which requires read permission that the requested mode may
257
+ * not grant. The fchmod() below applies the requested mode.
258
+ */
255
259
  do {
256
- ret = mkdir(current.c_str(), modeBits);
260
+ ret = mkdir(current.c_str(), S_IRWXU);
257
261
  } while (ret == -1 && errno == EINTR);
258
262
  if (ret == -1) {
259
263
  if (errno == EEXIST) {
@@ -266,9 +270,29 @@ makeDirTree(const string &path, const StaticString &mode, uid_t owner, gid_t gro
266
270
  }
267
271
  }
268
272
 
273
+ FileDescriptor fd;
274
+ int options = O_DIRECTORY | O_NOFOLLOW;
275
+ do {
276
+ fd.assign(open(current.c_str(), options, modeBits), __FILE__, __LINE__);
277
+ } while (fd == -1 && errno == EINTR);
278
+ if (fd == -1) {
279
+ int e = errno;
280
+ throw FileSystemException("Cannot open newly created directory, (possible symlink attack) " +
281
+ current, e, current);
282
+ }
283
+ struct stat buf;
284
+ if (fstat(fd, &buf) == -1) {
285
+ int e = errno;
286
+ throw FileSystemException("Cannot stat newly created directory, (possible symlink attack) " +
287
+ current, e, current);
288
+ } else if (!S_ISDIR(buf.st_mode)) {
289
+ throw FileSystemException("Newly created directory was replaced before opening occurred, (possible symlink attack) " +
290
+ current, ENOTDIR, current);
291
+ }
292
+
269
293
  /* Chmod in order to override the umask. */
270
294
  do {
271
- ret = chmod(current.c_str(), modeBits);
295
+ ret = fchmod(fd, modeBits);
272
296
  } while (ret == -1 && errno == EINTR);
273
297
 
274
298
  if (owner != USER_NOT_GIVEN && group != GROUP_NOT_GIVEN) {
@@ -279,7 +303,7 @@ makeDirTree(const string &path, const StaticString &mode, uid_t owner, gid_t gro
279
303
  group = (gid_t) -1; // Don't let chown change file group.
280
304
  }
281
305
  do {
282
- ret = lchown(current.c_str(), owner, group);
306
+ ret = fchown(fd, owner, group);
283
307
  } while (ret == -1 && errno == EINTR);
284
308
  if (ret == -1) {
285
309
  char message[1024];
@@ -92,7 +92,8 @@ private:
92
92
  }
93
93
 
94
94
  static bool createPath(const string &registryDir, const string &path) {
95
- if (mkdir(path.c_str(), parseModeString("u=rwx,g=rx,o=rx")) == -1) {
95
+ mode_t permissions = parseModeString("u=rwx,g=rx,o=rx");
96
+ if (mkdir(path.c_str(), permissions) == -1) {
96
97
  if (errno == EEXIST) {
97
98
  return false;
98
99
  } else {
@@ -101,15 +102,41 @@ private:
101
102
  " instance registry directory " + registryDir, e, registryDir);
102
103
  }
103
104
  }
105
+ FileDescriptor fd;
106
+ int options = O_DIRECTORY | O_NOFOLLOW;
107
+ do {
108
+ fd.assign(open(path.c_str(), options, permissions), __FILE__, __LINE__);
109
+ } while (fd == -1 && errno == EINTR);
110
+ if (fd == -1) {
111
+ int e = errno;
112
+ throw FileSystemException("Cannot open newly created instance directory, (possible symlink attack) " +
113
+ path, e, path);
114
+ }
115
+ struct stat buf;
116
+ if (fstat(fd, &buf) == -1) {
117
+ int e = errno;
118
+ throw FileSystemException("Cannot stat newly created instance directory, (possible symlink attack) " +
119
+ path, e, path);
120
+ } else if (!S_ISDIR(buf.st_mode)) {
121
+ throw FileSystemException("Newly created instance directory was replaced before opening occurred, (possible symlink attack) " +
122
+ path, ENOTDIR, path);
123
+ }
124
+ int ret = 0;
104
125
  // Explicitly chmod the directory in case the umask is interfering.
105
- if (chmod(path.c_str(), parseModeString("u=rwx,g=rx,o=rx")) == -1) {
126
+ do {
127
+ ret = fchmod(fd, permissions);
128
+ } while (ret == -1 && errno == EINTR);
129
+ if (ret == -1) {
106
130
  int e = errno;
107
131
  throw FileSystemException("Cannot set permissions on instance directory " +
108
132
  path, e, path);
109
133
  }
110
134
  // The parent directory may have the setgid bit enabled, so we
111
135
  // explicitly chown it.
112
- if (chown(path.c_str(), geteuid(), getegid()) == -1) {
136
+ do {
137
+ ret = fchown(fd, geteuid(), getegid());
138
+ } while (ret == -1 && errno == EINTR);
139
+ if (ret == -1) {
113
140
  int e = errno;
114
141
  throw FileSystemException("Cannot change the permissions of the instance "
115
142
  "directory " + path, e, path);
@@ -27,7 +27,7 @@
27
27
  #define _PASSENGER_SERVER_KIT_ERRORS_H_
28
28
 
29
29
  #include <cstring>
30
- #include <ServerKit/llhttp.h>
30
+ #include <llhttp/llhttp.h>
31
31
  #include <ServerKit/llerrors.h>
32
32
 
33
33
  namespace Passenger {
@@ -31,7 +31,7 @@
31
31
  #include <cstddef>
32
32
  #include <cstring>
33
33
  #include <MemoryKit/mbuf.h>
34
- #include <ServerKit/llhttp.h>
34
+ #include <llhttp/llhttp.h>
35
35
  #include <ServerKit/Context.h>
36
36
  #include <ServerKit/HttpRequest.h>
37
37
  #include <ServerKit/HttpHeaderParserState.h>
@@ -28,7 +28,7 @@
28
28
 
29
29
  #include <DataStructures/LString.h>
30
30
  #include <Algorithms/Hasher.h>
31
- #include <ServerKit/llhttp.h>
31
+ #include <llhttp/llhttp.h>
32
32
  #include <ServerKit/HeaderTable.h>
33
33
 
34
34
  namespace Passenger {
@@ -29,7 +29,7 @@
29
29
  #include <psg_sysqueue.h>
30
30
  #include <boost/cstdint.hpp>
31
31
  #include <boost/atomic.hpp>
32
- #include <ServerKit/llhttp.h>
32
+ #include <llhttp/llhttp.h>
33
33
  #include <ServerKit/Hooks.h>
34
34
  #include <ServerKit/Client.h>
35
35
  #include <ServerKit/HeaderTable.h>
@@ -1,7 +1,7 @@
1
1
  #ifndef INCLUDE_LLERRORS_H_
2
2
  #define INCLUDE_LLERRORS_H_
3
3
 
4
- #include <ServerKit/llhttp.h>
4
+ #include <llhttp/llhttp.h>
5
5
 
6
6
  inline const char *llhttp_get_error_description(llhttp_errno_t error) {
7
7
  switch (error) {
@@ -77,8 +77,8 @@ inline const char *llhttp_get_error_description(llhttp_errno_t error) {
77
77
  return "the on_chunk_complete callback failed";
78
78
  case HPE_CB_RESET:
79
79
  return "the on_reset callback failed";
80
- default:
81
- return "unknown error";
80
+ case HPE_CB_PROTOCOL_COMPLETE:
81
+ return "the on_protocol_complete callback failed";
82
82
  }
83
83
  }
84
84
  #endif
@@ -1,7 +1,7 @@
1
1
  #ifndef INCLUDE_LLVERSION_H_
2
2
  #define INCLUDE_LLVERSION_H_
3
3
 
4
- #include <ServerKit/llhttp.h>
4
+ #include <llhttp/llhttp.h>
5
5
  #include <boost/preprocessor/stringize.hpp>
6
6
 
7
7
  inline const char *llhttp_version() {
@@ -57,29 +57,14 @@ static int wasm_on_headers_complete_wrap(llhttp_t* p) {
57
57
  }
58
58
 
59
59
  const llhttp_settings_t wasm_settings = {
60
- wasm_on_message_begin,
61
- wasm_on_url,
62
- wasm_on_status,
63
- NULL,
64
- NULL,
65
- wasm_on_header_field,
66
- wasm_on_header_value,
67
- NULL,
68
- NULL,
69
- wasm_on_headers_complete_wrap,
70
- wasm_on_body,
71
- wasm_on_message_complete,
72
- NULL,
73
- NULL,
74
- NULL,
75
- NULL,
76
- NULL,
77
- NULL,
78
- NULL,
79
- NULL,
80
- NULL,
81
- NULL,
82
- NULL,
60
+ .on_message_begin = wasm_on_message_begin,
61
+ .on_url = wasm_on_url,
62
+ .on_status = wasm_on_status,
63
+ .on_header_field = wasm_on_header_field,
64
+ .on_header_value = wasm_on_header_value,
65
+ .on_headers_complete = wasm_on_headers_complete_wrap,
66
+ .on_body = wasm_on_body,
67
+ .on_message_complete = wasm_on_message_complete,
83
68
  };
84
69
 
85
70
 
@@ -331,6 +316,14 @@ void llhttp_set_lenient_spaces_after_chunk_size(llhttp_t* parser, int enabled) {
331
316
  }
332
317
  }
333
318
 
319
+ void llhttp_set_lenient_header_value_relaxed(llhttp_t* parser, int enabled) {
320
+ if (enabled) {
321
+ parser->lenient_flags |= LENIENT_HEADER_VALUE_RELAXED;
322
+ } else {
323
+ parser->lenient_flags &= ~LENIENT_HEADER_VALUE_RELAXED;
324
+ }
325
+ }
326
+
334
327
  /* Callbacks */
335
328
 
336
329
 
@@ -341,6 +334,20 @@ int llhttp__on_message_begin(llhttp_t* s, const char* p, const char* endp) {
341
334
  }
342
335
 
343
336
 
337
+ int llhttp__on_protocol(llhttp_t* s, const char* p, const char* endp) {
338
+ int err;
339
+ SPAN_CALLBACK_MAYBE(s, on_protocol, p, endp - p);
340
+ return err;
341
+ }
342
+
343
+
344
+ int llhttp__on_protocol_complete(llhttp_t* s, const char* p, const char* endp) {
345
+ int err;
346
+ CALLBACK_MAYBE(s, on_protocol_complete);
347
+ return err;
348
+ }
349
+
350
+
344
351
  int llhttp__on_url(llhttp_t* s, const char* p, const char* endp) {
345
352
  int err;
346
353
  SPAN_CALLBACK_MAYBE(s, on_url, p, endp - p);