We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff9d041 commit b7c85f1Copy full SHA for b7c85f1
spec/unit/lib/hooks/plugins/auth/hmac_spec.rb
@@ -282,6 +282,13 @@ def create_timestamped_signature(timestamp, version = "v0")
282
long_headers = { default_header => long_signature }
283
expect(valid_with(payload: long_payload, headers: long_headers)).to be true
284
end
285
+
286
+ it "returns false and logs for signature containing non-null control characters" do
287
+ control_char = "\x01"
288
+ headers_with_control = { default_header => signature + control_char }
289
+ expect(log).to receive(:warn).with(/control characters/)
290
+ expect(valid_with(headers: headers_with_control)).to be false
291
+ end
292
293
294
context "format mismatch attacks" do
0 commit comments