passenger 5.0.30 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +30 -1
  3. data/CONTRIBUTING.md +1 -1
  4. data/CONTRIBUTORS +2 -0
  5. data/bin/passenger-install-nginx-module +18 -13
  6. data/build/agent.rb +1 -0
  7. data/build/basics.rb +1 -0
  8. data/build/cxx_tests.rb +6 -1
  9. data/build/misc.rb +3 -0
  10. data/build/packaging.rb +5 -17
  11. data/build/support/cxx_dependency_map.rb +100 -0
  12. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +4 -1
  13. data/build/test_basics.rb +12 -2
  14. data/dev/ci/run_travis.sh +6 -2
  15. data/doc/Users guide Apache.html +7 -2
  16. data/doc/Users guide Apache.txt +4 -0
  17. data/resources/templates/error_layout.css +70 -84
  18. data/resources/templates/error_layout.html.template +84 -93
  19. data/resources/templates/standalone/http.erb +17 -13
  20. data/resources/templates/standalone/server.erb +2 -1
  21. data/resources/templates/undisclosed_error.html.template +52 -51
  22. data/resources/update_check_client_cert.p12 +0 -0
  23. data/resources/update_check_client_cert.pem +89 -0
  24. data/resources/update_check_server_pubkey.pem +14 -0
  25. data/src/agent/Core/ApplicationPool/ErrorRenderer.h +15 -1
  26. data/src/agent/Core/Controller.h +3 -2
  27. data/src/agent/Core/Controller/CheckoutSession.cpp +5 -4
  28. data/src/agent/Core/Controller/ForwardResponse.cpp +1 -1
  29. data/src/agent/Core/Controller/InitRequest.cpp +2 -0
  30. data/src/agent/Core/Controller/InitializationAndShutdown.cpp +1 -0
  31. data/src/agent/Core/Controller/Request.h +1 -0
  32. data/src/agent/Core/CoreMain.cpp +99 -2
  33. data/src/agent/Core/OptionParser.h +18 -1
  34. data/src/agent/Core/SecurityUpdateChecker.h +559 -0
  35. data/src/agent/Shared/Base.cpp +6 -1
  36. data/src/agent/TempDirToucher/TempDirToucherMain.cpp +52 -0
  37. data/src/agent/Watchdog/InstanceDirToucher.cpp +1 -2
  38. data/src/agent/Watchdog/WatchdogMain.cpp +31 -40
  39. data/src/apache2_module/Configuration.cpp +12 -0
  40. data/src/apache2_module/Configuration.hpp +5 -0
  41. data/src/apache2_module/ConfigurationCommands.cpp +19 -19
  42. data/src/apache2_module/ConfigurationCommands.cpp.cxxcodebuilder +2 -2
  43. data/src/apache2_module/ConfigurationFields.hpp +19 -19
  44. data/src/apache2_module/ConfigurationFields.hpp.cxxcodebuilder +2 -2
  45. data/src/apache2_module/ConfigurationSetters.cpp +19 -19
  46. data/src/apache2_module/ConfigurationSetters.cpp.cxxcodebuilder +2 -2
  47. data/src/apache2_module/CreateDirConfig.cpp +19 -19
  48. data/src/apache2_module/CreateDirConfig.cpp.cxxcodebuilder +2 -2
  49. data/src/apache2_module/Hooks.cpp +10 -1
  50. data/src/apache2_module/MergeDirConfig.cpp +19 -19
  51. data/src/apache2_module/MergeDirConfig.cpp.cxxcodebuilder +2 -2
  52. data/src/apache2_module/SetHeaders.cpp +19 -19
  53. data/src/apache2_module/SetHeaders.cpp.cxxcodebuilder +2 -2
  54. data/src/cxx_supportlib/Constants.h +22 -22
  55. data/src/cxx_supportlib/Constants.h.cxxcodebuilder +4 -1
  56. data/src/cxx_supportlib/Crypto.cpp +977 -0
  57. data/src/cxx_supportlib/Crypto.h +147 -0
  58. data/src/cxx_supportlib/InstanceDirectory.h +55 -2
  59. data/src/cxx_supportlib/Utils/Curl.h +24 -10
  60. data/src/cxx_supportlib/Utils/JsonUtils.h +1 -1
  61. data/src/cxx_supportlib/oxt/detail/spin_lock_darwin.hpp +2 -0
  62. data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +3 -3
  63. data/src/cxx_supportlib/vendor-modified/jsoncpp/json-forwards.h +167 -92
  64. data/src/cxx_supportlib/vendor-modified/jsoncpp/json.h +1827 -1542
  65. data/src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp +4705 -3652
  66. data/src/cxx_supportlib/vendor-modified/libev/Changes +46 -15
  67. data/src/cxx_supportlib/vendor-modified/libev/LICENSE +1 -1
  68. data/src/cxx_supportlib/vendor-modified/libev/Makefile.in +215 -128
  69. data/src/cxx_supportlib/vendor-modified/libev/aclocal.m4 +466 -275
  70. data/src/cxx_supportlib/vendor-modified/libev/config.guess +312 -418
  71. data/src/cxx_supportlib/vendor-modified/libev/config.sub +246 -105
  72. data/src/cxx_supportlib/vendor-modified/libev/configure +276 -72
  73. data/src/cxx_supportlib/vendor-modified/libev/configure.ac +2 -1
  74. data/src/cxx_supportlib/vendor-modified/libev/depcomp +346 -185
  75. data/src/cxx_supportlib/vendor-modified/libev/ev++.h +1 -1
  76. data/src/cxx_supportlib/vendor-modified/libev/ev.c +530 -190
  77. data/src/cxx_supportlib/vendor-modified/libev/ev.h +23 -14
  78. data/src/cxx_supportlib/vendor-modified/libev/ev_epoll.c +12 -6
  79. data/src/cxx_supportlib/vendor-modified/libev/ev_kqueue.c +9 -5
  80. data/src/cxx_supportlib/vendor-modified/libev/ev_poll.c +6 -3
  81. data/src/cxx_supportlib/vendor-modified/libev/ev_port.c +8 -4
  82. data/src/cxx_supportlib/vendor-modified/libev/ev_select.c +4 -2
  83. data/src/cxx_supportlib/vendor-modified/libev/ev_vars.h +3 -2
  84. data/src/cxx_supportlib/vendor-modified/libev/ev_win32.c +3 -4
  85. data/src/cxx_supportlib/vendor-modified/libev/install-sh +433 -219
  86. data/src/cxx_supportlib/vendor-modified/libev/libev.m4 +6 -6
  87. data/src/cxx_supportlib/vendor-modified/libev/ltmain.sh +2 -2
  88. data/src/cxx_supportlib/vendor-modified/libev/missing +167 -288
  89. data/src/cxx_supportlib/vendor-modified/libev/mkinstalldirs +72 -21
  90. data/src/cxx_supportlib/vendor-modified/modp_b64.cpp +4 -106
  91. data/src/cxx_supportlib/vendor-modified/modp_b64_data.h +37 -1
  92. data/src/cxx_supportlib/vendor-modified/modp_b64_strict_aliasing.cpp +119 -0
  93. data/src/helper-scripts/node-loader.js +72 -1
  94. data/src/nginx_module/CacheLocationConfig.c +52 -19
  95. data/src/nginx_module/CacheLocationConfig.c.cxxcodebuilder +2 -2
  96. data/src/nginx_module/Configuration.c +26 -1
  97. data/src/nginx_module/Configuration.h +2 -0
  98. data/src/nginx_module/ConfigurationCommands.c +35 -19
  99. data/src/nginx_module/ConfigurationCommands.c.cxxcodebuilder +2 -2
  100. data/src/nginx_module/ContentHandler.c +1 -1
  101. data/src/nginx_module/CreateLocationConfig.c +22 -19
  102. data/src/nginx_module/CreateLocationConfig.c.cxxcodebuilder +2 -2
  103. data/src/nginx_module/LocationConfig.h +21 -19
  104. data/src/nginx_module/LocationConfig.h.cxxcodebuilder +2 -2
  105. data/src/nginx_module/MergeLocationConfig.c +25 -19
  106. data/src/nginx_module/MergeLocationConfig.c.cxxcodebuilder +2 -2
  107. data/src/nginx_module/ngx_http_passenger_module.c +8 -4
  108. data/src/ruby_supportlib/phusion_passenger.rb +9 -4
  109. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +2 -2
  110. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb +1 -1
  111. data/src/ruby_supportlib/phusion_passenger/common_library.rb +13 -0
  112. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +5 -2
  113. data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -1
  114. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +15 -3
  115. data/src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb +51 -0
  116. data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +7 -0
  117. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +17 -0
  118. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +4 -2
  119. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +4 -0
  120. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +5 -0
  121. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/app.rb +19 -10
  122. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/base.rb +25 -0
  123. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +38 -103
  124. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/lldb_controller.rb +178 -0
  125. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/utils.rb +94 -0
  126. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/version.rb +2 -2
  127. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core.rb +2 -2
  128. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version_data.rb +2 -2
  129. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis +5 -3
  130. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis-with-sudo +9 -7
  131. metadata +14 -4
@@ -0,0 +1,94 @@
1
+ # encoding: binary
2
+ #
3
+ # Copyright (c) 2016 Phusion Holding B.V.
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the
7
+ # "Software"), to deal in the Software without restriction, including
8
+ # without limitation the rights to use, copy, modify, merge, publish,
9
+ # distribute, sublicense, and/or sell copies of the Software, and to
10
+ # permit persons to whom the Software is furnished to do so, subject to
11
+ # the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be
14
+ # included in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ module CrashWatch
25
+ module Utils
26
+ extend Utils
27
+
28
+ def self.included(klass)
29
+ # When included into another class, make sure that Utils
30
+ # methods are made private.
31
+ public_instance_methods(false).each do |method_name|
32
+ klass.send(:private, method_name)
33
+ end
34
+ end
35
+
36
+ def gdb_installed?
37
+ command_installed?('gdb')
38
+ end
39
+
40
+ def lldb_installed?
41
+ command_installed?('lldb')
42
+ end
43
+
44
+ def command_installed?(command)
45
+ path = ENV['PATH'].to_s
46
+ path.split(File::PATH_SEPARATOR).each do |dir|
47
+ next if dir.empty?
48
+ filename = "#{dir}/#{command}"
49
+ if File.file?(filename) && File.executable?(filename)
50
+ return true
51
+ end
52
+ end
53
+ false
54
+ end
55
+
56
+ def popen_command(*command)
57
+ a, b = IO.pipe
58
+ c, d = IO.pipe
59
+ if Process.respond_to?(:spawn)
60
+ args = command.dup
61
+ args << {
62
+ STDIN => a,
63
+ STDOUT => d,
64
+ STDERR => d,
65
+ :close_others => true
66
+ }
67
+ pid = Process.spawn(*args)
68
+ else
69
+ pid = fork do
70
+ STDIN.reopen(a)
71
+ STDOUT.reopen(d)
72
+ STDERR.reopen(d)
73
+ b.close
74
+ c.close
75
+ exec(*command)
76
+ end
77
+ end
78
+ a.close
79
+ d.close
80
+ b.binmode
81
+ c.binmode
82
+ [pid, b, c]
83
+ end
84
+
85
+ def find_signal_name(signo)
86
+ Signal.list.each_pair do |name, number|
87
+ if number == signo
88
+ return name
89
+ end
90
+ end
91
+ nil
92
+ end
93
+ end
94
+ end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2015 Phusion
1
+ # Copyright (c) 2010-2016 Phusion Holding B.V.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -20,5 +20,5 @@
20
20
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
 
