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 +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +6 -4
- data/lib/rails_discord_notifier/payload.rb +5 -16
- data/lib/rails_discord_notifier/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78212ad50963b77ccf50a72b4d7c0d79efd23557465c73cd829dc6bcc3c88251
|
|
4
|
+
data.tar.gz: c394690be33b31b3ff588041ccbe8232079657a479b204f968c9e58b3f30b6d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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.
|
|
144
|
-
|
|
145
|
-
`config.
|
|
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:
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|