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
@@ -31,6 +31,77 @@ var fs = require('fs');
31
31
  var net = require('net');
32
32
  var http = require('http');
33
33
 
34
+ function badPackageError(packageName) {
35
+ return "You required the " + packageName + ", which is incompatible with Passenger, a non-functional shim was returned and your app may still work. However, please remove the related code as soon as possible.";
36
+ }
37
+
38
+ function errorMockingRequire(packageName, error) {
39
+ return "Failed to install shim to guard against the " + packageName + ". Error: " + error.message;
40
+ }
41
+
42
+ //Mock out Node Cluster Module
43
+ var Module = require('module');
44
+ var originalRequire = Module.prototype.require;
45
+ Module.prototype.require = function() {
46
+ try {
47
+ if (arguments['0'] == 'cluster') {
48
+ console.error(badPackageError("Node Cluster module"));
49
+ return {
50
+ disconnect : function(){return false;},
51
+ fork : function(){return false;},
52
+ setupMaster : function(){return false;},
53
+ isWorker : true,
54
+ isMaster : false,
55
+ schedulingPolicy : false,
56
+ settings : false,
57
+ worker : false,
58
+ workers : false,
59
+ };
60
+ } else {
61
+ return originalRequire.apply(this, arguments);
62
+ }
63
+ } catch (e) {
64
+ console.error(errorMockingRequire("Node Cluster module", e));
65
+ return originalRequire.apply(this, arguments);
66
+ }
67
+ };
68
+
69
+ //Mock out Meteor Cluster Module
70
+ var vm = require('vm');
71
+ var orig_func = vm.runInThisContext;
72
+ vm.runInThisContext = function() {
73
+ try {
74
+ var scriptPath = arguments['1'];
75
+ if (typeof scriptPath == 'object') {
76
+ scriptPath = scriptPath['filename'];
77
+ }
78
+ if (scriptPath.indexOf('meteorhacks_cluster') != -1) {
79
+ console.error(badPackageError("Meteorhacks cluster package"));
80
+ return (function() {
81
+ Package['meteorhacks:cluster'] = {
82
+ Cluster: {
83
+ _publicServices : {},
84
+ _registeredServices : {},
85
+ _discoveryBackends : { mongodb: {} },
86
+ connect : function(){return false;},
87
+ allowPublicAccess : function(){return false;},
88
+ discoverConnection : function(){return false;},
89
+ register : function(){return false;},
90
+ _isPublicService : function(){return false;},
91
+ registerDiscoveryBackend : function(){return false;},
92
+ _blockCallAgain : function(){return false;}
93
+ }
94
+ };
95
+ });
96
+ } else {
97
+ return orig_func.apply(this, arguments);
98
+ }
99
+ } catch (e) {
100
+ console.error(errorMockingRequire("Meteorhacks Cluster package", e));
101
+ return orig_func.apply(this, arguments);
102
+ }
103
+ };
104
+
34
105
  var LineReader = require('phusion_passenger/line_reader').LineReader;
35
106
  var ustLog = require('phusion_passenger/ustrouter_connector');
36
107
 