22
22
  module CrashWatch
23
- VERSION_STRING = '1.1.12'
23
+ VERSION_STRING = '1.2.0'
24
24
  end
@@ -1,5 +1,5 @@
1
1
  # Union Station - https://www.unionstationapp.com/
2
- # Copyright (c) 2015 Phusion Holding B.V.
2
+ # Copyright (c) 2015-2016 Phusion Holding B.V.
3
3
  #
4
4
  # "Union Station" and "Passenger" are trademarks of Phusion Holding B.V.
5
5
  #
@@ -189,7 +189,7 @@ module UnionStationHooks
189
189
  if defined?(PhusionPassenger)
190
190
  PhusionPassenger::App.options['analytics']
191
191
  else
192
- true
192
+ false
193
193
  end
194
194
  end
195
195
 
@@ -39,6 +39,6 @@
39
39
  {
40
40
  :major => 2,
41
41
  :minor => 1,
42
- :tiny => 1,
43
- :string => '2.1.1'
42
+ :tiny => 2,
43
+ :string => '2.1.2'
44
44
  }
@@ -1,14 +1,16 @@
1
1
  # This configuration file tells the test suite which Ruby interpreters to
2
2
  # test against. Below is an example utilizing RVM.
3
3
  #
4
+ # N.B. this is the environment used as part of the Submodule tests
5
+ # (as opposed to the environment used for the Passenger module tests)
6
+ #
4
7
  # If you want test coverage reporting via simplecov to work, then this list
