rails_discord_notifier 0.3.1 → 0.3.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: fbf5bc3adc89129d2ab69ef41705e363a214a53eb31dd1bd0dd2a4fb36253a8b
4
- data.tar.gz: b35128c48b420cd7577a9a455f5d857ef952c08f0ef427136299a2e698e85101
3
+ metadata.gz: 78212ad50963b77ccf50a72b4d7c0d79efd23557465c73cd829dc6bcc3c88251
4
+ data.tar.gz: c394690be33b31b3ff588041ccbe8232079657a479b204f968c9e58b3f30b6d0
5
5
  SHA512:
6
- metadata.gz: 8187d0173472e8d83c8f4ce848b9d7fa9feb218db585853bbed1e784cd820f81fe93086f34c23c4b35800a4cefbe3997022d67b40a062bcd093b28afb8e03056
7
- data.tar.gz: 975248f04642541592a440169438e6356f53e951a380f440d175a38cc42a81c7f4bd168b9786e21b20ab06bf08e576cc143eefb3efb06e7321934623a76c5b32
6
+ metadata.gz: 6b2c309fd867f9b24963e37b04958c081a984fd4c3cadb1a969b08ed981d5776dfaeea0555b87ea89722dd22249600ed7ff792ffac426d7fa367d9c57a1aba31
7
+ data.tar.gz: 39e26aa259b490ddfd3227183350a4a8dd74123e6c93527f2a228519da99ab67d83703b50c21d3179918e8c70a67a0b21ae1ed668413b9536bb2b150edfaaeca
data/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.2] - 2026-10-28
11
+
12
+ ### Security
13
+
14
+ - **The URL field no longer includes the query string.** Query values were
15
+ sent twice, filtered, in the URL and in Params, and the URL copy was still
16
+ sent with `config.include_params = false`. The query string is now sent only
17
+ as part of Params, so `include_params = false` leaves it out. An exception
18
+ message that quotes a value is still sent, with its best-effort scrub.
19
+
10
20
  ## [0.3.1] - 2026-10-28
11
21
 
12
22
  ### Changed
data/README.md CHANGED
@@ -63,7 +63,7 @@ Exception in POST /orders
63
63
  ActiveRecord::RecordInvalid: Validation failed: Email can't be blank
64
64
  Caused by ArgumentError: missing email
65
65
 
66
- URL https://shop.example.com/orders?utm_source=newsletter
66
+ URL https://shop.example.com/orders
67
67
  Controller orders Action create
68
68
  Environment production Release a1b2c3d
69
69
  Request ID 8f3c… Host web-01
@@ -140,9 +140,11 @@ Parameters and query strings are filtered recursively with
140
140
  `session`, `credential`).
141
141
 
142
142
  Because it is a union, enabling this gem can never redact less than your
143
- application already does. To send no parameters at all, set
144
- `config.include_params = false`. The same filter applies to extra fields from
145
- `config.context` and from `Rails.error` context.
143
+ application already does. The URL field leaves out the query string, so the
144
+ query string is sent only as part of the filtered params. To leave out params
145
+ and the query string, set `config.include_params = false`. An exception message
146
+ that quotes a parameter value is still sent (see below). The same filter
147
+ applies to extra fields from `config.context` and from `Rails.error` context.
146
148
 
147
149
  Exception messages are free text rather than structured parameters, so they get
148
150
  a best-effort scrub instead: `token=abc`, `password="x"`, `Api_Key: abc`,
@@ -112,7 +112,7 @@ module RailsDiscordNotifier
112
112
 
113
113
  def request_fields
114
114
  [
115
- { name: "URL", value: filtered_url },
115
+ { name: "URL", value: request_url },
116
116
  { name: "Controller", value: rails_params["controller"], inline: true },
117
117
  { name: "Action", value: rails_params["action"], inline: true },
118
118
  { name: "Environment", value: config.environment, inline: true },
@@ -196,21 +196,10 @@ module RailsDiscordNotifier
196
196
  Array(exception.backtrace).first(config.backtrace_lines)
197
197
  end
198
198
 
199
- def filtered_url
200
- return nil unless request
201
-
202
- base = "#{request.base_url}#{request.path}"
203
- query = filtered_query_string
204
- query.empty? ? base : "#{base}?#{query}"
205
- end
206
-
207
- def filtered_query_string
208
- raw = request.query_string.to_s
209
- return "" if raw.empty?
210
-
211
- Rack::Utils.build_nested_query(parameter_filter.filter(Rack::Utils.parse_nested_query(raw)))
212
- rescue StandardError
213
- ""
199
+ # Without the query string, which is sent only as part of the filtered
200
+ # Params field, so include_params = false leaves it out.
201
+ def request_url
202
+ request && "#{request.base_url}#{request.path}"
214
203
  end
215
204
 
216
205
  def request_params
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsDiscordNotifier
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_discord_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GettinDrikkieWithIt