passenger 6.0.4 → 6.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +43 -1
- data/CONTRIBUTORS +1 -0
- data/bin/passenger-install-nginx-module +1 -1
- data/passenger.gemspec +1 -1
- data/resources/templates/error_renderer/with_details/src/bootstrap/bootstrap.css +0 -0
- data/resources/templates/error_renderer/with_details/src/bootstrap/bootstrap.js +0 -0
- data/resources/templates/error_renderer/with_details/src/bootstrap/config.json +0 -0
- data/resources/templates/standalone/server.erb +1 -0
- data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +1 -0
- data/src/agent/Core/ApplicationPool/Options.h +10 -0
- data/src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +1 -1
- data/src/agent/Core/Config.h +1 -1
- data/src/agent/Core/Controller.h +1 -0
- data/src/agent/Core/Controller/Config.h +4 -1
- data/src/agent/Core/Controller/ForwardResponse.cpp +13 -0
- data/src/agent/Core/Controller/InitRequest.cpp +3 -0
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +1 -0
- data/src/agent/Core/OptionParser.h +3 -0
- data/src/agent/TempDirToucher/TempDirToucherMain.cpp +2 -0
- data/src/agent/Watchdog/Config.h +1 -1
- data/src/apache2_module/Hooks.cpp +4 -0
- data/src/cxx_supportlib/Constants.h +2 -1
- data/src/cxx_supportlib/oxt/system_calls.cpp +10 -10
- data/src/helper-scripts/prespawn +1 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +16 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +7 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +12 -0
- data/src/nginx_module/Configuration.c +6 -2
- data/src/nginx_module/ContentHandler.c +0 -2
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +10 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +15 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +15 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +3 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +7 -0
- data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/logger.js +0 -0
- data/src/ruby_supportlib/phusion_passenger.rb +7 -7
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +9 -0
- data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +1 -3
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +14 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +10 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +6 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb +15 -11
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9eb2308824a660b5a5618d35e5a7e21c76a7ba8
|
4
|
+
data.tar.gz: 286d69ed238ab96960e25b1b2d583c8b16f338d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d395311456ea63da84dc1768f8b2560b327de66445dda623ee72a45ec6c42f03e0045004280dac6b7e5647bcd8924e8e6c02e912a960627eab095c10366d4138
|
7
|
+
data.tar.gz: 73db977a9ce34dcd94d653ca1a067bc19c68c22f68b71270ca64322b11cbb09c0a015d07b7ab3e65e33ae38c16ec620e7146675ea3d9666d4e4e9411f2ad72ff
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,45 @@
|
|
1
|
+
Release 6.0.5
|
2
|
+
-------------
|
3
|
+
|
4
|
+
* [Enterprise] Fixed a regression (introduced in 5.0.0) where Flying Passenger could not update the Passenger configuration. Closes GH-1554.
|
5
|
+
* Adds Ubuntu 20.04 "Focal" packages, and removes Ubuntu 19.04 "Disco" packages.
|
6
|
+
* Adds RHEL / CentOS 8 packages.
|
7
|
+
* [Nginx] Converts CentOS 7 packages to provide a dynamic module instead of a full Nginx install.
|
8
|
+
* Fixes the encoding name for xml output from the `passenger-status --show=xml` command. Closes GH-2248.
|
9
|
+
* Adds the 'etc' gem as an explicit dependency. Closes GH-2124.
|
10
|
+
* Adds a user agent to the passenger pre-spawn script. Closes GH-1534.
|
11
|
+
* Fixes a compilation issue on FreeBSD. Closes GH-2240.
|
12
|
+
* Fixes an issue where rack bodies may not be processed correctly.
|
13
|
+
* Improves the database reconnection speed in forked processes. closes GH-2253.
|
14
|
+
* [Nginx] Adds a config option `passenger_temp_path` to set the path used for the disk backed response cache. Re-Closes GH-2075.
|
15
|
+
* [Apache] Protects the path info and script name passed to the app from modifications done by mod_security. Closes GH-2198.
|
16
|
+
* Ensures baseuri is set per request, even if config is loaded from cache. Closes GH-2117.
|
17
|
+
* Make temp dir toucher cleanup code more resilient to permissions issues.
|
18
|
+
* [Nginx] Bumps the preferred Nginx version to 1.18.0 (previously 1.17.3).
|
19
|
+
* [Nginx] The preferred PCRE version is now 8.44 (previously 8.43).
|
20
|
+
* Removed deprecated rubyforge gemspec property. Contributed by @olleolleolle.
|
21
|
+
* Adds an option for specifying the attributes on the sticky session cookie:
|
22
|
+
- Apache: PassengerStickySessionsCookieAttributes "SameSite=Lax; Secure;"
|
23
|
+
- Nginx: passenger_sticky_sessions_cookie_attributes "SameSite=Lax; Secure;"
|
24
|
+
- Standalone: --sticky-sessions-cookie-attributes "SameSite=Lax; Secure;"
|
25
|
+
* Updated various library versions used in precompiled binaries (used for e.g. gem installs):
|
26
|
+
|
27
|
+
- ccache 3.7.9 (was 3.7.3)
|
28
|
+
- Curl 7.69.1 (was 7.66.0)
|
29
|
+
- Git 2.26.2 (was 2.23.0)
|
30
|
+
- GnuPG 2.2.20 (was 2.2.17)
|
31
|
+
- libgpg_error 1.37 (was 1.36)
|
32
|
+
- OpenSSL 1.0.2u (was 1.0.2t)
|
33
|
+
- PCRE 8.44 (was 8.43)
|
34
|
+
- s3cmd 2.1.0 (was 2.0.2)
|
35
|
+
- RubyGems 3.0.8 (was 3.0.6)
|
36
|
+
- Rubies:
|
37
|
+
- 2.4.6 -> 2.4.10
|
38
|
+
- 2.5.5 -> 2.5.8
|
39
|
+
- 2.6.3 -> 2.6.6
|
40
|
+
+ 2.7.1
|
41
|
+
|
42
|
+
|
1
43
|
Release 6.0.4
|
2
44
|
-------------
|
3
45
|
|
@@ -7,7 +49,7 @@ Release 6.0.4
|
|
7
49
|
Release 6.0.3
|
8
50
|
-------------
|
9
51
|
|
10
|
-
* Add
|
52
|
+
* Add an option to specify the spawn dir during startup, which is specifically useful for CageFS users. Contributed by @plmnikulin. Closes GH-2145.
|
11
53
|
|
12
54
|
- Apache: `PassengerSpawnDir`
|
13
55
|
- Nginx: `passenger_spawn_dir`
|
data/CONTRIBUTORS
CHANGED
@@ -268,7 +268,7 @@ private
|
|
268
268
|
new_screen
|
269
269
|
puts "<banner>PCRE (required by Nginx) not installed, downloading it...</banner>"
|
270
270
|
|
271
|
-
url = "
|
271
|
+
url = "https://ftp.pcre.org/pub/pcre/pcre-#{PREFERRED_PCRE_VERSION}.tar.gz"
|
272
272
|
dirname = "pcre-#{PREFERRED_PCRE_VERSION}"
|
273
273
|
tarball = "#{@working_dir}/pcre.tar.gz"
|
274
274
|
|
data/passenger.gemspec
CHANGED
@@ -10,12 +10,12 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.summary = "A fast and robust web server and application server for Ruby, Python and Node.js"
|
11
11
|
s.name = PhusionPassenger::PACKAGE_NAME
|
12
12
|
s.version = PhusionPassenger::VERSION_STRING
|
13
|
-
s.rubyforge_project = "passenger"
|
14
13
|
s.author = "Phusion - http://www.phusion.nl/"
|
15
14
|
s.email = "software-signing@phusion.nl"
|
16
15
|
s.require_paths = ["src/ruby_supportlib"]
|
17
16
|
s.add_dependency 'rake', '>= 0.8.1'
|
18
17
|
s.add_dependency 'rack'
|
18
|
+
s.add_dependency 'etc'
|
19
19
|
s.files = Dir[*PhusionPassenger::Packaging::GLOB] -
|
20
20
|
Dir[*PhusionPassenger::Packaging::EXCLUDE_GLOB]
|
21
21
|
s.executables = PhusionPassenger::Packaging::USER_EXECUTABLES +
|
File without changes
|
File without changes
|
File without changes
|
@@ -48,6 +48,7 @@ passenger_enabled on;
|
|
48
48
|
<%= nginx_option(app, :restart_dir) %>
|
49
49
|
<%= nginx_option(app, :sticky_sessions) %>
|
50
50
|
<%= nginx_option(app, :sticky_sessions_cookie_name) %>
|
51
|
+
<%= nginx_option(app, :sticky_sessions_cookie_attributes) %>
|
51
52
|
<%= nginx_option(app, :vary_turbocache_by_cookie) %>
|
52
53
|
<%= nginx_option(app, :meteor_app_settings) %>
|
53
54
|
<%= nginx_option(app, :load_shell_envvars) %>
|
@@ -305,7 +305,7 @@ Group::detachedProcessesCheckerMain(GroupPtr self) {
|
|
305
305
|
while (true) {
|
306
306
|
assert(detachedProcessesCheckerActive);
|
307
307
|
|
308
|
-
if (getLifeStatus() == SHUT_DOWN || this_thread::interruption_requested()) {
|
308
|
+
if (getLifeStatus() == SHUT_DOWN || boost::this_thread::interruption_requested()) {
|
309
309
|
UPDATE_TRACE_POINT();
|
310
310
|
P_DEBUG("Stopping detached processes checker");
|
311
311
|
detachedProcessesCheckerActive = false;
|
@@ -260,6 +260,7 @@ Group::inspectConfigInAdminPanelFormat(Json::Value &result) const {
|
|
260
260
|
result["abort_websockets_on_process_shutdown"] = VAL(options.abortWebsocketsOnProcessShutdown);
|
261
261
|
result["force_max_concurrent_requests_per_process"] = VAL(options.forceMaxConcurrentRequestsPerProcess, -1);
|
262
262
|
result["restart_dir"] = NON_EMPTY_SVAL(options.restartDir);
|
263
|
+
result["sticky_sessions_cookie_attributes"] = SVAL(options.stickySessionsCookieAttributes, DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES);
|
263
264
|
|
264
265
|
if (!options.environmentVariables.empty()) {
|
265
266
|
DynamicBuffer envvarsData(options.environmentVariables.size() * 3 / 4);
|
@@ -115,6 +115,8 @@ private:
|
|
115
115
|
result.push_back(&options.hostName);
|
116
116
|
result.push_back(&options.uri);
|
117
117
|
|
118
|
+
result.push_back(&options.stickySessionsCookieAttributes);
|
119
|
+
|
118
120
|
return result;
|
119
121
|
}
|
120
122
|
|
@@ -353,6 +355,12 @@ public:
|
|
353
355
|
*/
|
354
356
|
bool abortWebsocketsOnProcessShutdown;
|
355
357
|
|
358
|
+
/**
|
359
|
+
* The attributes to use for the sticky session cookie.
|
360
|
+
* Values should validate against the regex: ([\w]+(=[\w]+)?; )*
|
361
|
+
*/
|
362
|
+
StaticString stickySessionsCookieAttributes;
|
363
|
+
|
356
364
|
/*-----------------*/
|
357
365
|
|
358
366
|
|
@@ -453,6 +461,7 @@ public:
|
|
453
461
|
maxOutOfBandWorkInstances(1),
|
454
462
|
maxRequestQueueSize(DEFAULT_MAX_REQUEST_QUEUE_SIZE),
|
455
463
|
abortWebsocketsOnProcessShutdown(true),
|
464
|
+
stickySessionsCookieAttributes(DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES, sizeof(DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES) - 1),
|
456
465
|
|
457
466
|
stickySessionId(0),
|
458
467
|
statThrottleRate(DEFAULT_STAT_THROTTLE_RATE),
|
@@ -582,6 +591,7 @@ public:
|
|
582
591
|
appendKeyValue3(vec, "max_processes", maxProcesses);
|
583
592
|
appendKeyValue2(vec, "max_preloader_idle_time", maxPreloaderIdleTime);
|
584
593
|
appendKeyValue3(vec, "max_out_of_band_work_instances", maxOutOfBandWorkInstances);
|
594
|
+
appendKeyValue (vec, "sticky_sessions_cookie_attributes", stickySessionsCookieAttributes);
|
585
595
|
}
|
586
596
|
|
587
597
|
/*********************************/
|
@@ -55,7 +55,7 @@ Pool::garbageCollect(PoolPtr self) {
|
|
55
55
|
self->garbageCollectionCond.timed_wait(lock,
|
56
56
|
posix_time::seconds(5));
|
57
57
|
}
|
58
|
-
while (!this_thread::interruption_requested()) {
|
58
|
+
while (!boost::this_thread::interruption_requested()) {
|
59
59
|
try {
|
60
60
|
UPDATE_TRACE_POINT();
|
61
61
|
unsigned long long sleepTime = self->realGarbageCollect();
|
@@ -202,7 +202,7 @@ Pool::toXml(const ToXmlOptions &options, bool lock) const {
|
|
202
202
|
throw SecurityException("Operation unauthorized");
|
203
203
|
}
|
204
204
|
|
205
|
-
result << "<?xml version=\"1.0\" encoding=\"
|
205
|
+
result << "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";
|
206
206
|
result << "<info version=\"3\">";
|
207
207
|
|
208
208
|
result << "<passenger_version>" << PASSENGER_VERSION << "</passenger_version>";
|
data/src/agent/Core/Config.h
CHANGED
@@ -162,7 +162,7 @@ using namespace std;
|
|
162
162
|
* security_update_checker_interval unsigned integer - default(86400)
|
163
163
|
* security_update_checker_proxy_url string - -
|
164
164
|
* security_update_checker_url string - default("https://securitycheck.phusionpassenger.com/v1/check.json")
|
165
|
-
* server_software string - default("Phusion_Passenger/6.0.
|
165
|
+
* server_software string - default("Phusion_Passenger/6.0.5")
|
166
166
|
* show_version_in_header boolean - default(true)
|
167
167
|
* single_app_mode_app_root string - default,read_only
|
168
168
|
* single_app_mode_app_start_command string - read_only
|
data/src/agent/Core/Controller.h
CHANGED
@@ -123,6 +123,7 @@ private:
|
|
123
123
|
HashedStaticString PASSENGER_SHOW_VERSION_IN_HEADER;
|
124
124
|
HashedStaticString PASSENGER_STICKY_SESSIONS;
|
125
125
|
HashedStaticString PASSENGER_STICKY_SESSIONS_COOKIE_NAME;
|
126
|
+
HashedStaticString PASSENGER_STICKY_SESSIONS_COOKIE_ATTRIBUTES;
|
126
127
|
HashedStaticString PASSENGER_REQUEST_OOB_WORK;
|
127
128
|
HashedStaticString REMOTE_ADDR;
|
128
129
|
HashedStaticString REMOTE_PORT;
|
@@ -113,7 +113,7 @@ parseControllerBenchmarkMode(const StaticString &mode) {
|
|
113
113
|
* multi_app boolean - default(true),read_only
|
114
114
|
* request_freelist_limit unsigned integer - default(1024)
|
115
115
|
* response_buffer_high_watermark unsigned integer - default(134217728)
|
116
|
-
* server_software string - default("Phusion_Passenger/6.0.
|
116
|
+
* server_software string - default("Phusion_Passenger/6.0.5")
|
117
117
|
* show_version_in_header boolean - default(true)
|
118
118
|
* start_reading_after_accept boolean - default(true)
|
119
119
|
* stat_throttle_rate unsigned integer - default(10)
|
@@ -154,6 +154,7 @@ private:
|
|
154
154
|
add("default_server_port", UINT_TYPE, REQUIRED);
|
155
155
|
add("default_sticky_sessions", BOOL_TYPE, OPTIONAL, false);
|
156
156
|
add("default_sticky_sessions_cookie_name", STRING_TYPE, OPTIONAL, DEFAULT_STICKY_SESSIONS_COOKIE_NAME);
|
157
|
+
add("default_sticky_sessions_cookie_attributes", STRING_TYPE, OPTIONAL, DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES);
|
157
158
|
add("server_software", STRING_TYPE, OPTIONAL, SERVER_TOKEN_NAME "/" PASSENGER_VERSION);
|
158
159
|
add("vary_turbocache_by_cookie", STRING_TYPE, OPTIONAL);
|
159
160
|
|
@@ -419,6 +420,7 @@ public:
|
|
419
420
|
StaticString defaultServerPort;
|
420
421
|
StaticString serverSoftware;
|
421
422
|
StaticString defaultStickySessionsCookieName;
|
423
|
+
StaticString defaultStickySessionsCookieAttributes;
|
422
424
|
StaticString defaultVaryTurbocacheByCookie;
|
423
425
|
|
424
426
|
StaticString defaultFriendlyErrorPages;
|
@@ -451,6 +453,7 @@ public:
|
|
451
453
|
defaultServerPort(psg_pstrdup(pool, config["default_server_port"].asString())),
|
452
454
|
serverSoftware(psg_pstrdup(pool, config["server_software"].asString())),
|
453
455
|
defaultStickySessionsCookieName(psg_pstrdup(pool, config["default_sticky_sessions_cookie_name"].asString())),
|
456
|
+
defaultStickySessionsCookieAttributes(psg_pstrdup(pool, config["default_sticky_sessions_cookie_attributes"].asString())),
|
454
457
|
defaultVaryTurbocacheByCookie(psg_pstrdup(pool, config["vary_turbocache_by_cookie"].asString())),
|
455
458
|
|
456
459
|
defaultFriendlyErrorPages(psg_pstrdup(pool, config["default_friendly_error_pages"].asString())),
|
@@ -768,6 +768,19 @@ Controller::constructHeaderBuffersForResponse(Request *req, struct iovec *buffer
|
|
768
768
|
dataSize += baseURI.size();
|
769
769
|
INC_BUFFER_ITER(i);
|
770
770
|
|
771
|
+
|
772
|
+
StaticString stickyAttributes = req->options.stickySessionsCookieAttributes;
|
773
|
+
if (stickyAttributes.size() > 0) {
|
774
|
+
PUSH_STATIC_BUFFER("; ");
|
775
|
+
if (buffers != NULL) {
|
776
|
+
BEGIN_PUSH_NEXT_BUFFER();
|
777
|
+
buffers[i].iov_base = (void *) stickyAttributes.data();
|
778
|
+
buffers[i].iov_len = stickyAttributes.size();
|
779
|
+
}
|
780
|
+
dataSize += stickyAttributes.size();
|
781
|
+
INC_BUFFER_ITER(i);
|
782
|
+
}
|
783
|
+
|
771
784
|
PUSH_STATIC_BUFFER("\r\n");
|
772
785
|
}
|
773
786
|
|
@@ -153,6 +153,7 @@ Controller::initializePoolOptions(Client *client, Request *req, RequestAnalysis
|
|
153
153
|
|
154
154
|
if (options != NULL) {
|
155
155
|
req->options = **options;
|
156
|
+
fillPoolOption(req, req->options.baseURI, "!~SCRIPT_NAME");
|
156
157
|
} else {
|
157
158
|
createNewPoolOptions(client, req, hAppGroupName);
|
158
159
|
}
|
@@ -202,6 +203,7 @@ Controller::fillPoolOptionsFromConfigCaches(Options &options,
|
|
202
203
|
options.loadShellEnvvars = requestConfig->defaultLoadShellEnvvars;
|
203
204
|
options.statThrottleRate = mainConfig.statThrottleRate;
|
204
205
|
options.maxRequests = requestConfig->defaultMaxRequests;
|
206
|
+
options.stickySessionsCookieAttributes = requestConfig->defaultStickySessionsCookieAttributes;
|
205
207
|
|
206
208
|
/******************************/
|
207
209
|
}
|
@@ -377,6 +379,7 @@ Controller::createNewPoolOptions(Client *client, Request *req,
|
|
377
379
|
fillPoolOption(req, options.fileDescriptorUlimit, "!~PASSENGER_APP_FILE_DESCRIPTOR_ULIMIT");
|
378
380
|
fillPoolOption(req, options.raiseInternalError, "!~PASSENGER_RAISE_INTERNAL_ERROR");
|
379
381
|
fillPoolOption(req, options.lveMinUid, "!~PASSENGER_LVE_MIN_UID");
|
382
|
+
fillPoolOption(req, options.stickySessionsCookieAttributes, "!~PASSENGER_STICKY_SESSIONS_COOKIE_ATTRIBUTES");
|
380
383
|
|
381
384
|
// maxProcesses is configured per-application by the (Enterprise) maxInstances option (and thus passed
|
382
385
|
// via request headers). In OSS the max processes can also be configured, but on a global level
|
@@ -70,6 +70,7 @@ Controller::preinitialize() {
|
|
70
70
|
PASSENGER_SHOW_VERSION_IN_HEADER = "!~PASSENGER_SHOW_VERSION_IN_HEADER";
|
71
71
|
PASSENGER_STICKY_SESSIONS = "!~PASSENGER_STICKY_SESSIONS";
|
72
72
|
PASSENGER_STICKY_SESSIONS_COOKIE_NAME = "!~PASSENGER_STICKY_SESSIONS_COOKIE_NAME";
|
73
|
+
PASSENGER_STICKY_SESSIONS_COOKIE_ATTRIBUTES = "!~PASSENGER_STICKY_SESSIONS_COOKIE_ATTRIBUTES";
|
73
74
|
PASSENGER_REQUEST_OOB_WORK = "!~Request-OOB-Work";
|
74
75
|
REMOTE_ADDR = "!~REMOTE_ADDR";
|
75
76
|
REMOTE_PORT = "!~REMOTE_PORT";
|
@@ -173,6 +173,9 @@ coreUsage() {
|
|
173
173
|
printf(" --sticky-sessions-cookie-name NAME\n");
|
174
174
|
printf(" Cookie name to use for sticky sessions.\n");
|
175
175
|
printf(" Default: " DEFAULT_STICKY_SESSIONS_COOKIE_NAME "\n");
|
176
|
+
printf(" --sticky-sessions-cookie-attributes 'NAME1=VALUE1; NAME2'\n");
|
177
|
+
printf(" The attributes to use for the sticky session cookie.\n");
|
178
|
+
printf(" Default: " DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES "\n");
|
176
179
|
printf(" --vary-turbocache-by-cookie NAME\n");
|
177
180
|
printf(" Vary the turbocache by the cookie of the given name\n");
|
178
181
|
printf(" --disable-turbocaching\n");
|
data/src/agent/Watchdog/Config.h
CHANGED
@@ -151,7 +151,7 @@ using namespace std;
|
|
151
151
|
* security_update_checker_interval unsigned integer - default(86400)
|
152
152
|
* security_update_checker_proxy_url string - -
|
153
153
|
* security_update_checker_url string - default("https://securitycheck.phusionpassenger.com/v1/check.json")
|
154
|
-
* server_software string - default("Phusion_Passenger/6.0.
|
154
|
+
* server_software string - default("Phusion_Passenger/6.0.5")
|
155
155
|
* setsid boolean - default(false)
|
156
156
|
* show_version_in_header boolean - default(true)
|
157
157
|
* single_app_mode_app_root string - default,read_only
|
@@ -1020,6 +1020,10 @@ private:
|
|
1020
1020
|
env = (apr_table_entry_t*) env_arr->elts;
|
1021
1021
|
|
1022
1022
|
for (i = 0; i < env_arr->nelts; ++i) {
|
1023
|
+
if ((strcmp(env[i].key, "SCRIPT_NAME") == 0)
|
1024
|
+
|| (strcmp(env[i].key, "PATH_INFO") == 0)) {
|
1025
|
+
continue;
|
1026
|
+
}
|
1023
1027
|
envvarsData.append(env[i].key);
|
1024
1028
|
envvarsData.append("\0", 1);
|
1025
1029
|
if (env[i].val != NULL) {
|
@@ -68,6 +68,7 @@
|
|
68
68
|
#define DEFAULT_SPAWN_METHOD "smart"
|
69
69
|
#define DEFAULT_START_TIMEOUT 90000
|
70
70
|
#define DEFAULT_STAT_THROTTLE_RATE 10
|
71
|
+
#define DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES "SameSite=Lax; Secure;"
|
71
72
|
#define DEFAULT_STICKY_SESSIONS_COOKIE_NAME "_passenger_route"
|
72
73
|
#define DEFAULT_WEB_APP_USER "nobody"
|
73
74
|
#define ENTERPRISE_URL "https://www.phusionpassenger.com/enterprise"
|
@@ -81,7 +82,7 @@
|
|
81
82
|
#define PASSENGER_API_VERSION_MAJOR 0
|
82
83
|
#define PASSENGER_API_VERSION_MINOR 3
|
83
84
|
#define PASSENGER_DEFAULT_USER "nobody"
|
84
|
-
#define PASSENGER_VERSION "6.0.
|
85
|
+
#define PASSENGER_VERSION "6.0.5"
|
85
86
|
#define POOL_HELPER_THREAD_STACK_SIZE 262144
|
86
87
|
#define PROCESS_SHUTDOWN_TIMEOUT 60
|
87
88
|
#define PROCESS_SHUTDOWN_TIMEOUT_DISPLAY "1 minute"
|
@@ -132,15 +132,15 @@ shouldSimulateFailure() {
|
|
132
132
|
_my_errno = errno; \
|
133
133
|
} while ((error_expression) \
|
134
134
|
&& _my_errno == EINTR \
|
135
|
-
&& (!this_thread::syscalls_interruptable() \
|
136
|
-
|| !(_intr_requested = this_thread::interruption_requested())) \
|
135
|
+
&& (!boost::this_thread::syscalls_interruptable() \
|
136
|
+
|| !(_intr_requested = boost::this_thread::interruption_requested())) \
|
137
137
|
); \
|
138
138
|
if (OXT_LIKELY(ctx != NULL)) { \
|
139
139
|
ctx->syscall_interruption_lock.lock(); \
|
140
140
|
} \
|
141
141
|
if ((error_expression) \
|
142
142
|
&& _my_errno == EINTR \
|
143
|
-
&& this_thread::syscalls_interruptable() \
|
143
|
+
&& boost::this_thread::syscalls_interruptable() \
|
144
144
|
&& _intr_requested) { \
|
145
145
|
throw thread_interrupted(); \
|
146
146
|
} \
|
@@ -284,8 +284,8 @@ syscalls::close(int fd) {
|
|
284
284
|
}
|
285
285
|
if (ret == -1
|
286
286
|
&& errno == EINTR
|
287
|
-
&& this_thread::syscalls_interruptable()
|
288
|
-
&& this_thread::interruption_requested()) {
|
287
|
+
&& boost::this_thread::syscalls_interruptable()
|
288
|
+
&& boost::this_thread::interruption_requested()) {
|
289
289
|
throw thread_interrupted();
|
290
290
|
} else {
|
291
291
|
return ret;
|
@@ -662,8 +662,8 @@ syscalls::nanosleep(const struct timespec *req, struct timespec *rem) {
|
|
662
662
|
}
|
663
663
|
} while (ret == -1
|
664
664
|
&& e == EINTR
|
665
|
-
&& (!this_thread::syscalls_interruptable()
|
666
|
-
|| !(intr_requested = this_thread::interruption_requested()))
|
665
|
+
&& (!boost::this_thread::syscalls_interruptable()
|
666
|
+
|| !(intr_requested = boost::this_thread::interruption_requested()))
|
667
667
|
);
|
668
668
|
|
669
669
|
if (OXT_UNLIKELY(ctx != NULL)) {
|
@@ -672,7 +672,7 @@ syscalls::nanosleep(const struct timespec *req, struct timespec *rem) {
|
|
672
672
|
|
673
673
|
if (ret == -1
|
674
674
|
&& e == EINTR
|
675
|
-
&& this_thread::syscalls_interruptable()
|
675
|
+
&& boost::this_thread::syscalls_interruptable()
|
676
676
|
&& intr_requested) {
|
677
677
|
throw thread_interrupted();
|
678
678
|
}
|
@@ -748,14 +748,14 @@ syscalls::waitpid(pid_t pid, int *status, int options) {
|
|
748
748
|
* http://stackoverflow.com/questions/20410943/segmentation-fault-when-accessing-statically-initialized-thread-variable?noredirect=1#comment30483943_20410943
|
749
749
|
* https://bugzilla.redhat.com/show_bug.cgi?id=731228
|
750
750
|
*/
|
751
|
-
__thread int this_thread::_syscalls_interruptable = 1;
|
751
|
+
__thread int boost::this_thread::_syscalls_interruptable = 1;
|
752
752
|
|
753
753
|
bool
|
754
754
|
boost::this_thread::syscalls_interruptable() {
|
755
755
|
return _syscalls_interruptable;
|
756
756
|
}
|
757
757
|
#else
|
758
|
-
boost::thread_specific_ptr<bool> this_thread::_syscalls_interruptable;
|
758
|
+
boost::thread_specific_ptr<bool> boost::this_thread::_syscalls_interruptable;
|
759
759
|
|
760
760
|
bool
|
761
761
|
boost::this_thread::syscalls_interruptable() {
|
data/src/helper-scripts/prespawn
CHANGED
@@ -107,6 +107,7 @@ class PrespawnLocation
|
|
107
107
|
def head_request
|
108
108
|
socket.write("HEAD #{request_path} HTTP/1.1\r\n")
|
109
109
|
socket.write("Host: #{request_host}\r\n")
|
110
|
+
socket.write("User-Agent: Passenger Prespawn Script\r\n")
|
110
111
|
socket.write("Authorization: Basic " + base64(@uri.userinfo) + "\r\n") if @uri.userinfo
|
111
112
|
socket.write("Connection: close\r\n")
|
112
113
|
socket.write("\r\n")
|
@@ -542,6 +542,14 @@
|
|
542
542
|
offsetof(passenger_loc_conf_t, autogenerated.document_root),
|
543
543
|
NULL
|
544
544
|
},
|
545
|
+
{
|
546
|
+
ngx_string("passenger_temp_path"),
|
547
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
548
|
+
ngx_conf_set_path_slot,
|
549
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
550
|
+
offsetof(passenger_loc_conf_t, upstream_config.temp_path),
|
551
|
+
NULL
|
552
|
+
},
|
545
553
|
{
|
546
554
|
ngx_string("passenger_ignore_headers"),
|
547
555
|
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_1MORE,
|
@@ -678,6 +686,14 @@
|
|
678
686
|
offsetof(passenger_loc_conf_t, autogenerated.sticky_sessions_cookie_name),
|
679
687
|
NULL
|
680
688
|
},
|
689
|
+
{
|
690
|
+
ngx_string("passenger_sticky_sessions_cookie_attributes"),
|
691
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
692
|
+
passenger_conf_set_sticky_sessions_cookie_attributes,
|
693
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
694
|
+
offsetof(passenger_loc_conf_t, autogenerated.sticky_sessions_cookie_attributes),
|
695
|
+
NULL
|
696
|
+
},
|
681
697
|
{
|
682
698
|
ngx_string("passenger_vary_turbocache_by_cookie"),
|
683
699
|
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
@@ -430,5 +430,12 @@ set_manifest_autogenerated_loc_conf_defaults(manifest_gen_ctx_t *ctx, PsgJsonVal
|
|
430
430
|
"_passenger_route",
|
431
431
|
sizeof("_passenger_route") - 1);
|
432
432
|
|
433
|
+
add_manifest_options_container_static_default_str(ctx,
|
434
|
+
options_container,
|
435
|
+
"passenger_sticky_sessions_cookie_attributes",
|
436
|
+
sizeof("passenger_sticky_sessions_cookie_attributes") - 1,
|
437
|
+
"SameSite=Lax; Secure;",
|
438
|
+
sizeof("SameSite=Lax; Secure;") - 1);
|
439
|
+
|
433
440
|
}
|
434
441
|
|
@@ -961,6 +961,18 @@ passenger_conf_set_sticky_sessions_cookie_name(ngx_conf_t *cf, ngx_command_t *cm
|
|
961
961
|
return ngx_conf_set_str_slot(cf, cmd, conf);
|
962
962
|
}
|
963
963
|
|
964
|
+
static char *
|
965
|
+
passenger_conf_set_sticky_sessions_cookie_attributes(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
|
966
|
+
passenger_loc_conf_t *passenger_conf = conf;
|
967
|
+
|
968
|
+
passenger_conf->autogenerated.sticky_sessions_cookie_attributes_explicitly_set = 1;
|
969
|
+
record_loc_conf_source_location(cf, passenger_conf,
|
970
|
+
&passenger_conf->autogenerated.sticky_sessions_cookie_attributes_source_file,
|
971
|
+
&passenger_conf->autogenerated.sticky_sessions_cookie_attributes_source_line);
|
972
|
+
|
973
|
+
return ngx_conf_set_str_slot(cf, cmd, conf);
|
974
|
+
}
|
975
|
+
|
964
976
|
static char *
|
965
977
|
passenger_conf_set_vary_turbocache_by_cookie(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
|
966
978
|
passenger_loc_conf_t *passenger_conf = conf;
|
@@ -577,10 +577,14 @@ passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
|
|
577
577
|
|NGX_HTTP_UPSTREAM_FT_OFF;
|
578
578
|
}
|
579
579
|
|
580
|
-
ngx_conf_merge_path_value(cf,
|
580
|
+
if (ngx_conf_merge_path_value(cf,
|
581
581
|
&conf->upstream_config.temp_path,
|
582
582
|
prev->upstream_config.temp_path,
|
583
|
-
&ngx_http_proxy_temp_path)
|
583
|
+
&ngx_http_proxy_temp_path)
|
584
|
+
!= NGX_OK)
|
585
|
+
{
|
586
|
+
return NGX_CONF_ERROR;
|
587
|
+
}
|
584
588
|
|
585
589
|
#if (NGX_HTTP_CACHE)
|
586
590
|
|
@@ -1824,8 +1824,6 @@ passenger_content_handler(ngx_http_request_t *r)
|
|
1824
1824
|
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
1825
1825
|
}
|
1826
1826
|
|
1827
|
-
//u->pipe->temp_file->path = u->conf->temp_path;
|
1828
|
-
|
1829
1827
|
u->pipe->input_filter = ngx_event_pipe_copy_input_filter;
|
1830
1828
|
u->pipe->input_ctx = r;
|
1831
1829
|
|
@@ -93,6 +93,8 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
93
93
|
conf->sticky_sessions = NGX_CONF_UNSET;
|
94
94
|
conf->sticky_sessions_cookie_name.data = NULL;
|
95
95
|
conf->sticky_sessions_cookie_name.len = 0;
|
96
|
+
conf->sticky_sessions_cookie_attributes.data = NULL;
|
97
|
+
conf->sticky_sessions_cookie_attributes.len = 0;
|
96
98
|
conf->vary_turbocache_by_cookie.data = NULL;
|
97
99
|
conf->vary_turbocache_by_cookie.len = 0;
|
98
100
|
conf->app_log_file.data = NULL;
|
@@ -218,6 +220,10 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
218
220
|
conf->document_root_source_file.len = 0;
|
219
221
|
conf->document_root_source_line = 0;
|
220
222
|
conf->document_root_explicitly_set = 0;
|
223
|
+
conf->upstream_config_temp_path_source_file.data = NULL;
|
224
|
+
conf->upstream_config_temp_path_source_file.len = 0;
|
225
|
+
conf->upstream_config_temp_path_source_line = 0;
|
226
|
+
conf->upstream_config_temp_path_explicitly_set = 0;
|
221
227
|
conf->upstream_config_ignore_headers_source_file.data = NULL;
|
222
228
|
conf->upstream_config_ignore_headers_source_file.len = 0;
|
223
229
|
conf->upstream_config_ignore_headers_source_line = 0;
|
@@ -286,6 +292,10 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
286
292
|
conf->sticky_sessions_cookie_name_source_file.len = 0;
|
287
293
|
conf->sticky_sessions_cookie_name_source_line = 0;
|
288
294
|
conf->sticky_sessions_cookie_name_explicitly_set = 0;
|
295
|
+
conf->sticky_sessions_cookie_attributes_source_file.data = NULL;
|
296
|
+
conf->sticky_sessions_cookie_attributes_source_file.len = 0;
|
297
|
+
conf->sticky_sessions_cookie_attributes_source_line = 0;
|
298
|
+
conf->sticky_sessions_cookie_attributes_explicitly_set = 0;
|
289
299
|
conf->vary_turbocache_by_cookie_source_file.data = NULL;
|
290
300
|
conf->vary_turbocache_by_cookie_source_file.len = 0;
|
291
301
|
conf->vary_turbocache_by_cookie_source_line = 0;
|
@@ -238,6 +238,12 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
238
238
|
len += sizeof("\r\n") - 1;
|
239
239
|
}
|
240
240
|
|
241
|
+
if (conf->autogenerated.sticky_sessions_cookie_attributes.data != NULL) {
|
242
|
+
len += sizeof("!~PASSENGER_STICKY_SESSIONS_COOKIE_ATTRIBUTES: ") - 1;
|
243
|
+
len += conf->autogenerated.sticky_sessions_cookie_attributes.len;
|
244
|
+
len += sizeof("\r\n") - 1;
|
245
|
+
}
|
246
|
+
|
241
247
|
if (conf->autogenerated.vary_turbocache_by_cookie.data != NULL) {
|
242
248
|
len += sizeof("!~PASSENGER_VARY_TURBOCACHE_BY_COOKIE: ") - 1;
|
243
249
|
len += conf->autogenerated.vary_turbocache_by_cookie.len;
|
@@ -515,6 +521,15 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
515
521
|
conf->autogenerated.sticky_sessions_cookie_name.len);
|
516
522
|
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
517
523
|
}
|
524
|
+
if (conf->autogenerated.sticky_sessions_cookie_attributes.data != NULL) {
|
525
|
+
pos = ngx_copy(pos,
|
526
|
+
"!~PASSENGER_STICKY_SESSIONS_COOKIE_ATTRIBUTES: ",
|
527
|
+
sizeof("!~PASSENGER_STICKY_SESSIONS_COOKIE_ATTRIBUTES: ") - 1);
|
528
|
+
pos = ngx_copy(pos,
|
529
|
+
conf->autogenerated.sticky_sessions_cookie_attributes.data,
|
530
|
+
conf->autogenerated.sticky_sessions_cookie_attributes.len);
|
531
|
+
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
532
|
+
}
|
518
533
|
if (conf->autogenerated.vary_turbocache_by_cookie.data != NULL) {
|
519
534
|
pos = ngx_copy(pos,
|
520
535
|
"!~PASSENGER_VARY_TURBOCACHE_BY_COOKIE: ",
|
@@ -622,6 +622,20 @@ generate_config_manifest_for_autogenerated_loc_conf(manifest_gen_ctx_t *ctx, pas
|
|
622
622
|
(const char *) plcf->autogenerated.sticky_sessions_cookie_name.data,
|
623
623
|
plcf->autogenerated.sticky_sessions_cookie_name.len);
|
624
624
|
}
|
625
|
+
if (plcf->autogenerated.sticky_sessions_cookie_attributes_explicitly_set) {
|
626
|
+
find_or_create_manifest_app_and_loc_options_containers(ctx,
|
627
|
+
plcf, cscf, clcf, &app_options_container, &loc_options_container);
|
628
|
+
option_container = find_or_create_manifest_option_container(ctx,
|
629
|
+
loc_options_container,
|
630
|
+
"passenger_sticky_sessions_cookie_attributes",
|
631
|
+
sizeof("passenger_sticky_sessions_cookie_attributes") - 1);
|
632
|
+
hierarchy_member = add_manifest_option_container_hierarchy_member(option_container,
|
633
|
+
&plcf->autogenerated.sticky_sessions_cookie_attributes_source_file,
|
634
|
+
plcf->autogenerated.sticky_sessions_cookie_attributes_source_line);
|
635
|
+
psg_json_value_set_str(hierarchy_member, "value",
|
636
|
+
(const char *) plcf->autogenerated.sticky_sessions_cookie_attributes.data,
|
637
|
+
plcf->autogenerated.sticky_sessions_cookie_attributes.len);
|
638
|
+
}
|
625
639
|
if (plcf->autogenerated.vary_turbocache_by_cookie_explicitly_set) {
|
626
640
|
find_or_create_manifest_app_and_loc_options_containers(ctx,
|
627
641
|
plcf, cscf, clcf, &app_options_container, &loc_options_container);
|
@@ -653,6 +667,7 @@ generate_config_manifest_for_autogenerated_loc_conf(manifest_gen_ctx_t *ctx, pas
|
|
653
667
|
|
654
668
|
/*
|
655
669
|
* No autogenerated code for:
|
670
|
+
* passenger_temp_path
|
656
671
|
* passenger_ignore_headers
|
657
672
|
* passenger_buffer_size
|
658
673
|
* passenger_buffers
|
@@ -157,6 +157,9 @@ passenger_merge_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *conf,
|
|
157
157
|
ngx_conf_merge_str_value(conf->sticky_sessions_cookie_name,
|
158
158
|
prev->sticky_sessions_cookie_name,
|
159
159
|
"_passenger_route");
|
160
|
+
ngx_conf_merge_str_value(conf->sticky_sessions_cookie_attributes,
|
161
|
+
prev->sticky_sessions_cookie_attributes,
|
162
|
+
"SameSite=Lax; Secure;");
|
160
163
|
ngx_conf_merge_str_value(conf->vary_turbocache_by_cookie,
|
161
164
|
prev->vary_turbocache_by_cookie,
|
162
165
|
NULL);
|
@@ -75,6 +75,7 @@ typedef struct {
|
|
75
75
|
ngx_str_t ruby;
|
76
76
|
ngx_str_t spawn_method;
|
77
77
|
ngx_str_t startup_file;
|
78
|
+
ngx_str_t sticky_sessions_cookie_attributes;
|
78
79
|
ngx_str_t sticky_sessions_cookie_name;
|
79
80
|
ngx_str_t user;
|
80
81
|
ngx_str_t vary_turbocache_by_cookie;
|
@@ -115,6 +116,7 @@ typedef struct {
|
|
115
116
|
ngx_str_t start_timeout_source_file;
|
116
117
|
ngx_str_t startup_file_source_file;
|
117
118
|
ngx_str_t sticky_sessions_source_file;
|
119
|
+
ngx_str_t sticky_sessions_cookie_attributes_source_file;
|
118
120
|
ngx_str_t sticky_sessions_cookie_name_source_file;
|
119
121
|
ngx_str_t upstream_config_buffer_size_source_file;
|
120
122
|
ngx_str_t upstream_config_buffering_source_file;
|
@@ -126,6 +128,7 @@ typedef struct {
|
|
126
128
|
ngx_str_t upstream_config_pass_headers_source_file;
|
127
129
|
ngx_str_t upstream_config_read_timeout_source_file;
|
128
130
|
ngx_str_t upstream_config_request_buffering_source_file;
|
131
|
+
ngx_str_t upstream_config_temp_path_source_file;
|
129
132
|
ngx_str_t user_source_file;
|
130
133
|
ngx_str_t vary_turbocache_by_cookie_source_file;
|
131
134
|
|
@@ -165,6 +168,7 @@ typedef struct {
|
|
165
168
|
ngx_uint_t start_timeout_source_line;
|
166
169
|
ngx_uint_t startup_file_source_line;
|
167
170
|
ngx_uint_t sticky_sessions_source_line;
|
171
|
+
ngx_uint_t sticky_sessions_cookie_attributes_source_line;
|
168
172
|
ngx_uint_t sticky_sessions_cookie_name_source_line;
|
169
173
|
ngx_uint_t upstream_config_buffer_size_source_line;
|
170
174
|
ngx_uint_t upstream_config_buffering_source_line;
|
@@ -176,6 +180,7 @@ typedef struct {
|
|
176
180
|
ngx_uint_t upstream_config_pass_headers_source_line;
|
177
181
|
ngx_uint_t upstream_config_read_timeout_source_line;
|
178
182
|
ngx_uint_t upstream_config_request_buffering_source_line;
|
183
|
+
ngx_uint_t upstream_config_temp_path_source_line;
|
179
184
|
ngx_uint_t user_source_line;
|
180
185
|
ngx_uint_t vary_turbocache_by_cookie_source_line;
|
181
186
|
|
@@ -215,6 +220,7 @@ typedef struct {
|
|
215
220
|
ngx_int_t start_timeout_explicitly_set;
|
216
221
|
ngx_int_t startup_file_explicitly_set;
|
217
222
|
ngx_int_t sticky_sessions_explicitly_set;
|
223
|
+
ngx_int_t sticky_sessions_cookie_attributes_explicitly_set;
|
218
224
|
ngx_int_t sticky_sessions_cookie_name_explicitly_set;
|
219
225
|
ngx_int_t upstream_config_buffer_size_explicitly_set;
|
220
226
|
ngx_int_t upstream_config_buffering_explicitly_set;
|
@@ -226,6 +232,7 @@ typedef struct {
|
|
226
232
|
ngx_int_t upstream_config_pass_headers_explicitly_set;
|
227
233
|
ngx_int_t upstream_config_read_timeout_explicitly_set;
|
228
234
|
ngx_int_t upstream_config_request_buffering_explicitly_set;
|
235
|
+
ngx_int_t upstream_config_temp_path_explicitly_set;
|
229
236
|
ngx_int_t user_explicitly_set;
|
230
237
|
ngx_int_t vary_turbocache_by_cookie_explicitly_set;
|
231
238
|
} passenger_autogenerated_loc_conf_t;
|
File without changes
|
@@ -31,20 +31,20 @@ module PhusionPassenger
|
|
31
31
|
|
32
32
|
PACKAGE_NAME = 'passenger'
|
33
33
|
# Run 'rake src/cxx_supportlib/Constants.h configkit_schemas_inline_comments' after changing this number.
|
34
|
-
VERSION_STRING = '6.0.
|
34
|
+
VERSION_STRING = '6.0.5'
|
35
35
|
|
36
36
|
# Tip: find the SHA-256 with ./dev/nginx_version_sha2 <VERSION>
|
37
|
-
PREFERRED_NGINX_VERSION = '1.
|
38
|
-
NGINX_SHA256_CHECKSUM = '
|
37
|
+
PREFERRED_NGINX_VERSION = '1.18.0'
|
38
|
+
NGINX_SHA256_CHECKSUM = '4c373e7ab5bf91d34a4f11a0c9496561061ba5eee6020db272a17a7228d35f99'
|
39
39
|
|
40
40
|
# Packaging may be locked to an older version due to the specific module configuration being
|
41
41
|
# incompatible with the version we prefer (latest stable).
|
42
|
-
PACKAGING_PREFERRED_NGINX_VERSION = '1.
|
43
|
-
PACKAGING_NGINX_SHA256_CHECKSUM = '
|
42
|
+
PACKAGING_PREFERRED_NGINX_VERSION = '1.18.0'
|
43
|
+
PACKAGING_NGINX_SHA256_CHECKSUM = '4c373e7ab5bf91d34a4f11a0c9496561061ba5eee6020db272a17a7228d35f99'
|
44
44
|
|
45
45
|
# sha256sum of the .tar.gz
|
46
|
-
PREFERRED_PCRE_VERSION = '8.
|
47
|
-
PCRE_SHA256_CHECKSUM = '
|
46
|
+
PREFERRED_PCRE_VERSION = '8.44'
|
47
|
+
PCRE_SHA256_CHECKSUM = 'aecafd4af3bd0f3935721af77b889d9024b2e01d96b58471bd91a3063fb47728'
|
48
48
|
|
49
49
|
STANDALONE_INTERFACE_VERSION = 1
|
50
50
|
|
@@ -547,6 +547,15 @@ APACHE2_CONFIGURATION_OPTIONS = [
|
|
547
547
|
:default_expr => 'DEFAULT_STICKY_SESSIONS_COOKIE_NAME',
|
548
548
|
:desc => 'The cookie name to use for sticky sessions.'
|
549
549
|
},
|
550
|
+
{
|
551
|
+
:name => 'PassengerStickySessionsCookieAttributes',
|
552
|
+
:type => :string,
|
553
|
+
:context => :location,
|
554
|
+
:htaccess_context => ['OR_ALL'],
|
555
|
+
:default => DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES,
|
556
|
+
:default_expr => 'DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES',
|
557
|
+
:desc => 'The attributes to use for the sticky session cookie.'
|
558
|
+
},
|
550
559
|
{
|
551
560
|
:name => 'PassengerBufferResponse',
|
552
561
|
:type => :flag,
|
@@ -62,6 +62,7 @@ module PhusionPassenger
|
|
62
62
|
PASSENGER_DEFAULT_USER = "nobody"
|
63
63
|
DEFAULT_CONCURRENCY_MODEL = "process"
|
64
64
|
DEFAULT_STICKY_SESSIONS_COOKIE_NAME = "_passenger_route"
|
65
|
+
DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES = "SameSite=Lax; Secure;"
|
65
66
|
DEFAULT_APP_THREAD_COUNT = 1
|
66
67
|
DEFAULT_RESPONSE_BUFFER_HIGH_WATERMARK = 1024 * 1024 * 128
|
67
68
|
DEFAULT_MAX_REQUEST_QUEUE_SIZE = 100
|
@@ -316,10 +316,8 @@ module PhusionPassenger
|
|
316
316
|
ActiveRecord::Base.clear_all_connections!
|
317
317
|
elsif ActiveRecord::Base.respond_to?(:clear_active_connections!)
|
318
318
|
ActiveRecord::Base.clear_active_connections!
|
319
|
-
elsif ActiveRecord::Base.respond_to?(:connected?) &&
|
320
|
-
ActiveRecord::Base.connected?
|
321
|
-
ActiveRecord::Base.establish_connection
|
322
319
|
end
|
320
|
+
ActiveRecord::Base.establish_connection
|
323
321
|
end
|
324
322
|
|
325
323
|
# Fire off events.
|
@@ -556,6 +556,14 @@ NGINX_CONFIGURATION_OPTIONS = [
|
|
556
556
|
:type => :string,
|
557
557
|
:header => nil
|
558
558
|
},
|
559
|
+
{
|
560
|
+
:name => 'passenger_temp_path',
|
561
|
+
:scope => :location,
|
562
|
+
:type => :string,
|
563
|
+
:function => 'ngx_conf_set_path_slot',
|
564
|
+
:field => 'upstream_config.temp_path',
|
565
|
+
:auto_generate_nginx_tracking_code => false
|
566
|
+
},
|
559
567
|
{
|
560
568
|
:name => 'passenger_ignore_headers',
|
561
569
|
:scope => :location,
|
@@ -681,6 +689,12 @@ NGINX_CONFIGURATION_OPTIONS = [
|
|
681
689
|
:type => :string,
|
682
690
|
:default => DEFAULT_STICKY_SESSIONS_COOKIE_NAME
|
683
691
|
},
|
692
|
+
{
|
693
|
+
:name => 'passenger_sticky_sessions_cookie_attributes',
|
694
|
+
:scope => :location,
|
695
|
+
:type => :string,
|
696
|
+
:default => DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES
|
697
|
+
},
|
684
698
|
{
|
685
699
|
:name => 'passenger_vary_turbocache_by_cookie',
|
686
700
|
:scope => :location,
|
@@ -279,7 +279,7 @@ module PhusionPassenger
|
|
279
279
|
"-c '#{filename}' -o '#{filename}.o'",
|
280
280
|
flags)
|
281
281
|
result = run_compiler(description, command, filename, source, true)
|
282
|
-
result = result && result[:result] && result[:output] !~ /unknown warning option/i
|
282
|
+
result = result && result[:result] && result[:output] !~ /unknown warning option|unrecognized command line option/i
|
283
283
|
end
|
284
284
|
return false if !result
|
285
285
|
|
@@ -25,6 +25,16 @@
|
|
25
25
|
|
26
26
|
PhusionPassenger.require_passenger_lib 'utils/tee_input'
|
27
27
|
|
28
|
+
if defined?(::Rack::BodyProxy) && !::Rack::BodyProxy.new("").respond_to?(:each)
|
29
|
+
module ::Rack
|
30
|
+
class BodyProxy
|
31
|
+
def each
|
32
|
+
@body.each { |body| yield body }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
28
38
|
module PhusionPassenger
|
29
39
|
module Rack
|
30
40
|
|
@@ -436,6 +436,12 @@ module PhusionPassenger
|
|
436
436
|
:desc => "Cookie name to use for sticky sessions.\n" \
|
437
437
|
"Default: #{DEFAULT_STICKY_SESSIONS_COOKIE_NAME}"
|
438
438
|
},
|
439
|
+
{
|
440
|
+
:name => :sticky_sessions_cookie_attributes,
|
441
|
+
:type_desc => "'NAME1=VALUE1; NAME2'",
|
442
|
+
:desc => "The attributes to use for the sticky session cookie.\n" \
|
443
|
+
"Default: #{DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES}"
|
444
|
+
},
|
439
445
|
{
|
440
446
|
:name => :vary_turbocache_by_cookie,
|
441
447
|
:type_desc => 'NAME',
|
@@ -175,6 +175,7 @@ module PhusionPassenger
|
|
175
175
|
add_flag_param(command, :sticky_sessions, "--sticky-sessions")
|
176
176
|
add_param(command, :vary_turbocache_by_cookie, "--vary-turbocache-by-cookie")
|
177
177
|
add_param(command, :sticky_sessions_cookie_name, "--sticky-sessions-cookie-name")
|
178
|
+
add_param(command, :sticky_sessions_cookie_attributes, "--sticky-sessions-cookie-attributes")
|
178
179
|
add_param(command, :ruby, "--ruby")
|
179
180
|
add_param(command, :python, "--python")
|
180
181
|
add_param(command, :nodejs, "--nodejs")
|
@@ -24,6 +24,10 @@
|
|
24
24
|
|
25
25
|
PhusionPassenger.require_passenger_lib 'utils' # So that we can know whether #writev is supported.
|
26
26
|
|
27
|
+
# https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
|
28
|
+
def ruby2_keywords(*)
|
29
|
+
end if RUBY_VERSION < "2.7"
|
30
|
+
|
27
31
|
module PhusionPassenger
|
28
32
|
module Utils
|
29
33
|
|
@@ -117,7 +121,7 @@ module PhusionPassenger
|
|
117
121
|
raise annotate(e)
|
118
122
|
end
|
119
123
|
|
120
|
-
def write_nonblock(string, *args)
|
124
|
+
ruby2_keywords def write_nonblock(string, *args)
|
121
125
|
@socket.write_nonblock(string, *args)
|
122
126
|
rescue => e
|
123
127
|
raise annotate(e)
|
@@ -141,25 +145,25 @@ module PhusionPassenger
|
|
141
145
|
raise annotate(e)
|
142
146
|
end if IO.method_defined?(:writev3)
|
143
147
|
|
144
|
-
def send(*args)
|
148
|
+
ruby2_keywords def send(*args)
|
145
149
|
@socket.send(*args)
|
146
150
|
rescue => e
|
147
151
|
raise annotate(e)
|
148
152
|
end
|
149
153
|
|
150
|
-
def sendmsg(*args)
|
154
|
+
ruby2_keywords def sendmsg(*args)
|
151
155
|
@socket.sendmsg(*args)
|
152
156
|
rescue => e
|
153
157
|
raise annotate(e)
|
154
158
|
end
|
155
159
|
|
156
|
-
def sendmsg_nonblock(*args)
|
160
|
+
ruby2_keywords def sendmsg_nonblock(*args)
|
157
161
|
@socket.sendmsg_nonblock(*args)
|
158
162
|
rescue => e
|
159
163
|
raise annotate(e)
|
160
164
|
end
|
161
165
|
|
162
|
-
def puts(*args)
|
166
|
+
ruby2_keywords def puts(*args)
|
163
167
|
@socket.puts(*args)
|
164
168
|
rescue => e
|
165
169
|
raise annotate(e)
|
@@ -172,7 +176,7 @@ module PhusionPassenger
|
|
172
176
|
raise annotate(e)
|
173
177
|
end
|
174
178
|
|
175
|
-
def read(*args)
|
179
|
+
ruby2_keywords def read(*args)
|
176
180
|
if @simulate_eof
|
177
181
|
length, buffer = args
|
178
182
|
if buffer
|
@@ -191,14 +195,14 @@ module PhusionPassenger
|
|
191
195
|
raise annotate(e)
|
192
196
|
end
|
193
197
|
|
194
|
-
def read_nonblock(*args)
|
198
|
+
ruby2_keywords def read_nonblock(*args)
|
195
199
|
raise EOFError, "end of file reached" if @simulate_eof
|
196
200
|
@socket.read_nonblock(*args)
|
197
201
|
rescue => e
|
198
202
|
raise annotate(e)
|
199
203
|
end
|
200
204
|
|
201
|
-
def readpartial(*args)
|
205
|
+
ruby2_keywords def readpartial(*args)
|
202
206
|
raise EOFError, "end of file reached" if @simulate_eof
|
203
207
|
@socket.readpartial(*args)
|
204
208
|
rescue => e
|
@@ -212,21 +216,21 @@ module PhusionPassenger
|
|
212
216
|
raise annotate(e)
|
213
217
|
end
|
214
218
|
|
215
|
-
def recv(*args)
|
219
|
+
ruby2_keywords def recv(*args)
|
216
220
|
raise EOFError, "end of file reached" if @simulate_eof
|
217
221
|
@socket.recv(*args)
|
218
222
|
rescue => e
|
219
223
|
raise annotate(e)
|
220
224
|
end
|
221
225
|
|
222
|
-
def recvfrom(*args)
|
226
|
+
ruby2_keywords def recvfrom(*args)
|
223
227
|
raise EOFError, "end of file reached" if @simulate_eof
|
224
228
|
@socket.recvfrom(*args)
|
225
229
|
rescue => e
|
226
230
|
raise annotate(e)
|
227
231
|
end
|
228
232
|
|
229
|
-
def recvfrom_nonblock(*args)
|
233
|
+
ruby2_keywords def recvfrom_nonblock(*args)
|
230
234
|
raise EOFError, "end of file reached" if @simulate_eof
|
231
235
|
@socket.recvfrom_nonblock(*args)
|
232
236
|
rescue => e
|
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: 6.0.
|
4
|
+
version: 6.0.5
|
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:
|
11
|
+
date: 2020-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: etc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: A modern web server and application server for Ruby, Python and Node.js,
|
42
56
|
optimized for performance, low memory usage and ease of use.
|
43
57
|
email: software-signing@phusion.nl
|
@@ -4459,7 +4473,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
4459
4473
|
- !ruby/object:Gem::Version
|
4460
4474
|
version: '0'
|
4461
4475
|
requirements: []
|
4462
|
-
rubyforge_project:
|
4476
|
+
rubyforge_project:
|
4463
4477
|
rubygems_version: 2.6.11
|
4464
4478
|
signing_key:
|
4465
4479
|
specification_version: 4
|