Skip to content

Commit e087550

Browse files
committed
Clarify optional timestamp validation in HMAC authentication
1 parent c2194b3 commit e087550

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/hooks/plugins/auth/hmac.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ def self.valid?(payload:, headers:, config:)
162162
end
163163

164164
# Validate timestamp if required (for services that include timestamp validation)
165+
# It should be noted that not all HMAC implementations require timestamp validation,
166+
# so this is optional based on configuration.
165167
if validator_config[:timestamp_header]
166168
unless valid_timestamp?(normalized_headers, validator_config)
167169
log.warn("Auth::HMAC validation failed: Invalid timestamp")

0 commit comments

Comments
 (0)