@@ -38,7 +109,7 @@ var instrumentModulePaths = [ 'phusion_passenger/log_express', 'phusion_passenge
38
109
  var instrumentedModules = [];
39
110
 
40
111
  module.isApplicationLoader = true; // https://groups.google.com/forum/#!topic/compoundjs/4txxkNtROQg
41
- GLOBAL.PhusionPassenger = exports.PhusionPassenger = new EventEmitter();
112
+ global.PhusionPassenger = exports.PhusionPassenger = new EventEmitter();
42
113
  var stdinReader = new LineReader(process.stdin);
43
114
  beginHandshake();
44
115
  readInitializationHeader();
@@ -1,27 +1,27 @@
1
1
  /*
2
- * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2016 Phusion Holding B.V.
2
+ * Phusion Passenger - https://www.phusionpassenger.com/
3
+ * Copyright (c) 2010-2016 Phusion Holding B.V.
4
4
  *
5
- * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
- * trademarks of Phusion Holding B.V.
5
+ * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
+ * trademarks of Phusion Holding B.V.
7
7
  *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy
9
- * of this software and associated documentation files (the "Software"), to deal
10
- * in the Software without restriction, including without limitation the rights
11
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- * copies of the Software, and to permit persons to whom the Software is
13
- * furnished to do so, subject to the following conditions:
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
14
  *
15
- * The above copyright notice and this permission notice shall be included in
16
- * all copies or substantial portions of the Software.
15
+ * The above copyright notice and this permission notice shall be included in
16
+ * all copies or substantial portions of the Software.
17
17
  *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
- * THE SOFTWARE.
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ * THE SOFTWARE.
25
25
  */
26
26
 
27
27
  /*
@@ -68,6 +68,19 @@ generated_cache_location_part(ngx_conf_t *cf, passenger_loc_conf_t *conf) {
68
68
  len += sizeof("\r\n") - 1;
69
69
  }
70
70
 
71
+ if (conf->disable_security_update_check != NGX_CONF_UNSET) {
72
+ len += sizeof("!~DISABLE_SECURITY_UPDATE_CHECK: ") - 1;
73
+ len += conf->disable_security_update_check
74
+ ? sizeof("t\r\n") - 1
75
+ : sizeof("f\r\n") - 1;
76
+ }
77
+
78
+ if (conf->security_update_check_proxy.data != NULL) {
79
+ len += sizeof("!~SECURITY_UPDATE_CHECK_PROXY: ") - 1;
80
+ len += conf->security_update_check_proxy.len;
81
+ len += sizeof("\r\n") - 1;
82
+ }
83
+
71
84
  if (conf->app_file_descriptor_ulimit != NGX_CONF_UNSET_UINT) {
72
85
  end = ngx_snprintf(int_buf,
73
86
  sizeof(int_buf) - 1,
@@ -325,6 +338,26 @@ generated_cache_location_part(ngx_conf_t *cf, passenger_loc_conf_t *conf) {
325
338
  pos = ngx_copy(pos, int_buf, end - int_buf);
326
339
  pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
327
340
  }
341
+ if (conf->disable_security_update_check != NGX_CONF_UNSET) {
342
+ pos = ngx_copy(pos,
343
+ "!~DISABLE_SECURITY_UPDATE_CHECK: ",
344
+ sizeof("!~DISABLE_SECURITY_UPDATE_CHECK: ") - 1);
345
+ if (conf->disable_security_update_check) {
346
+ pos = ngx_copy(pos, "t\r\n", sizeof("t\r\n") - 1);
347
+ } else {
348
+ pos = ngx_copy(pos, "f\r\n", sizeof("f\r\n") - 1);
349
+ }
350
+ }
351
+
352
+ if (conf->security_update_check_proxy.data != NULL) {
353
+ pos = ngx_copy(pos,
354
+ "!~SECURITY_UPDATE_CHECK_PROXY: ",
355
+ sizeof("!~SECURITY_UPDATE_CHECK_PROXY: ") - 1);
356
+ pos = ngx_copy(pos,
357
+ conf->security_update_check_proxy.data,
358
+ conf->security_update_check_proxy.len);
359
+ pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
360
+ }
328
361
  if (conf->app_file_descriptor_ulimit != NGX_CONF_UNSET_UINT) {
329
362
  pos = ngx_copy(pos,
330
363
  "!~PASSENGER_APP_FILE_DESCRIPTOR_ULIMIT: ",
@@ -23,13 +23,13 @@
23
23
  # THE SOFTWARE.
24
24
 
25
25
  # This file uses the cxxcodebuilder API. Learn more at:
26
- # https://github.com/phusion/passenger/cxxcodebuilder
26
+ # https://github.com/phusion/cxxcodebuilder
27
27
 
28
28
  require 'phusion_passenger/nginx/config_options'
29
29
 
30
30
  def main
31
31
  set_indent_string ' '
32
- comment copyright_header_for(__FILE__)
32
+ comment copyright_header_for(__FILE__), 1
33
33
 
34
34
  separator
35
35
 
@@ -114,6 +114,9 @@ passenger_create_main_conf(ngx_conf_t *cf)
114
114
  conf->data_buffer_dir.len = 0;
115
115
  conf->instance_registry_dir.data = NULL;
116
116
  conf->instance_registry_dir.len = 0;
117
+ conf->disable_security_update_check = NGX_CONF_UNSET;
118
+ conf->security_update_check_proxy.data = NULL;
119
+ conf->security_update_check_proxy.len = 0;
117
120
  conf->abort_on_startup_error = NGX_CONF_UNSET;
118
121
  conf->max_pool_size = NGX_CONF_UNSET_UINT;
119
122
  conf->pool_idle_time = NGX_CONF_UNSET_UINT;
@@ -188,6 +191,14 @@ passenger_init_main_conf(ngx_conf_t *cf, void *conf_pointer)
188
191
  conf->instance_registry_dir.data = (u_char *) "";
189
192
  }
190
193
 
194
+ if (conf->disable_security_update_check == NGX_CONF_UNSET) {
195
+ conf->disable_security_update_check = 0;
196
+ }
197
+
198
+ if (conf->security_update_check_proxy.len == 0) {
199
+ conf->security_update_check_proxy.data = (u_char *) "";
200
+ }
201
+
191
202
  if (conf->abort_on_startup_error == NGX_CONF_UNSET) {
192
203
  conf->abort_on_startup_error = 0;
193
204
  }
@@ -1493,7 +1504,21 @@ const ngx_command_t passenger_commands[] = {
1493
1504
  offsetof(passenger_main_conf_t, prestart_uris),
1494
1505
  NULL },
1495
1506
 
1496
- { ngx_string("passenger_abort_on_startup_error"),
1507
+ { ngx_string("passenger_disable_security_update_check"),
1508
+ NGX_HTTP_MAIN_CONF | NGX_CONF_FLAG,
1509
+ ngx_conf_set_flag_slot,
1510
+ NGX_HTTP_MAIN_CONF_OFFSET,
1511
+ offsetof(passenger_main_conf_t, disable_security_update_check),
1512
+ NULL },
1513
+
1514
+ { ngx_string("passenger_security_update_check_proxy"),
1515
+ NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
1516
+ ngx_conf_set_str_slot,
1517
+ NGX_HTTP_MAIN_CONF_OFFSET,
1518
+ offsetof(passenger_main_conf_t, security_update_check_proxy),
1519
+ NULL },
1520
+
1521
+ { ngx_string("passenger_abort_on_startup_error"),
1497
1522
  NGX_HTTP_MAIN_CONF | NGX_CONF_FLAG,
1498
1523
  ngx_conf_set_flag_slot,
1499
1524
  NGX_HTTP_MAIN_CONF_OFFSET,
@@ -43,6 +43,8 @@ typedef struct {
43
43
  ngx_uint_t socket_backlog;
44
44
  ngx_str_t data_buffer_dir;
45
45
  ngx_str_t instance_registry_dir;
46
+ ngx_flag_t disable_security_update_check;
47
+ ngx_str_t security_update_check_proxy;
46
48
  ngx_flag_t abort_on_startup_error;
47
49
  ngx_uint_t max_pool_size;
48
50
  ngx_uint_t pool_idle_time;
@@ -1,27 +1,27 @@
1
1
  /*
2
- * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2016 Phusion Holding B.V.
2
+ * Phusion Passenger - https://www.phusionpassenger.com/
3
+ * Copyright (c) 2010-2016 Phusion Holding B.V.
4
4
  *
5
- * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
- * trademarks of Phusion Holding B.V.
5
+ * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
+ * trademarks of Phusion Holding B.V.
7
7
  *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy
9
- * of this software and associated documentation files (the "Software"), to deal
10
- * in the Software without restriction, including without limitation the rights
11
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- * copies of the Software, and to permit persons to whom the Software is
13
- * furnished to do so, subject to the following conditions:
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
14
  *
15
- * The above copyright notice and this permission notice shall be included in
16
- * all copies or substantial portions of the Software.
15
+ * The above copyright notice and this permission notice shall be included in
16
+ * all copies or substantial portions of the Software.
17
17
  *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
- * THE SOFTWARE.
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ * THE SOFTWARE.
25
25
  */
26
26
 
27
27
  /*
@@ -53,6 +53,22 @@
53
53
  offsetof(passenger_main_conf_t, core_file_descriptor_ulimit),
54
54
  NULL
55
55
  },
56
+ {
57
+ ngx_string("disable_security_update_check"),
58
+ NGX_HTTP_MAIN_CONF | NGX_CONF_FLAG,
59
+ ngx_conf_set_flag_slot,
60
+ NGX_HTTP_MAIN_CONF_OFFSET,
61
+ offsetof(passenger_main_conf_t, disable_security_update_check),
62
+ NULL
63
+ },
64
+ {
65
+ ngx_string("security_update_check_proxy"),
66
+ NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
67
+ ngx_conf_set_str_slot,
68
+ NGX_HTTP_MAIN_CONF_OFFSET,
69
+ offsetof(passenger_main_conf_t, security_update_check_proxy),
70
+ NULL
71
+ },
56
72
  {
57
73
  ngx_string("passenger_app_file_descriptor_ulimit"),
58
74
  NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
@@ -23,13 +23,13 @@
23
23
  # THE SOFTWARE.
24
24
 
25
25
  # This file uses the cxxcodebuilder API. Learn more at:
26
- # https://github.com/phusion/passenger/cxxcodebuilder
26
+ # https://github.com/phusion/cxxcodebuilder
27
27
 
28
28
  require 'phusion_passenger/nginx/config_options'
29
29
 
30
30
  def main
31
31
  set_indent_string ' '
32
- comment copyright_header_for(__FILE__)
32
+ comment copyright_header_for(__FILE__), 1
33
33
 
34
34
  separator
35
35
 
@@ -446,7 +446,7 @@ prepare_request_buffer_construction(ngx_http_request_t *r, passenger_context_t *
446
446
  state->content_length.len = ngx_snprintf(state->content_length.data,
447
447
  sizeof("4294967295") - 1, "%O", r->headers_in.content_length_n)
448
448
  - state->content_length.data;
449
- }
449
+ } // else: content_length not used
450
450
 
451
451
  state->core_password.data = (u_char *) psg_watchdog_launcher_get_core_password(
452
452
  psg_watchdog_launcher, &len);
@@ -1,27 +1,27 @@
1
1
  /*
2
- * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2016 Phusion Holding B.V.
2
+ * Phusion Passenger - https://www.phusionpassenger.com/
3
+ * Copyright (c) 2010-2016 Phusion Holding B.V.
4
4
  *
5
- * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
- * trademarks of Phusion Holding B.V.
5
+ * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
+ * trademarks of Phusion Holding B.V.
7
7
  *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy
9
- * of this software and associated documentation files (the "Software"), to deal
10
- * in the Software without restriction, including without limitation the rights
11
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- * copies of the Software, and to permit persons to whom the Software is
13
- * furnished to do so, subject to the following conditions:
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
14
  *
15
- * The above copyright notice and this permission notice shall be included in
16
- * all copies or substantial portions of the Software.
15
+ * The above copyright notice and this permission notice shall be included in
16
+ * all copies or substantial portions of the Software.
17
17
  *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
- * THE SOFTWARE.
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ * THE SOFTWARE.
25
25
  */
26
26
 
27
27
  /*
@@ -41,6 +41,9 @@ void
41
41
  generated_set_conf_part(passenger_loc_conf_t *conf) {
42
42
  conf->socket_backlog = NGX_CONF_UNSET;
43
43
  conf->core_file_descriptor_ulimit = NGX_CONF_UNSET_UINT;
44
+ conf->disable_security_update_check = NGX_CONF_UNSET;
45
+ conf->security_update_check_proxy.data = NULL;
46
+ conf->security_update_check_proxy.len = 0;
44
47
  conf->app_file_descriptor_ulimit = NGX_CONF_UNSET_UINT;
45
48
  conf->enabled = NGX_CONF_UNSET;
46
49
  conf->ruby.data = NULL;
@@ -23,13 +23,13 @@
23
23
  # THE SOFTWARE.
24
24
 
25
25
  # This file uses the cxxcodebuilder API. Learn more at:
26
- # https://github.com/phusion/passenger/cxxcodebuilder
26
+ # https://github.com/phusion/cxxcodebuilder
27
27
 
28
28
  require 'phusion_passenger/nginx/config_options'
29
29
 
30
30
  def main
31
31
  set_indent_string ' '
32
- comment copyright_header_for(__FILE__)
32
+ comment copyright_header_for(__FILE__), 1
33
33
 
34
34
  separator
35
35
 
@@ -1,27 +1,27 @@
1
1
  /*
2
- * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2016 Phusion Holding B.V.
2
+ * Phusion Passenger - https://www.phusionpassenger.com/
3
+ * Copyright (c) 2010-2016 Phusion Holding B.V.
4
4
  *
5
- * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
- * trademarks of Phusion Holding B.V.
5
+ * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
+ * trademarks of Phusion Holding B.V.
7
7
  *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy
9
- * of this software and associated documentation files (the "Software"), to deal
10
- * in the Software without restriction, including without limitation the rights
11
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- * copies of the Software, and to permit persons to whom the Software is
13
- * furnished to do so, subject to the following conditions:
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
14
  *
15
- * The above copyright notice and this permission notice shall be included in
16
- * all copies or substantial portions of the Software.
15
+ * The above copyright notice and this permission notice shall be included in
16
+ * all copies or substantial portions of the Software.
17
17
  *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
- * THE SOFTWARE.
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ * THE SOFTWARE.
25
25
  */
26
26
 
27
27
  /*
@@ -53,6 +53,7 @@ typedef struct {
53
53
  ngx_array_t *base_uris;
54
54
  ngx_uint_t core_file_descriptor_ulimit;
55
55
  ngx_int_t debugger;
56
+ ngx_int_t disable_security_update_check;
56
57
  ngx_int_t enabled;
57
58
  ngx_array_t *env_vars;
58
59
  ngx_int_t force_max_concurrent_requests_per_process;
@@ -84,6 +85,7 @@ typedef struct {
84
85
  ngx_str_t python;
85
86
  ngx_str_t restart_dir;
86
87
  ngx_str_t ruby;
88
+ ngx_str_t security_update_check_proxy;
87
89
  ngx_str_t spawn_method;
88
90
  ngx_str_t startup_file;
89
91
  ngx_str_t sticky_sessions_cookie_name;