falcon 0.48.0 → 0.48.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0dbc89627471c80f82f8888e8cce7ab9cf3dd01621ee6f92a7b6904b33c275a
4
- data.tar.gz: 848e0f96f5b247866d02bc9ae0fdfc1a0f2bb4a70a5dd853927e991e635950e9
3
+ metadata.gz: 0bca148632a8977f9aee1b67347459564357ba607e42a51401e5ce942b00ce29
4
+ data.tar.gz: 2d1003406460af68558a1533eec082b58e474e653fa6e5554f4f9f750796bf08
5
5
  SHA512:
6
- metadata.gz: f454b3f224174fde4901cb85ce7cfb12b447dbcf025788d3a769cab12ce1c0d0095164f668621d604a0e295648c2a18008a995133e635205c4d2aee32cf566c6
7
- data.tar.gz: 633db8f65e238d35a48541ba43c3490a5c398d09883f2fb6ac41f50c316549fe49426f1870f612634d39b3766709303890ad76d9e1bbbe8863d8d85d34fcfd1f
6
+ metadata.gz: 7f6001a9364c224e1d7daf4e2a8d898ef11c551d3c9b3cbf55bc129fba478d97102cb217f0c156f1838ada0b59d0113e41aebaba7615089ccc36a8bd6ca795af
7
+ data.tar.gz: ad69b37d67cd115d01b34b9633bfa866cf56e3022c85ae9f15e15284c7fdf1093742e3ff41fe7aaf501940f724a359ab0023816689f8d2256291b4879e368a92
checksums.yaml.gz.sig CHANGED
Binary file
@@ -150,7 +150,11 @@ module Falcon
150
150
 
151
151
  Traces::Provider(self) do
152
152
  def call(request)
153
- Traces.trace('falcon.middleware.proxy.call', attributes: {authority: request.authority}) do
153
+ attributes = {
154
+ "authority" => request.authority,
155
+ }
156
+
157
+ Traces.trace('falcon.middleware.proxy.call', attributes: attributes) do
154
158
  super
155
159
  end
156
160
  end
@@ -14,17 +14,28 @@ module Falcon
14
14
  class Virtual < Async::Service::Generic
15
15
  # Drop privileges according to the user and group of the specified path.
16
16
  # @parameter path [String] The path to the application directory.
17
+ # @returns [Hash] The environment to use for the spawned process.
17
18
  def assume_privileges(path)
19
+ # Process.exec / Process.spawn don't replace the environment but instead update it, so we need to clear out any existing BUNDLE_ variables using `nil` values, which will cause them to be removed from the child environment:
20
+ env = ENV.to_h do |key, value|
21
+ if key.start_with?('BUNDLE_')
22
+ [key, nil]
23
+ else
24
+ [key, value]
25
+ end
26
+ end
27
+
28
+ env['PWD'] = File.dirname(path)
29
+
18
30
  stat = File.stat(path)
19
31
 
20
32
  Process::GID.change_privilege(stat.gid)
21
33
  Process::UID.change_privilege(stat.uid)
22
34
 
23
35
  home = Etc.getpwuid(stat.uid).dir
36
+ env['HOME'] = home
24
37
 
25
- return {
26
- 'HOME' => home,
27
- }
38
+ return env
28
39
  end
29
40
 
30
41
  # Spawn an application instance from the specified path.
@@ -35,9 +46,7 @@ module Falcon
35
46
  container.spawn(name: "Falcon Application", restart: true, key: path) do |instance|
36
47
  env = assume_privileges(path)
37
48
 
38
- instance.exec(env,
39
- "bundle", "exec", "--keep-file-descriptors",
40
- path, ready: false, **options)
49
+ instance.exec(env, "bundle", "exec", path, ready: false, **options)
41
50
  end
42
51
  end
43
52
 
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2017-2024, by Samuel Williams.
5
5
 
6
6
  module Falcon
7
- VERSION = "0.48.0"
7
+ VERSION = "0.48.2"
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.48.0
4
+ version: 0.48.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -59,7 +59,7 @@ cert_chain:
59
59
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
60
60
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
61
61
  -----END CERTIFICATE-----
62
- date: 2024-09-04 00:00:00.000000000 Z
62
+ date: 2024-09-25 00:00:00.000000000 Z
63
63
  dependencies:
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: async
metadata.gz.sig CHANGED
Binary file