patchwork-rb 0.1.8 → 0.1.9
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/README.md +3 -7
- data/lib/patchwork/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: 2d1aedce8e678200369c6550388c002085afd364d06a2aa98c4f4f1727c728c3
|
|
4
|
+
data.tar.gz: 01fe72a9e84de16a83a98be88ecd770363ac2520f39857d054fa9fece6c1edea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f1cf733c653e0186303cdc14f1b80d2f87c8c73cfc13f592c2ade0f197f0120266fb8d102005225b2fb194c6b2738308985a0c0405708b8f29ddbc517924fb5
|
|
7
|
+
data.tar.gz: d7f9b1a2502da37c696732a96c0b4d2a8094918b5cfeb9fa8ff5c5563bc21a523c7008d961b9d076b005dbed90824d9c6f756cf08cddc65f20a6983957f2a7c1
|
data/README.md
CHANGED
|
@@ -235,13 +235,13 @@ Failure behaviour:
|
|
|
235
235
|
|
|
236
236
|
### What the signature does and doesn't cover
|
|
237
237
|
|
|
238
|
-
A signature carries a label. `
|
|
238
|
+
A signature carries a label. `v2` covers the method, the path **with the query string exactly as sent**, and the raw body. The scheme is specified in the [Signing guide](https://docs.usepatchwork.co/guides/signing).
|
|
239
239
|
|
|
240
240
|
The gateway and the concern verify either label, and pass the query for you. If you verify with the primitives instead, pass `query:` — the raw query string, `request.query_string` in Rack and Rails. Leave it out and a `v2` value is checked against the bare path, which will not match.
|
|
241
241
|
|
|
242
|
-
**
|
|
242
|
+
**A GET tool's arguments are covered.** Patchwork signs the query on every signed call — tool calls, a patch dry run, the relay mint, the connection probe and webhook deliveries — so a request whose arguments were changed in flight does not verify. You get this without configuring anything.
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
An earlier label, `v1`, covered the path without the query. Patchwork no longer sends it. This gem still accepts one if it arrives, which is harmless because nothing emits one and nobody can produce one without your request secret. To refuse it anyway:
|
|
245
245
|
|
|
246
246
|
```ruby
|
|
247
247
|
use Patchwork::Gateway,
|
|
@@ -249,10 +249,6 @@ use Patchwork::Gateway,
|
|
|
249
249
|
labels: [ Patchwork::Signature::V2 ]
|
|
250
250
|
```
|
|
251
251
|
|
|
252
|
-
Requiring `v2` refuses any signature that does not cover the query. Patchwork sends `v2` on every signed call — tool calls, a patch dry run, the relay mint, the connection probe and webhook deliveries — so this is safe to turn on today. It will fail against a platform that has not started sending `v2`, which is why it is not the default.
|
|
253
|
-
|
|
254
|
-
Or give any tool whose arguments matter — ids, amounts, anything that writes — a `POST` binding, where the arguments travel in the signed body.
|
|
255
|
-
|
|
256
252
|
The signed path is the one your app sees. If a proxy rewrites paths before your app does, mount the gateway where the original path is still intact.
|
|
257
253
|
|
|
258
254
|
**Method overrides are refused.** A signed request that carries `X-HTTP-Method-Override`, or that `Rack::MethodOverride` has already rewritten, is a 401. Patchwork never sends one, and the header isn't signed.
|
data/lib/patchwork/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: patchwork-rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chromablue Labs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jwt
|