5
8
  # must contain the main Ruby interpreter that you are using, and the entry
6
9
  # for that Ruby interpreter must execute Ruby through 'bundle exec'. In the
7
10
  # example below, this is the case for Ruby 1.9.3.
8
11
 
9
- - name: Ruby 1.8.7
10
- command: rvm-exec ruby-1.8.7-p374 ruby
11
- - name: Ruby 1.9.3
12
+ # these are still supported so we pin to the travis version and re-pin whenever they do
13
+ - name: Ruby 1.9.3-p551
12
14
  command: rvm-exec ruby-1.9.3-p551 bundle exec ruby
13
15
  - name: Ruby 2.1.5
14
16
  command: rvm-exec ruby-2.1.5 ruby
@@ -1,16 +1,18 @@
1
1
  # This configuration file tells the test suite which Ruby interpreters to
2
2
  # test against. Below is an example utilizing RVM.
3
3
  #
4
+ # N.B. this is the environment used as part of the Passenger module tests
5
+ # (as opposed to the environment used for the Submodule tests)
6
+ #
4
7
  # If you want test coverage reporting via simplecov to work, then this list
5
8
  # must contain the main Ruby interpreter that you are using, and the entry
6
9
  # for that Ruby interpreter must execute Ruby through 'bundle exec'. In the
7
10
  # example below, this is the case for Ruby 1.9.3.
8
11
 
9
- - name: Ruby 1.8.7
10
- command: rvm-exec ruby-1.8.7-p374 ruby
11
- - name: Ruby 1.9.3
12
+ # these are still supported so we pin to the travis version and re-pin whenever they do
13
+ - name: Ruby 1.9.3-p551
12
14
  command: rvm-exec ruby-1.9.3-p551 bundle exec ruby
13
- - name: Ruby 2.1.5
14
- command: rvm-exec ruby-2.1.5 ruby
15
- - name: Ruby 2.2.0
16
- command: rvm-exec ruby-2.2.0 ruby
15
+ - name: Ruby 2.1.10
16
+ command: rvm-exec ruby-2.1.10 ruby
17
+ - name: Ruby 2.2.5
18
+ command: rvm-exec ruby-2.2.5 ruby
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.30
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phusion - http://www.phusion.nl/
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-25 00:00:00.000000000 Z
11
+ date: 2016-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -283,6 +283,9 @@ files:
283
283
  - resources/templates/standalone/server.erb
