Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gemspec

group :development do
gem "irb", "~> 1"
gem "ostruct", "~> 0.6.1"
gem "ostruct", "~> 0.6.2"
gem "rack-test", "~> 2.2"
gem "rspec", "~> 3"
gem "rubocop", "~> 1"
Expand Down
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
hooks-ruby (0.6.0)
hooks-ruby (0.6.1)
dry-schema (~> 1.14, >= 1.14.1)
grape (~> 2.3)
puma (~> 6.6)
Expand Down Expand Up @@ -95,7 +95,7 @@ GEM
net-http (0.6.0)
uri
nio4r (2.7.4)
ostruct (0.6.1)
ostruct (0.6.2)
parallel (1.27.0)
parser (3.3.8.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -125,7 +125,7 @@ GEM
rack-test (2.2.0)
rack (>= 1.3)
rainbow (3.1.1)
rdoc (6.14.0)
rdoc (6.14.1)
erb
psych (>= 4.0.0)
redacting-logger (1.5.0)
Expand All @@ -139,7 +139,7 @@ GEM
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.4)
rspec-core (3.13.5)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
Expand All @@ -148,7 +148,7 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.4)
rubocop (1.76.2)
rubocop (1.77.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
Expand Down Expand Up @@ -222,7 +222,7 @@ PLATFORMS
DEPENDENCIES
hooks-ruby!
irb (~> 1)
ostruct (~> 0.6.1)
ostruct (~> 0.6.2)
rack-test (~> 2.2)
rspec (~> 3)
rubocop (~> 1)
Expand Down
4 changes: 2 additions & 2 deletions lib/hooks/plugins/auth/hmac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def self.valid?(payload:, headers:, config:)
end

# Validate signature format using shared validation but with HMAC-specific length limit
return false unless validate_signature_format(raw_signature)
return false unless validate_signature_format?(raw_signature)

# Now we can safely normalize headers for the rest of the validation
normalized_headers = normalize_headers(headers)
Expand Down Expand Up @@ -192,7 +192,7 @@ def self.valid?(payload:, headers:, config:)
# @param signature [String] Raw signature to validate
# @return [Boolean] true if signature is valid
# @api private
def self.validate_signature_format(signature)
def self.validate_signature_format?(signature)
# Check signature length with HMAC-specific limit
if signature.length > MAX_SIGNATURE_LENGTH
log.warn("Auth::HMAC validation failed: Signature length exceeds maximum limit of #{MAX_SIGNATURE_LENGTH} characters")
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
module Hooks
# Current version of the Hooks webhook framework
# @return [String] The version string following semantic versioning
VERSION = "0.6.0".freeze
VERSION = "0.6.1".freeze
end
Loading