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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '090d2d11a0dc542c742b3dfa9d1b48781b2e98e9ab429f5394f73326ec3c9126'
4
- data.tar.gz: 8e9ec0bf8db8dba662faae9120aaa926941e58b8612d3dc9f6e669bb7ef66d02
3
+ metadata.gz: 634475756f1a58d6586feccfcd2dd7bc9fcbf02fce50a3a9eca04b79d3cc5380
4
+ data.tar.gz: b762c69ed489b18e50b818dea741c2584c15d409e5e61af51c5155a6a226bc41
5
5
  SHA512:
6
- metadata.gz: 1abb70d5917a870cd0e09f7dc663ae183e8099af486f55783cbb3ead6adbb01d99ed8026aea9d29a9a8f96ee1d864a83ad599839d70a05889fcc10f26de3d0c3
7
- data.tar.gz: dc1fd96c9839cf17763ab74e250414a5b6736425f8678ca3ed6d62f37867ccdaccfe87e56c099282b0608df182ed59555286fb80c3d23f5d3d22b7bf33708b40
6
+ metadata.gz: 101f7f013bb4a0d0ef22139027e69b6778419afc0c6ab4ab415e5a8e20873b9814ecd25f25da3932207acf29f531dd76f22ddddbf11f94e675a3c15b6367d2e9
7
+ data.tar.gz: 4dcdaedcb617d073dfc75ce7ef1c80a1199f78bb7cf0d244c87cb48ecaccba3170123311cb1b5667b1db20adcecab3921e5d67403ae6b815a9221b82c104c24c
@@ -25,5 +25,5 @@ jobs:
25
25
  - name: Auto Commit
26
26
  uses: stefanzweifel/git-auto-commit-action@v5
27
27
  with:
28
- commit_message: chore: Rubocop Auto Corrections
29
- commit_user_name: Rubocop
28
+ commit_message: 'chore: Rubocop Auto Corrections'
29
+ commit_user_name: 'Rubocop bot'
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
 
@@ -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
- unless method.to_sym == :get || method.to_sym == :delete
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
@@ -1,3 +1,3 @@
1
1
  module HTTPigeon
2
- VERSION = "2.4.1".freeze
2
+ VERSION = "2.4.2".freeze
3
3
  end
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.1
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 00:00:00.000000000 Z
11
+ date: 2026-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday