httpigeon 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/reviewdog.yaml +2 -2
- data/CHANGELOG.md +7 -0
- data/lib/httpigeon/request.rb +9 -4
- data/lib/httpigeon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 634475756f1a58d6586feccfcd2dd7bc9fcbf02fce50a3a9eca04b79d3cc5380
|
|
4
|
+
data.tar.gz: b762c69ed489b18e50b818dea741c2584c15d409e5e61af51c5155a6a226bc41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 101f7f013bb4a0d0ef22139027e69b6778419afc0c6ab4ab415e5a8e20873b9814ecd25f25da3932207acf29f531dd76f22ddddbf11f94e675a3c15b6367d2e9
|
|
7
|
+
data.tar.gz: 4dcdaedcb617d073dfc75ce7ef1c80a1199f78bb7cf0d244c87cb48ecaccba3170123311cb1b5667b1db20adcecab3921e5d67403ae6b815a9221b82c104c24c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.4.2](https://github.com/dailypay/httpigeon/compare/v2.4.1...v2.4.2) (2026-02-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **MIMO-3352:** Address RCE vulnerability ([#56](https://github.com/dailypay/httpigeon/issues/56)) ([43577ce](https://github.com/dailypay/httpigeon/commit/43577ce579e56a92388f7e9b70b0425e7fc8fcd8))
|
|
9
|
+
|
|
3
10
|
## [2.4.1](https://github.com/dailypay/httpigeon/compare/v2.4.0...v2.4.1) (2026-02-11)
|
|
4
11
|
|
|
5
12
|
|
data/lib/httpigeon/request.rb
CHANGED
|
@@ -7,6 +7,7 @@ require_relative "middleware/httpigeon_logger"
|
|
|
7
7
|
module HTTPigeon
|
|
8
8
|
class Request
|
|
9
9
|
REQUEST_ID_HEADER = 'X-Request-Id'.freeze
|
|
10
|
+
ALLOWED_METHODS = %i[get post put patch delete head options].freeze
|
|
10
11
|
|
|
11
12
|
class << self
|
|
12
13
|
def get(endpoint, query = {}, headers = {}, event_type = nil, log_filters = [])
|
|
@@ -45,7 +46,7 @@ module HTTPigeon
|
|
|
45
46
|
def initialize(base_url:, options: nil, headers: nil, adapter: nil, logger: nil, event_type: nil, log_filters: nil, fuse_config: nil)
|
|
46
47
|
@base_url = URI.parse(base_url)
|
|
47
48
|
|
|
48
|
-
request_headers = default_headers.merge(headers.to_h)
|
|
49
|
+
request_headers = default_headers(request_id: SecureRandom.uuid).merge(headers.to_h)
|
|
49
50
|
fuse_config_opts = { service_id: @base_url.host }.merge(fuse_config.to_h)
|
|
50
51
|
@fuse = CircuitBreaker::Fuse.from_options(fuse_config_opts)
|
|
51
52
|
|
|
@@ -70,7 +71,11 @@ module HTTPigeon
|
|
|
70
71
|
end
|
|
71
72
|
|
|
72
73
|
def run(method: :get, path: '/', payload: {})
|
|
73
|
-
|
|
74
|
+
sym_method = method.to_sym
|
|
75
|
+
|
|
76
|
+
raise ArgumentError, "Invalid or unsupported HTTP method: #{method}" unless ALLOWED_METHODS.include?(sym_method)
|
|
77
|
+
|
|
78
|
+
unless [:get, :delete].include?(sym_method)
|
|
74
79
|
payload = payload.presence&.to_json
|
|
75
80
|
connection.headers['Content-Type'] = 'application/json'
|
|
76
81
|
end
|
|
@@ -100,8 +105,8 @@ module HTTPigeon
|
|
|
100
105
|
HTTPigeon::Logger.new(event_type: event_type, log_filters: log_filters)
|
|
101
106
|
end
|
|
102
107
|
|
|
103
|
-
def default_headers
|
|
104
|
-
{ 'Accept' => 'application/json' }
|
|
108
|
+
def default_headers(request_id: nil)
|
|
109
|
+
{ 'Accept' => 'application/json', REQUEST_ID_HEADER => request_id }.compact
|
|
105
110
|
end
|
|
106
111
|
end
|
|
107
112
|
end
|
data/lib/httpigeon/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: httpigeon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 2k-joker
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|