284
284
  - resources/templates/undisclosed_error.html.template
285
285
  - resources/union_station_gateway.crt
286
+ - resources/update_check_client_cert.p12
287
+ - resources/update_check_client_cert.pem
288
+ - resources/update_check_server_pubkey.pem
286
289
  - src/README.md
287
290
  - src/agent/AgentMain.cpp
288
291
  - src/agent/Core/ApiServer.h
@@ -337,6 +340,7 @@ files:
337
340
  - src/agent/Core/CoreMain.cpp
338
341
  - src/agent/Core/OptionParser.h
339
342
  - src/agent/Core/ResponseCache.h
343
+ - src/agent/Core/SecurityUpdateChecker.h
340
344
  - src/agent/Core/SpawningKit/BackgroundIOCapturer.h
341
345
  - src/agent/Core/SpawningKit/Config.h
342
346
  - src/agent/Core/SpawningKit/DirectSpawner.h
@@ -405,6 +409,8 @@ files:
405
409
  - src/cxx_supportlib/BackgroundEventLoop.h
406
410
  - src/cxx_supportlib/Constants.h
407
411
  - src/cxx_supportlib/Constants.h.cxxcodebuilder
412
+ - src/cxx_supportlib/Crypto.cpp
413
+ - src/cxx_supportlib/Crypto.h
408
414
  - src/cxx_supportlib/DataStructures/HashedStaticString.h
409
415
  - src/cxx_supportlib/DataStructures/LString.cpp
410
416
  - src/cxx_supportlib/DataStructures/LString.h
@@ -3422,6 +3428,7 @@ files:
3422
3428
  - src/cxx_supportlib/vendor-modified/modp_b64.cpp
3423
3429
  - src/cxx_supportlib/vendor-modified/modp_b64.h
3424
3430
  - src/cxx_supportlib/vendor-modified/modp_b64_data.h
3431
+ - src/cxx_supportlib/vendor-modified/modp_b64_strict_aliasing.cpp
3425
3432
  - src/cxx_supportlib/vendor-modified/psg_sysqueue.h
3426
3433
  - src/helper-scripts/README.md
3427
3434
  - src/helper-scripts/backtrace-sanitizer.rb
@@ -3570,6 +3577,7 @@ files:
3570
3577
  - src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb
3571
3578
  - src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb
3572
3579
  - src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb
3580
+ - src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb
3573
3581
  - src/ruby_supportlib/phusion_passenger/platform_info/curl.rb
3574
3582
  - src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb
3575
3583
  - src/ruby_supportlib/phusion_passenger/platform_info/depcheck.rb
@@ -3622,7 +3630,10 @@ files:
3622
3630
  - src/ruby_supportlib/phusion_passenger/utils/tmpio.rb
3623
3631
  - src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb
3624
3632
  - src/ruby_supportlib/phusion_passenger/vendor/crash_watch/app.rb
3633
+ - src/ruby_supportlib/phusion_passenger/vendor/crash_watch/base.rb
3625
3634
  - src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb
3635
+ - src/ruby_supportlib/phusion_passenger/vendor/crash_watch/lldb_controller.rb
3636
+ - src/ruby_supportlib/phusion_passenger/vendor/crash_watch/utils.rb
3626
3637
  - src/ruby_supportlib/phusion_passenger/vendor/crash_watch/version.rb
3627
3638
  - src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb
3628
3639
  - src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/lock_file.rb
@@ -3694,10 +3705,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
3694
3705
  version: '0'
3695
3706
  requirements: []
3696
3707
  rubyforge_project: passenger
3697
- rubygems_version: 2.4.5.1
3708
+ rubygems_version: 2.5.2
3698
3709
  signing_key:
3699
3710
  specification_version: 4
3700
3711
  summary: A fast and robust web server and application server for Ruby, Python and
3701
3712
  Node.js
3702
3713
  test_files: []
3703
- has_rdoc: